Commit 1631cbd5 by lujunyi

一堆功能

parent 9130c523
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
use Dcat\Admin\Http\Controllers\AdminController; use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show; use Dcat\Admin\Show;
// 用法用量
class DosageController extends AdminController class DosageController extends AdminController
{ {
/** /**
...@@ -74,6 +75,7 @@ protected function form() ...@@ -74,6 +75,7 @@ protected function form()
$form->display('created_at')->width(4); $form->display('created_at')->width(4);
$form->display('updated_at')->width(4); $form->display('updated_at')->width(4);
// 右上角按钮控制 // 右上角按钮控制
$form->disableDeleteButton(); // 去掉删除按钮 $form->disableDeleteButton(); // 去掉删除按钮
}); });
......
...@@ -73,14 +73,14 @@ protected function detail($id) ...@@ -73,14 +73,14 @@ protected function detail($id)
protected function form() protected function form()
{ {
return Form::make(new PharmacyCorrection(), function (Form $form) { return Form::make(new PharmacyCorrection(), function (Form $form) {
$form->display('id'); $form->display('id')->width(4);
$form->text('pharmacy_id'); $form->text('pharmacy_id')->width(4);
$form->text('pharmacy_name'); $form->text('pharmacy_name')->width(4);
$form->text('is_handle'); $form->text('is_handle')->width(4);
$form->text('content'); $form->text('content')->width(4);
$form->display('created_at'); $form->display('created_at')->width(4);
$form->display('updated_at'); $form->display('updated_at')->width(4);
// 右上角按钮控制 // 右上角按钮控制
$form->disableDeleteButton(); // 去掉删除按钮 $form->disableDeleteButton(); // 去掉删除按钮
......
<?php
namespace App\Admin\Controllers;
use App\Admin\Extensions\ToolBar\Actions\AddPharmacyDrugAction;
use App\Admin\Repositories\PharmacyDrugRepository;
use App\Models\DosageModel;
use App\Models\DrugModel;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class PharmacyDrugController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new PharmacyDrugRepository(['drug', 'dosage', 'pharmacy']), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable();
$grid->column('pharmacy.name', '药店');
// $grid->column('drug_id');
$grid->column('drug.name', '药品名称');
$grid->column('drug.code', '简码');
$grid->column('drug.unit', '单位');
$grid->column('drug.is_rx', '处方药')->using(DrugModel::RX_MAP);
$grid->column('drug.spec', '规格');
$grid->column('drug.dosage_form', '剂型');
$grid->column('drug.factory', '生产厂家');
$grid->column('drug.approval_no', '批准文号');
$grid->column('drug.limit_buy_7', '7天限购');
$grid->column('dosage.dosage_desc', '用法用量');
$grid->column('batch_no');
$grid->column('created_at');
// 工具栏按钮
$grid->tools(function ($tools) {
$tools->append(new AddPharmacyDrugAction()); // 新增药品,从药品池导入
});
$grid->filter(function (Grid\Filter $filter) {
$filter->panel(); // 更改为 panel 布局
$filter->expand(); // 默认展开搜索框
$filter->like('drug.name', '药品名称')->width(3);
$filter->like('drug.code', '药品简码')->width(3);
$filter->like('drug.factory', '生产厂家')->width(3);
});
// 行按钮控制
$grid->disableCreateButton(); // 禁用创建按钮
$grid->disableDeleteButton(); // 禁用删除按钮
// 工具栏按钮控制
$grid->disableBatchDelete(); // 禁用批量删除
});
}
/**
* Make a show builder.
*
* @param mixed $id
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new PharmacyDrugRepository(['drug', 'dosage', 'pharmacy']), function (Show $show) {
$show->field('id')->width(4);
$show->field('pharmacy.name', '药店')->width(4);
$show->field('drug.name', '药品名称')->width(4);
$show->field('dosage.dosage_desc', '用法用量')->width(4);
$show->field('batch_no')->width(4);
$show->field('created_at')->width(4);
$show->field('updated_at')->width(4);
$show->panel()->tools(function ($tools) {
$tools->disableDelete(); // 禁止删除按钮
});
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new PharmacyDrugRepository(['drug', 'dosage', 'pharmacy']), function (Form $form) {
$form->display('id')->width(4);
$form->text('pharmacy.name', '药店')->disable()->width(4);
$form->text('drug.name', '药品名称')->disable()->width(4);
$disageList = DosageModel::pluck('dosage_desc', 'id');
$form->select('dosage_id', '用法用量')->options($disageList)->width(4);
$form->text('batch_no')->width(4);
$form->display('created_at')->width(4);
$form->display('updated_at')->width(4);
// 右上角按钮控制
$form->disableDeleteButton(); // 去掉删除按钮
});
}
}
<?php
namespace App\Admin\Controllers;
use App\Admin\Repositories\PrescriptionRepository;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class PrescriptionController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new PrescriptionRepository(), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable();
$grid->column('prescription_umber');
$grid->column('status');
$grid->column('patient_name');
$grid->column('patient_age');
$grid->column('patient_gender');
$grid->column('diagnosis_id');
$grid->column('diagnosis_name');
$grid->column('inquiry_info');
$grid->column('drug_info');
$grid->column('doctor_id');
$grid->column('doctor_name');
$grid->column('doctor_online_hospital_name');
$grid->column('doctor_department');
$grid->column('doctor_title');
$grid->column('doctor_license_no');
$grid->column('pharmacy_id');
$grid->column('pharmacy_name');
$grid->column('pharmacist_id');
$grid->column('pharmacist_name');
$grid->column('pharmacist_license_number');
$grid->column('created_at');
$grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
$filter->panel(); // 更改为 panel 布局
$filter->expand(); // 默认展开搜索框
$filter->like('patient_name')->width(3);
$filter->like('diagnosis_name')->width(3);
$filter->like('pharmacy_name')->width(3);
});
// 行按钮控制
// $grid->disableCreateButton(); // 禁用创建按钮
$grid->disableDeleteButton(); // 禁用删除按钮
// 工具栏按钮控制
$grid->disableBatchDelete(); // 禁用批量删除
});
}
/**
* Make a show builder.
*
* @param mixed $id
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new PrescriptionRepository(), function (Show $show) {
$show->field('id')->width(4);
$show->field('status')->width(4);
$show->field('patient_name')->width(4);
$show->field('patient_age')->width(4);
$show->field('patient_gender')->width(4);
$show->field('diagnosis_id')->width(4);
$show->field('diagnosis_name')->width(4);
$show->field('inquiry_info')->width(4);
$show->field('drug_info')->width(4);
$show->field('doctor_id')->width(4);
$show->field('doctor_name')->width(4);
$show->field('doctor_online_hospital_name')->width(4);
$show->field('doctor_department')->width(4);
$show->field('doctor_title')->width(4);
$show->field('doctor_license_no')->width(4);
$show->field('pharmacy_id')->width(4);
$show->field('pharmacy_name')->width(4);
$show->field('pharmacist_id')->width(4);
$show->field('pharmacist_name')->width(4);
$show->field('pharmacist_license_number')->width(4);
$show->field('created_at')->width(4);
$show->field('updated_at')->width(4);
$show->panel()->tools(function ($tools) {
$tools->disableDelete(); // 禁止删除按钮
});
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new PrescriptionRepository(), function (Form $form) {
$form->display('id')->width(4);
$form->text('status');
$form->text('patient_name')->width(4);
$form->text('patient_age')->width(4);
$form->text('patient_gender')->width(4);
$form->text('diagnosis_id')->width(4);
$form->text('diagnosis_name')->width(4);
$form->text('inquiry_info')->width(4);
$form->text('drug_info')->width(4);
$form->text('doctor_id')->width(4);
$form->text('doctor_name')->width(4);
$form->text('doctor_online_hospital_name')->width(4);
$form->text('doctor_department')->width(4);
$form->text('doctor_title')->width(4);
$form->text('doctor_license_no')->width(4);
$form->text('pharmacy_id')->width(4);
$form->text('pharmacy_name')->width(4);
$form->text('pharmacist_id')->width(4);
$form->text('pharmacist_name')->width(4);
$form->text('pharmacist_license_number')->width(4);
$form->display('created_at')->width(4);
$form->display('updated_at')->width(4);
// 右上角按钮控制
$form->disableDeleteButton(); // 去掉删除按钮
});
}
}
<?php
namespace App\Admin\Controllers;
use App\Admin\Repositories\PrescriptionLogRepository;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class PrescriptionLogController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new PrescriptionLogRepository(), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC');
$grid->column('id');
// $grid->column('pharmacy_id');
$grid->column('pharmacy_name');
$grid->column('log_info');
$grid->column('created_at');
$grid->filter(function (Grid\Filter $filter) {
$filter->panel(); // 更改为 panel 布局
$filter->expand(); // 默认展开搜索框
$filter->like('pharmacy_name')->width(3);
});
// 行按钮控制
// $grid->disableCreateButton(); // 禁用创建按钮
$grid->disableEditButton(); // 禁用编辑按钮
$grid->disableViewButton(); // 禁用详情按钮
$grid->disableDeleteButton(); // 禁用删除按钮
$grid->disableActions(); // 禁用按钮
// 工具栏按钮控制
$grid->disableBatchDelete(); // 禁用批量删除
});
}
/**
* Make a show builder.
*
* @param mixed $id
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new PrescriptionLogRepository(), function (Show $show) {
$show->field('id')->width(4);
$show->field('pharmacy_id')->width(4);
$show->field('pharmacy_name')->width(4);
$show->field('log_info')->width(4);
$show->field('created_at')->width(4);
$show->field('updated_at')->width(4);
$show->panel()->tools(function ($tools) {
$tools->disableDelete(); // 禁止删除按钮
});
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new PrescriptionLogRepository(), function (Form $form) {
$form->display('id')->width(4);
$form->text('pharmacy_id')->width(4);
$form->text('pharmacy_name')->width(4);
$form->text('log_info')->width(4);
$form->display('created_at')->width(4);
$form->display('updated_at')->width(4);
// 右上角按钮控制
$form->disableDeleteButton(); // 去掉删除按钮
});
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Actions;
use App\Admin\Extensions\ToolBar\Forms\AddPharmacyDrugForm;
use Dcat\Admin\Grid\Tools\AbstractTool;
use Dcat\Admin\Widgets\Modal;
class AddPharmacyDrugAction extends AbstractTool
{
public $title = '新增药品';
public function html()
{
return Modal::make()
->lg()
->title($this->title)
->body(AddPharmacyDrugForm::make())
->button("<button class='btn btn-success'><i class='feather icon-plus-square'></i>&nbsp;{$this->title}</button>");
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms;
use App\Admin\Renderable\DrugTable;
use App\Models\DrugModel;
use App\Models\PharmacyDrugModel;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class AddPharmacyDrugForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->multipleSelectTable('ids', '选择药品')
->title('选择药品')
->dialogWidth('70%') // 弹窗宽度,默认 800px
->from(DrugTable::make()) // 设置渲染类实例,并传递自定义参数
->model(DrugModel::class, 'id', 'name')->required()->width(6);
}
public function handle(array $input)
{
$ids = $input['ids'];
if (! $ids) {
return $this->response()->error('请选择药品')->refresh();
}
foreach ($ids as $id) {
// $drug = DrugModel::find($id);
$where = ['drug_id' => $id];
$data = [
'pharmacy_id' => $id,
'drug_id' => $id,
'dosage_id' => 0,
];
PharmacyDrugModel::updateOrCreate($where, $data);
}
return $this->response()->alert(true)->success('导入药品成功。')->detail('')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms;
use App\Models\Shop\ShopSku;
use App\Service\Shop\ShopMerchantService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Alert;
use Dcat\Admin\Widgets\Form;
class CopySkuBatchForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$info = '1、不选择小程序则还复制到SKU对应小程序<br />';
$this->html(Alert::make($info, '注意事项')->warning());
$this->disableResetButton();
$this->textarea('sku_ids', '已勾选SKUID')->attribute('id', 'batch-ids'); //批量选择的行的id通过隐藏元素 提交时一并传递过去
$appMap = ShopMerchantService::getAppCodeIdNameMap();
$this->select('code_id', __('小程序'))->placeholder('请选择复制到哪个小程序')->options($appMap)->help('如果不选择小程序,则还是复制到当前小程序');
$this->text('original_text', '替换前')->placeholder('多个被替换关键词用竖杠 | 隔开。例如:洁柔|维达')->help('例如将SKU标题中品牌名称替换成另一个品牌名称,不填则不替换。');
$this->text('modified_text', '替换后')->placeholder('填写需要被替换成的关键词')->help('如果不填,则是将文字替换为空');
}
public function handle(array $input)
{
$skuIds = $input['sku_ids'];
$skuIdsArray = clean_ids($skuIds, true);
if (! $skuIdsArray) {
return $this->response()->error('请选择至少一个SKU')->refresh();
}
$codeId = $input['code_id'] ?? '';
$originalText = explode('|', $input['original_text']);
$modifiedText = $input['modified_text'] ?? '';
// 复制数据
$newIds = [];
foreach ($skuIdsArray as $primaryId) {
$qb = ShopSku::find($primaryId)->replicate(['online_status', 'sale_num']);
if ($codeId) {
$qb->code_id = $codeId;
}
if ($originalText) {
$qb->title = str_replace($originalText, $modifiedText, $qb->title);
}
$qb->save();
$newIds[] = $qb->id;
}
// 返回响应结果并刷新页面
$newIdsString = implode(',', $newIds);
return $this->response()->alert(true)->success('批量复制成功。新ID:')->detail($newIdsString)->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms;
use App\Common\Util;
use App\Models\Group\GroupMessageRecordModel;
use App\Models\Group\GroupModel;
use App\Service\Alipay\AlipayGroupService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class SendGroupMsgForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('group_ids', '已勾选群组ID')->attribute('id', 'batch-ids')->help('如果未指定群组ID,则发送所有群组!');
$this->text('title', '消息名称')->default('粉丝福利')->help('只供商家区分消息,消费者看不到~')->required();
$this->radio('msg_type', '消息类型')
->when(GroupMessageRecordModel::MSG_TYPE_TEXT, function (Form $form) {
$form->textarea('text_content', '消息内容')->rules('required_if:msg_type,1')->setLabelClass(['asterisk']);
})
->when(GroupMessageRecordModel::MSG_TYPE_IMAGE, function (Form $form) {
$form->image('image_image', '消息图片')->accept('jpg,png')->uniqueName()->autoUpload()->retainable()->removable(false)->rules('required_if:msg_type,2')->setLabelClass(['asterisk'])->help('支持jpg、png格式,大小1Mb以内');
$form->number('image_width', '图片宽度')->rules('required_if:msg_type,2')->setLabelClass(['asterisk'])->help('图片宽,请必须传图片真实的宽,否则客户端会按照填的宽高进行剪裁');
$form->number('image_height', '图片高度')->rules('required_if:msg_type,2')->setLabelClass(['asterisk'])->help('图片高度,请必须传图片真实的高度,否则客户端会按照填的宽高进行剪裁');
})
->when(GroupMessageRecordModel::MSG_TYPE_LINK, function (Form $form) {
$form->text('link_title', '消息标题')->maxLength(23)->rules('required_if:msg_type,3')->setLabelClass(['asterisk'])->help('消息标题,c侧消息展示的标题');
$form->text('link_desc', '消息描述')->maxLength(64)->rules('required_if:msg_type,3')->setLabelClass(['asterisk']);
$form->text('link_url', '消息跳转地址')->maxLength(1024)->rules('required_if:msg_type,3')->setLabelClass(['asterisk'])->help('消息跳转地址,输入alipays:// 或者 https://的链接。例如:alipays://platformapi/startapp?appId=xxx&url=xxx');
$form->image('link_image', '消息图片')->accept('jpg,png')->uniqueName()->autoUpload()->retainable()->removable(false)->rules('required_if:msg_type,3')->setLabelClass(['asterisk'])->help('支持jpg、png格式,图片宽高1:1,大小1Mb以内');
})
->when(GroupMessageRecordModel::MSG_TYPE_APP, function (Form $form) {
$form->text('app_title', '群消息标题')->maxLength(28)->rules('required_if:msg_type,4')->setLabelClass(['asterisk'])->help('推送的消息文案标题(参考:好物分享来咯!)');
$form->text('app_desc', '群消息描述')->maxLength(34)->rules('required_if:msg_type,4')->setLabelClass(['asterisk'])->help('对推送商品的简单介绍(参考:美妆好物应有尽有,快戳进来看看呀)');
$form->text('app_url', '群消息跳转链接')->maxLength(512)->rules('required_if:msg_type,4')->setLabelClass(['asterisk'])->help('自定义链接或小程序页面链接(自定义链接请输入http,https或alipays开头的链接),例如:alipays://platformapi/startapp?appId=2021***&page=pages%2Findex%2Findex');
$form->text('app_tiny_app_id', '应用id')->maxLength(16)->rules('required_if:msg_type,4')->setLabelClass(['asterisk'])->help('小程序appId。用于入群欢迎语在群里展示');
$form->image('app_image', '消息图片')->accept('jpg,png')->uniqueName()->autoUpload()->retainable()->removable(false)->rules('required_if:msg_type,4')->setLabelClass(['asterisk'])->help('支持jpg、png格式,图片尺寸:202*160,大小1M以内');
})
->options(GroupMessageRecordModel::MSG_TYPE_MAP)
->default(GroupMessageRecordModel::MSG_TYPE_TEXT)
->required();
$this->switch('at_all', '是否@所有人')->help('同一群组每周仅允许发送一条@所有人的消息!请慎重勾选');
}
public function handle(array $input)
{
$title = $input['title'];
$msgType = $input['msg_type'];
$groupIds = $input['group_ids'];
$atAll = $input['at_all'];
$groupIdsArray = clean_ids($groupIds, true);
$qb = GroupModel::query();
if ($groupIdsArray) {
$qb->whereIn('id', $groupIdsArray);
}
$groups = $qb->get()->toArray();
foreach ($groups as $v) {
try {
$channel = $v['channel'];
$msgData = [];
switch ($msgType) {
case GroupMessageRecordModel::MSG_TYPE_TEXT:
$textContent = $input['text_content'];
$msgData = [
'msg_type' => 'TEXT',
'text_msg_content' => [
'content' => $textContent,
],
];
break;
case GroupMessageRecordModel::MSG_TYPE_IMAGE:
$imageWidth = $input['image_width'];
$imageHeight = $input['image_height'];
$imageImage = $input['image_image'];
$imageImageFullUrl = Util::getImgUrl($imageImage);
$service = new AlipayGroupService($channel, false);
$imageImageId = $service->uploadImage($imageImageFullUrl);
$msgData = [
'msg_type' => 'IMAGE',
'image_msg_content' => [
'image_id' => $imageImageId,
'width' => $imageWidth,
'height' => $imageHeight,
],
];
break;
case GroupMessageRecordModel::MSG_TYPE_LINK:
$linkTitle = $input['link_title'];
$linkDesc = $input['link_desc'];
$linkUrl = $input['link_url'];
$linkImage = $input['link_image'];
$linkImageFullUrl = Util::getImgUrl($linkImage);
$service = new AlipayGroupService($channel, false);
$linkImageId = $service->uploadImage($linkImageFullUrl);
$msgData = [
'msg_type' => 'LINK',
'link_msg_content' => [
'title' => $linkTitle,
'desc' => $linkDesc,
'url' => $linkUrl,
'image_id' => $linkImageId,
],
];
break;
case GroupMessageRecordModel::MSG_TYPE_APP:
$appTitle = $input['app_title'];
$appDesc = $input['app_desc'];
$appUrl = $input['app_url'];
$appTinyAppId = $input['app_tiny_app_id'];
$appImage = $input['app_image'];
$appImageFullUrl = Util::getImgUrl($appImage);
$service = new AlipayGroupService($channel, false);
$appImageId = $service->uploadImage($appImageFullUrl);
$msgData = [
'msg_type' => 'APP',
'tiny_app_msg_content' => [
'title' => $appTitle,
'desc' => $appDesc,
'url' => $appUrl,
'tiny_app_id' => $appTinyAppId,
'image_id' => $appImageId,
],
];
break;
}
// 插入记录
$groupMsgRecordModel = new GroupMessageRecordModel;
$groupMsgRecordModel->code_id = $v['code_id'];
$groupMsgRecordModel->channel = $channel;
$groupMsgRecordModel->title = $title;
$groupMsgRecordModel->msg_type = $msgType;
$groupMsgRecordModel->msg_data = $msgData;
$groupMsgRecordModel->group_id = $v['id'];
$groupMsgRecordModel->at_all = $atAll ?? false;
$groupMsgRecordModel->send_status = GroupMessageRecordModel::SEND_STATUS_WAIT;
$groupMsgRecordModel->err_msg = '';
$groupMsgRecordModel->save();
// 发送消息
$service = new AlipayGroupService($channel, false);
$result = $service->groupMsgSend([$v['alipay_group_id']], $title, $msgData, $atAll);
if ($result) {
$groupMsgRecordModel->send_status = GroupMessageRecordModel::SEND_STATUS_SUCCESS;
$groupMsgRecordModel->err_msg = '';
$groupMsgRecordModel->save();
}
} catch (\Exception $e) {
$groupMsgRecordModel->send_status = GroupMessageRecordModel::SEND_STATUS_FAIL;
$groupMsgRecordModel->err_msg = $e->getMessage() ? $e->getMessage() : '未知错误';
$groupMsgRecordModel->save();
}
}
return $this->response()->alert(true)->success('操作完成')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Service\Common\CommonAppConfigService;
use App\Service\Shop\ShopPointService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class AddPointForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('user_ids', '用户ID|支付宝UID')->placeholder('如:2200010106,2088702902958383')->help('用户ID或者支付宝UID,逗号等隔开,可以混填,自动识别')->required(); //批量选择的行的id通过隐藏元素 提交时一并传递过去
$appMap = CommonAppConfigService::getBrandCodeNameMap();
$this->select('channel', '出资小程序')->placeholder('请选择用哪个小程序赠送积分')->options($appMap)->required();
$this->number('point', '赠送积分')->min(1)->max(1000)->default(100)->help('单个循环赠送积分不能超过1000');
$this->number('count', '赠送次数')->min(1)->max(20)->default(1)->help('最多循环20次');
}
public function handle(array $input)
{
$userIds = $input['user_ids'];
$point = $input['point'];
$channel = $input['channel'];
$count = $input['count'];
if ($point > 1000 || $point < 1) {
return $this->response()->error('每次赠送积分需在1到1000分之间');
}
if ($count > 20 || $count < 1) {
return $this->response()->error('循环赠送次数不能超过20');
}
$userIds = clean_ids($userIds, true);
if (! $userIds) {
return $this->response()->error('至少填写一个用户ID|支付宝UID');
}
for ($i = 1; $i <= $count; $i++) {
foreach ($userIds as $userId) {
ShopPointService::customSendPoint($channel, $userId, $point);
}
}
return $this->response()->alert(true)->success('赠送积分成功')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Models\Common\SysConfig;
use App\Models\Shop\ShopProduct;
use App\Service\System\SystemConfigService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Alert;
use Dcat\Admin\Widgets\Form;
class AddSpecProductForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$info = '1、只能选择同一个小程序的商品<br />2、添加完成后去“系统配置”中检查一下是否正确';
$this->html(Alert::make($info, '注意事项')->warning());
$this->disableResetButton();
$this->textarea('product_ids', '准备合成多规格的商品ID')->attribute('id', 'batch-ids'); //批量选择的行的id通过隐藏元素 提交时一并传递过去
}
public function handle(array $input)
{
$productIds = $input['product_ids'];
$productIdsArray = clean_ids($productIds, true);
if (! $productIdsArray) {
return $this->response()->error('请选择至少一个商品')->refresh();
}
$productList = ShopProduct::whereIn('id', $productIdsArray)->select(['channel', 'id', 'sku_spec'])->get()->toArray();
$channels = array_column($productList, 'channel');
$channelCheck = count(array_unique($channels)) == 1;
if (! $channelCheck) {
return $this->response()->error('您所选择的商品来自不同小程序,无法创建多规格');
}
$channel = $channels[0];
$configName = 'shopProductSceneConfig_'.$channel;
$configInfo = SysConfig::where('name', $configName)->first();
if (! $configInfo) {
return $this->response()->error("此小程序还未在“系统配置”中创建多规格商品项【{$configName}】");
}
$configValue = $configInfo->value;
$configValue = json_decode($configValue, true);
ksort($configValue);
$newValue = [];
foreach ($productList as $item) {
$newValue['specList']['a'.$item['id']] = $item['sku_spec'];
}
$configValue[] = $newValue;
$configInfo->value = json_encode($configValue, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$result = $configInfo->save();
if (! $result) {
return $this->response()->error('添加多规格商品配置失败')->refresh();
}
$key = SystemConfigService::$SYSTEM_CONFIG_NAME.$configName;
app('redis')->setex($key, 3600, json_encode($configValue));
return $this->response()->success('添加多规格商品配置失败')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Models\Shop\ShopAlipayProduct;
use App\Service\Shop\AlipayProductService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class AlipayProductSyncBatchForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('product_ids', '商品ID (多个ID使用 逗号或空格或tab 连接')->placeholder('如:308043,308042的6位数编码')->attribute('id', 'batch-ids')->required(); //批量选择的行的id通过隐藏元素 提交时一并传递过去
$this->radio('push_type', '推送数据类型')->options(AlipayProductService::OPT_TYPE_MAP)->required();
$this->radio('page_model', '详情模式')->options(ShopAlipayProduct::PAGE_MODEL_MAP)->required()->help('官方[官方插件版详情页],自有[自定义详情页版]');
}
public function handle(array $input)
{
$productIds = $input['product_ids'];
$productIdsArray = clean_ids($productIds, true);
if (! $productIdsArray) {
return $this->response()->error('请选择至少一个商品')->refresh();
}
$pushType = $input['push_type'];
$pageModel = $input['page_model'];
$isAsync = true; // 是否异步推送
if (! in_array($pushType, AlipayProductService::OPT_TYPE_LIST)) {
return $this->response()->error('推送数据类型不正确');
}
$tip = AlipayProductService::OPT_TYPE_MAP[$pushType];
try {
foreach ($productIdsArray as $productId) {
AlipayProductService::pushProductToAlipay($productId, $pushType, $pageModel, $isAsync);
}
} catch (\Exception $e) {
return $this->response()->error("推送[{$tip}]到支付宝商品库失败:".$e->getMessage());
}
return $this->response()->alert(true)->success("推送[{$tip}]到支付宝商品库完成,请稍后查看推送情况")->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class CopyOrderIdsForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('order_ids', '订单号')->attribute('id', 'batch-order-ids');
$this->disableSubmitButton();
$this->disableResetButton();
}
public function handle(array $input) {}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class CopySkuIdsForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('product_ids', '商品ID')->attribute('id', 'batch-ids');
$this->textarea('sku_ids', 'SKUID')->attribute('id', 'batch-sku-ids');
$this->disableSubmitButton();
$this->disableResetButton();
}
public function handle(array $input) {}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Models\Shop\ShopModule;
use App\Models\Shop\ShopProduct;
use Dcat\Admin\Admin;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Alert;
use Dcat\Admin\Widgets\Form;
class EditProductForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$info = '1、只修改想要修改的项,不填则不会修改,批量修改要非常小心<br />2、仅修改商品,不修改SKU信息';
$this->html(Alert::make($info, '注意事项')->warning());
$this->disableResetButton();
$this->textarea('product_ids', '已勾选商品ID')->attribute('id', 'batch-ids'); //批量选择的行的id通过隐藏元素 提交时一并传递过去
$this->select('alipay_cat_id_origin', '选择类目')->attribute(['id' => 'alipay_cat_id_origin'])->help('同一个小程序的商品才能选择支付宝类目,不同小程序只能手动在下方填写支付宝类目编号');
$this->text('alipay_cat_id', '支付宝类目')->attribute(['id' => 'alipay_cat_id']);
Admin::script(<<<'JS'
var productIds = $('#batch-ids').val();
$.ajax({
url: '/api/get-alipayitemcat',
method: 'post',
data: {product_ids: productIds},
success: function(data) {
var select = $('#alipay_cat_id_origin');
select.empty(); // 清空select
select.append('<option value="">请选择...</option>');
$.each(data, function(cat_id, cat_name) {
var option = '<option value="' + cat_id + '">' + cat_name + '</option>';
select.append(option); // 添加到select
});
}
});
$('#alipay_cat_id_origin').on('change', function() {
var sceneId = $('#alipay_cat_id_origin').val();
$('#alipay_cat_id').val(sceneId);
});
JS);
$this->text('pre_title', '标题前缀')->width(6);
$this->text('title', __('商品标题'))->width(6);
$this->currency('crossed_price', __('划线价'))->symbol('¥')->width(6);
$this->currency('mini_price', __('小程序价'))->symbol('¥')->width(6);
$this->currency('mini_coup_price', __('券后价'))->symbol('¥')->width(6);
$this->currency('delivery_fee', __('快递费'))->symbol('¥')->width(6);
$this->text('remark', __('备注'));
$this->number('point', '积分');
$this->radio('edit_module', '是否绑定模块')
->when(1, function (Form $form) {
$modMap = (new ShopModule())->getIdMap();
$form->checkbox('module_ids', __('商品绑定模块'))->options($modMap);
})
->options([
1 => '修改',
2 => '全部取消',
])
->default(1)->help('勾选了全部取消,则会取消掉商品中的模块绑定');
$this->radio('edit_selling_tag', '导购标签')
->when(1, function (Form $form) {
$form->checkbox('selling_tag', '导购标签')->options(ShopProduct::SELLING_TAG_MAP);
})
->options([
1 => '修改',
2 => '全部取消',
])
->default(1)->help('勾选了全部取消,则会取消掉商品中的导购标签');
$this->radio('edit_service_commitment', '修改服务承诺')
->when(1, function (Form $form) {
$form->checkbox('service_commitment', '服务承诺')->options(ShopProduct::SERVICE_COMMITMENT_MAP);
})
->options([
1 => '修改',
2 => '全部取消',
])
->default(1)->help('勾选了全部取消,则会取消掉商品中的服务承诺');
$onlineStatus = ShopProduct::ROW_STATUS_ONLINE_MAP;
// if (Admin::user()->isAdministrator()) {
// $onlineStatus = ShopProduct::ROW_STATUS_ONLINE_MAP;
// }
$this->select('row_status', __('小程序上架状态'))->options($onlineStatus)->width(6);
}
public function handle(array $input)
{
$productIds = $input['product_ids'];
$productIdsArray = clean_ids($productIds, true);
if (! $productIdsArray) {
return $this->response()->error('请选择至少一个商品')->refresh();
}
$data = [];
if ($input['alipay_cat_id']) {
$data['alipay_cat_id'] = trim($input['alipay_cat_id']);
}
if ($input['title']) {
$data['title'] = trim($input['title']);
}
if ($input['crossed_price']) {
$data['crossed_price'] = yuan_2_fen($input['crossed_price']);
}
if ($input['mini_price']) {
$data['mini_price'] = yuan_2_fen($input['mini_price']);
}
if ($input['mini_coup_price']) {
$data['mini_coup_price'] = yuan_2_fen($input['mini_coup_price']);
}
if ($input['delivery_fee']) {
$data['delivery_fee'] = yuan_2_fen($input['delivery_fee']);
}
if ($input['remark']) {
$data['remark'] = $input['remark'];
}
if ($input['point']) {
$data['point'] = $input['point'];
}
if ($input['row_status']) {
$data['row_status'] = $input['row_status'];
}
// 模块ID,数组转化成','连接的字符串
if ($input['module_ids'] && is_array($input['module_ids'])) {
$moduleIds = implode(',', $input['module_ids']);
$data['module_ids'] = strtolower($moduleIds);
}
if ($input['edit_module'] == 2) {
$data['module_ids'] = '';
}
// 导购标签ID,数组转化成','连接的字符串
if ($input['selling_tag'] && is_array($input['selling_tag'])) {
$moduleIds = implode(',', $input['selling_tag']);
$data['selling_tag'] = strtolower($moduleIds);
}
if ($input['edit_selling_tag'] == 2) {
$data['selling_tag'] = '';
}
// 服务承诺ID,数组转化成','连接的字符串
if ($input['service_commitment'] && is_array($input['service_commitment'])) {
$moduleIds = implode(',', $input['service_commitment']);
$data['service_commitment'] = strtolower($moduleIds);
}
if ($input['edit_service_commitment'] == 2) {
$data['service_commitment'] = '';
}
if (! $data && ! $input['pre_title']) {
return $this->response()->error('请至少修改一个内容');
}
if ($data) {
$res = ShopProduct::whereIn('id', $productIdsArray)->update($data);
if (! $res) {
return $this->response()->error('批量修改商品失败')->refresh();
}
}
// 为每个产品标题添加前缀
if ($input['pre_title']) {
$prefix = $input['pre_title'];
$products = ShopProduct::whereIn('id', $productIdsArray)->get();
foreach ($products as $product) {
$product->title = $prefix.$product->title;
$product->save();
}
}
return $this->response()->success('批量修改商品成功')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Models\Shop\ShopProduct;
use App\Models\Shop\ShopSku;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Alert;
use Dcat\Admin\Widgets\Form;
use Illuminate\Support\Facades\DB;
class EditSkuForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$info = '1、只修改想要修改的项,不填则不会修改,批量修改要非常小心<br />';
$this->html(Alert::make($info, '注意事项')->warning());
$this->disableResetButton();
$this->textarea('sku_ids', '已勾选SKUID')->attribute('id', 'batch-ids'); //批量选择的行的id通过隐藏元素 提交时一并传递过去
// $this->select('alipay_cat_id', '支付宝类目')->width(3)->options($cats);
$this->text('title', __('商品标题'))->width(6);
$this->text('remark', __('备注'))->width(6);
$this->currency('settle_price', __('供货价'))->symbol('¥')->width(6);
$this->currency('crossed_price', __('划线价'))->symbol('¥')->width(6);
$this->currency('guide_price', __('建议售价'))->symbol('¥')->width(6);
$this->text('stock', __('库存'))->width(6);
$this->select('online_status', __('上线状态'))->options(ShopSku::ONLINE_STATUS_ONLINE_MAP)->width(3);
}
public function handle(array $input)
{
$skuIds = $input['sku_ids'];
$skuIdsArray = clean_ids($skuIds, true);
if (! $skuIdsArray) {
return $this->response()->error('请选择至少一个SKU')->refresh();
}
$skuData = [];
$productData = [];
if ($input['title']) {
$skuData['title'] = $productData['title'] = trim($input['title']);
}
if ($input['remark']) {
$skuData['remark'] = trim($input['remark']); // 不同步到商品表
}
if ($input['settle_price']) {
$skuData['settle_price'] = $productData['settle_price'] = yuan_2_fen($input['settle_price']);
}
if ($input['crossed_price']) {
$skuData['crossed_price'] = $productData['crossed_price'] = yuan_2_fen($input['crossed_price']);
}
if ($input['guide_price']) {
$skuData['guide_price'] = $productData['guide_price'] = yuan_2_fen($input['guide_price']);
}
if (isset($input['stock']) && ($input['stock'] >= 0)) {
$skuData['stock'] = $productData['stock'] = (int) $input['stock'];
}
if ($input['online_status']) {
$skuData['online_status'] = $productData['sku_status'] = (int) $input['online_status'];
}
if (! $skuData) {
return $this->response()->error('请至少修改一个内容');
}
DB::beginTransaction();
try {
ShopSku::whereIn('id', $skuIdsArray)->update($skuData);
ShopProduct::whereIn('sku_id', $skuIdsArray)->update($productData);
DB::commit();
} catch (\Exception $e) {
DB::rollBack();
return $this->response()->error('批量修改SKU失败!');
}
// 如果修改了库存,需要批量修改redis中对应的库存
if (isset($input['stock']) && ($input['stock'] >= 0)) {
foreach ($skuIdsArray as $skuId) {
$key = "kv:shop:product_stock_$skuId";
app('redis')->del($key);
}
}
return $this->response()->success('批量修改SKU成功')->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Service\Shop\ShopService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class ManualAddProductForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('sku_ids', 'SKU ID (多个ID使用 逗号或空格或tab 连接')->placeholder('如:56123,56125')->attribute('id', 'batch-ids')->required(); //批量选择的行的id通过隐藏元素 提交时一并传递过去
$this->text('remark', __('批量备注'))->width('400px')->default('');
$this->text('rank', __('排序权重'))->width('200px')->default(10);
}
public function handle(array $input)
{
$skuIds = $input['sku_ids'];
$rank = $input['rank'];
$remark = trim($input['remark']);
if ($rank < 1) {
$rank = 10;
}
$skuIds = clean_ids($skuIds, true);
$errMsg = [];
foreach ($skuIds as $k => $skuId) {
if ($skuId < 10000) {
$errMsg[] = "skuID错误($skuId)";
unset($skuIds[$k]);
}
}
if (! $skuIds) {
return $this->response()->error('skuID不能为空')->refresh();
}
$newProductIds = [];
foreach ($skuIds as $skuId) {
$newProductIds[] = ShopService::fetchAndSaveProductInfo($skuId, $rank, $remark);
}
$newProductIdsString = implode(',', $newProductIds);
return $this->response()->alert(true)->success('添加商品成功。新ID:')->detail($newProductIdsString)->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Service\Common\CommonAppConfigService;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class MiniClearCacheForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->select('channel', __('小程序'))->options(CommonAppConfigService::getBrandCodeNameMap())->width(4)->required();
}
public function handle(array $input)
{
$channel = $input['channel'];
if (! $channel) {
return $this->response()->error('不能清空配置(请选择小程序)')->refresh();
}
$res = CommonAppConfigService::clearAppConfCache($channel);
return $this->response()->success("清空配置成功 ($channel) ($res)")->refresh();
}
}
<?php
namespace App\Admin\Extensions\ToolBar\Forms\Shop;
use App\Models\Shop\ShopOrderRefund;
use App\Models\Shop\ShopSubOrder;
use App\Service\Shop\ShopService;
use Dcat\Admin\Admin;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class OrderRefundApplyForm extends Form implements LazyRenderable
{
use LazyWidget;
public function form()
{
$this->textarea('orderId', __('订单号'))->placeholder('请添加订单号,多个单号请换行,一行一个')->rows(8)->required();
// $this->text('subOrderId', __('子订单号'))->width('200px')->required();
$this->radio('reasonId', __('退款原因ID'))->options(ShopOrderRefund::REFUND_REASON_ID_MAP)->required();
$this->text('detail', __('退款说明'))->default('');
}
public function handle(array $input)
{
if (! Admin::user()->inRoles(['administrator', 'adminNormal', 'operatorAdmin'])) {
return $this->response()->error('抱歉,您没有权限操作~');
}
$orderId = $input['orderId'];
// $subOid = $input['subOrderId'];
$reasonId = $input['reasonId'];
$detail = $input['detail'];
if (! $orderId) {
return $this->response()->error('订单号不能为空');
}
$orderIds = clean_ids($orderId, true);
if (count($orderIds) <= 0) {
return $this->response()->error('订单号不能为空')->refresh();
}
if ($reasonId < 100) {
return $this->response()->error('退款原因ID不正确');
}
if (! $detail) {
return $this->response()->error('退款说明不能为空');
}
$orderList = (new ShopSubOrder())->getListByOrdIds($orderIds, ['id', 'order_id']);
// 批量申请退款
foreach ($orderList as $v) {
$flag = ShopOrderRefund::where('order_id', $v['order_id'])->exists();
if ($flag) {
continue;
}
try {
ShopService::applyRefund($v['id'], $reasonId, $detail);
} catch (\Exception $e) {
return $this->response()->error("申请错误。订单号[{$v['order_id']}]:".($e->getMessage()));
}
}
return $this->response()->success('退款申请已提交')->refresh();
}
}
<?php
namespace App\Admin\Renderable;
use App\Models\DrugModel;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;
class DrugTable extends LazyRenderable
{
public function grid(): Grid
{
return Grid::make(new DrugModel(), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable();
$grid->column('name', '药品名称');
$grid->column('code', '简码');
$grid->column('unit', '单位');
$grid->column('is_rx', '处方药')->using(DrugModel::RX_MAP);
$grid->column('spec', '规格');
$grid->column('dosage_form', 'dosage_form');
$grid->column('factory', '生产厂家');
$grid->column('approval_no', '批准文号');
$grid->column('limit_buy_7', '7天限购');
// 复杂搜索
$grid->filter(function (Grid\Filter $filter) {
$filter->panel(); // 更改为 panel 布局
$filter->expand(); // 默认展开搜索框
$filter->like('name', '药品名称')->width(3);
$filter->like('code', '简码')->width(3);
$filter->like('factory', '生产厂家')->width(3);
});
// 行按钮控制
$grid->paginate(10);
$grid->disableActions();
});
}
}
<?php
namespace App\Admin\Repositories;
use App\Models\PharmacyDrugModel as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class PharmacyDrugRepository extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}
<?php
namespace App\Admin\Repositories;
use App\Models\PrescriptionLogModel as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class PrescriptionLogRepository extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}
<?php
namespace App\Admin\Repositories;
use App\Models\PrescriptionModel as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class PrescriptionRepository extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}
...@@ -15,34 +15,49 @@ ...@@ -15,34 +15,49 @@
$router->get('/', 'HomeController@index'); $router->get('/', 'HomeController@index');
/** 平台菜单-start **/ /** 平台菜单-start **/
// 药品 // 药品-诊断
$router->resource('drug', 'DrugController');
// 诊断
$router->resource('diagnosi', 'DiagnosiController'); $router->resource('diagnosi', 'DiagnosiController');
// 问诊人 // 药品-药品
$router->resource('drug', 'DrugController');
// 药品-标签
$router->resource('tag', 'TagController');
// 问诊-问诊人
$router->resource('patient', 'PatientController'); $router->resource('patient', 'PatientController');
// 问诊问题 // 问诊-问诊问题
$router->resource('inquiry', 'InquiryController'); $router->resource('inquiry', 'InquiryController');
// 医师
// 医师-医师
$router->resource('doctor', 'DoctorController'); $router->resource('doctor', 'DoctorController');
// 药店 // 医师-医师纠错
$router->resource('doctor-correction', 'DoctorCorrectionController');
// 药店-药店列表
$router->resource('pharmacy', 'PharmacyController'); $router->resource('pharmacy', 'PharmacyController');
// 药师 // 药店-药
$router->resource('pharmacist', 'PharmacistController'); $router->resource('pharmacist', 'PharmacistController');
// 标签 // 药店-药店纠错
$router->resource('tag', 'TagController');
//医师纠错
$router->resource('doctor-correction', 'DoctorCorrectionController');
//药店纠错
$router->resource('pharmacy-correction', 'PharmacyCorrectionController'); $router->resource('pharmacy-correction', 'PharmacyCorrectionController');
// 设置
// 处方-处方列表
$router->resource('prescription', 'PrescriptionController');
// 处方-处方日志
$router->resource('prescription-log', 'PrescriptionLogController');
// 系统-设置
$router->resource('site-config', 'SiteConfigController'); $router->resource('site-config', 'SiteConfigController');
// 导入日志 // 导入日志
$router->resource('/import-log', 'Common\ImportLogController')->names('import-log'); $router->resource('/import-log', 'Common\ImportLogController')->names('import-log');
/** 平台菜单-end **/ /** 平台菜单-end **/
/** 药店菜单-start **/ /** 药店菜单-start **/
// 药品管理
$router->resource('pharmacy-drug', 'PharmacyDrugController');
// 处方打印
$router->resource('prescription-print', 'PrescriptionPrintController');
// 用法用量 // 用法用量
$router->resource('dosage', 'DosageController'); $router->resource('dosage', 'DosageController');
/** 药店菜单-end **/ /** 药店菜单-end **/
}); });
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class PharmacyDrugModel extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'pharmacy_drug';
public $fillable = ['pharmacy_id', 'drug_id'];
// 关联药品池
public function drug(): BelongsTo
{
return $this->belongsTo(DrugModel::class, 'drug_id', 'id');
}
// 关联用法用量
public function dosage(): BelongsTo
{
return $this->belongsTo(DosageModel::class, 'dosage_id', 'id');
}
// 关联药店
public function pharmacy(): BelongsTo
{
return $this->belongsTo(PharmacyModel::class, 'pharmacy_id', 'id');
}
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class PrescriptionLogModel extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'prescription_log';
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class PrescriptionModel extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'prescription';
}
...@@ -13,7 +13,7 @@ public function up(): void ...@@ -13,7 +13,7 @@ public function up(): void
{ {
Schema::create('dosage', function (Blueprint $table) { Schema::create('dosage', function (Blueprint $table) {
$table->comment('用法用量'); $table->comment('用法用量');
$table->id(); $table->bigIncrements('id');
$table->string('dosage_desc', 128)->comment('用法用量'); $table->string('dosage_desc', 128)->comment('用法用量');
$table->string('dosage_show')->comment('显示内容'); $table->string('dosage_show')->comment('显示内容');
$table->timestamps(); $table->timestamps();
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('prescription', function (Blueprint $table) {
$table->comment('处方单');
$table->bigIncrements('id');
$table->string('prescription_umber', 64)->nullable()->comment('处方单编号');
$table->tinyInteger('status')->comment('审方状态[0=待开方,1=待审方,2=审方成功]');
$table->string('patient_name', 50)->comment('问诊人姓名');
$table->integer('patient_age')->default(0)->comment('问诊人年龄');
$table->tinyInteger('patient_gender')->default(0)->comment('问诊人性别。[1=男性,2=女性,0=未知]');
$table->bigInteger('diagnosis_id')->default(0)->comment('诊断表ID');
$table->string('diagnosis_name')->nullable()->comment('诊断');
$table->text('inquiry_info')->comment('问诊问题');
$table->text('drug_info')->nullable()->comment('用药信息');
$table->bigInteger('doctor_id')->default(0)->comment('医师表ID');
$table->string('doctor_name', 50)->nullable()->comment('医师姓名');
$table->string('doctor_online_hospital_name', 128)->nullable()->comment('医师互联网医院名称');
$table->string('doctor_department', 128)->nullable()->comment('医师科室');
$table->string('doctor_title', 64)->nullable()->comment('医师职称');
$table->string('doctor_license_no', 30)->nullable()->comment('医师执照编号');
$table->bigInteger('pharmacy_id')->default(0)->comment('药店表ID');
$table->string('pharmacy_name', 64)->nullable()->comment('药店名称');
$table->bigInteger('pharmacist_id')->default(0)->comment('药师表ID');
$table->string('pharmacist_name', 50)->nullable()->comment('药师姓名');
$table->string('pharmacist_license_number', 32)->nullable()->comment('药师执照编号');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('prescription');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('prescription_log', function (Blueprint $table) {
$table->comment('处方日志');
$table->bigIncrements('id');
$table->bigInteger('pharmacy_id')->comment('药店ID');
$table->string('pharmacy_name')->comment('药店名称');
$table->text('log_info')->comment('日志描述');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('prescription_log');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('pharmacy_drug', function (Blueprint $table) {
$table->comment('药店药品');
$table->bigIncrements('id');
$table->bigInteger('pharmacy_id')->comment('药店ID');
$table->bigInteger('drug_id')->comment('药品池ID');
$table->bigInteger('dosage_id')->default(0)->comment('用法用量表ID');
$table->string('batch_no', 64)->nullable()->comment('批次号');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pharmacy_drug');
}
};
...@@ -34,86 +34,86 @@ public function run() ...@@ -34,86 +34,86 @@ public function run()
[ [
'id' => 2, 'id' => 2,
'parent_id' => 0, 'parent_id' => 0,
'order' => 26, 'order' => 28,
'title' => '权限管理', 'title' => '权限管理',
'icon' => 'feather icon-settings', 'icon' => 'feather icon-settings',
'uri' => null, 'uri' => null,
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 3, 'id' => 3,
'parent_id' => 2, 'parent_id' => 2,
'order' => 27, 'order' => 29,
'title' => '管理员', 'title' => '管理员',
'icon' => null, 'icon' => null,
'uri' => 'auth/users', 'uri' => 'auth/users',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 4, 'id' => 4,
'parent_id' => 2, 'parent_id' => 2,
'order' => 28, 'order' => 30,
'title' => '角色', 'title' => '角色',
'icon' => null, 'icon' => null,
'uri' => 'auth/roles', 'uri' => 'auth/roles',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 5, 'id' => 5,
'parent_id' => 2, 'parent_id' => 2,
'order' => 29, 'order' => 31,
'title' => '权限', 'title' => '权限',
'icon' => null, 'icon' => null,
'uri' => 'auth/permissions', 'uri' => 'auth/permissions',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 6, 'id' => 6,
'parent_id' => 2, 'parent_id' => 2,
'order' => 30, 'order' => 32,
'title' => '菜单', 'title' => '菜单',
'icon' => null, 'icon' => null,
'uri' => 'auth/menu', 'uri' => 'auth/menu',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 7, 'id' => 7,
'parent_id' => 2, 'parent_id' => 2,
'order' => 31, 'order' => 33,
'title' => '扩展', 'title' => '扩展',
'icon' => null, 'icon' => null,
'uri' => 'auth/extensions', 'uri' => 'auth/extensions',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:11', 'created_at' => '2024-11-03 02:13:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 8, 'id' => 8,
'parent_id' => 2, 'parent_id' => 2,
'order' => 32, 'order' => 34,
'title' => '操作日志', 'title' => '操作日志',
'icon' => 'fa-500px', 'icon' => 'fa-500px',
'uri' => 'auth/operation-logs', 'uri' => 'auth/operation-logs',
'extension' => 'dcat-admin.operation-log', 'extension' => 'dcat-admin.operation-log',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 02:13:40', 'created_at' => '2024-11-03 02:13:40',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 9, 'id' => 9,
...@@ -265,11 +265,11 @@ public function run() ...@@ -265,11 +265,11 @@ public function run()
'order' => 17, 'order' => 17,
'title' => '处方列表', 'title' => '处方列表',
'icon' => null, 'icon' => null,
'uri' => null, 'uri' => 'prescription',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:34:59', 'created_at' => '2024-11-03 23:34:59',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:37:51',
], ],
[ [
'id' => 22, 'id' => 22,
...@@ -277,83 +277,83 @@ public function run() ...@@ -277,83 +277,83 @@ public function run()
'order' => 18, 'order' => 18,
'title' => '处方日志', 'title' => '处方日志',
'icon' => null, 'icon' => null,
'uri' => null, 'uri' => 'prescription-log',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:35:09', 'created_at' => '2024-11-03 23:35:09',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:37:59',
], ],
[ [
'id' => 23, 'id' => 23,
'parent_id' => 0, 'parent_id' => 0,
'order' => 20, 'order' => 21,
'title' => '药品', 'title' => '药品',
'icon' => 'fa-book', 'icon' => 'fa-book',
'uri' => null, 'uri' => null,
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:38:11', 'created_at' => '2024-11-03 23:38:11',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 24, 'id' => 24,
'parent_id' => 23, 'parent_id' => 23,
'order' => 21, 'order' => 22,
'title' => '药品管理', 'title' => '药品管理',
'icon' => null, 'icon' => null,
'uri' => null, 'uri' => 'pharmacy-drug',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:38:19', 'created_at' => '2024-11-03 23:38:19',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 25, 'id' => 25,
'parent_id' => 0, 'parent_id' => 0,
'order' => 22, 'order' => 23,
'title' => '用法', 'title' => '用法',
'icon' => 'fa-briefcase', 'icon' => 'fa-briefcase',
'uri' => null, 'uri' => null,
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:38:57', 'created_at' => '2024-11-03 23:38:57',
'updated_at' => '2024-11-06 16:21:16', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 26, 'id' => 26,
'parent_id' => 25, 'parent_id' => 25,
'order' => 23, 'order' => 24,
'title' => '用法用量', 'title' => '用法用量',
'icon' => null, 'icon' => null,
'uri' => 'dosage', 'uri' => 'dosage',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:39:10', 'created_at' => '2024-11-03 23:39:10',
'updated_at' => '2024-11-10 16:16:37', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 27, 'id' => 27,
'parent_id' => 0, 'parent_id' => 0,
'order' => 24, 'order' => 25,
'title' => '处方', 'title' => '处方',
'icon' => 'fa-print', 'icon' => 'fa-print',
'uri' => null, 'uri' => null,
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:39:30', 'created_at' => '2024-11-03 23:39:30',
'updated_at' => '2024-11-06 16:22:57', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 28, 'id' => 28,
'parent_id' => 27, 'parent_id' => 27,
'order' => 25, 'order' => 26,
'title' => '处方列表', 'title' => '处方列表',
'icon' => null, 'icon' => null,
'uri' => null, 'uri' => 'pharmacy-prescription',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-03 23:39:39', 'created_at' => '2024-11-03 23:39:39',
'updated_at' => '2024-11-06 16:23:11', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 29, 'id' => 29,
...@@ -406,26 +406,26 @@ public function run() ...@@ -406,26 +406,26 @@ public function run()
[ [
'id' => 33, 'id' => 33,
'parent_id' => 27, 'parent_id' => 27,
'order' => 33, 'order' => 27,
'title' => '处方日志', 'title' => '处方日志',
'icon' => null, 'icon' => null,
'uri' => null, 'uri' => 'pharmacy-prescription-log',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-06 16:23:22', 'created_at' => '2024-11-06 16:23:22',
'updated_at' => '2024-11-06 16:23:22', 'updated_at' => '2024-11-10 23:38:06',
], ],
[ [
'id' => 34, 'id' => 34,
'parent_id' => 32, 'parent_id' => 32,
'order' => 34, 'order' => 20,
'title' => '设置', 'title' => '设置',
'icon' => null, 'icon' => null,
'uri' => 'site-config', 'uri' => 'site-config',
'extension' => '', 'extension' => '',
'show' => 1, 'show' => 1,
'created_at' => '2024-11-06 16:23:54', 'created_at' => '2024-11-06 16:23:54',
'updated_at' => '2024-11-10 16:21:59', 'updated_at' => '2024-11-10 23:38:06',
], ],
] ]
); );
......
...@@ -106,6 +106,24 @@ ...@@ -106,6 +106,24 @@
* @property Grid\Column|Collection lat * @property Grid\Column|Collection lat
* @property Grid\Column|Collection pharmacy_id * @property Grid\Column|Collection pharmacy_id
* @property Grid\Column|Collection pharmacy_name * @property Grid\Column|Collection pharmacy_name
* @property Grid\Column|Collection drug_id
* @property Grid\Column|Collection dosage_id
* @property Grid\Column|Collection batch_no
* @property Grid\Column|Collection prescription_umber
* @property Grid\Column|Collection patient_name
* @property Grid\Column|Collection patient_age
* @property Grid\Column|Collection patient_gender
* @property Grid\Column|Collection diagnosis_id
* @property Grid\Column|Collection diagnosis_name
* @property Grid\Column|Collection inquiry_info
* @property Grid\Column|Collection drug_info
* @property Grid\Column|Collection doctor_online_hospital_name
* @property Grid\Column|Collection doctor_department
* @property Grid\Column|Collection doctor_license_no
* @property Grid\Column|Collection pharmacist_id
* @property Grid\Column|Collection pharmacist_name
* @property Grid\Column|Collection pharmacist_license_number
* @property Grid\Column|Collection log_info
* @property Grid\Column|Collection tag_name * @property Grid\Column|Collection tag_name
* @property Grid\Column|Collection email_verified_at * @property Grid\Column|Collection email_verified_at
* *
...@@ -204,6 +222,24 @@ ...@@ -204,6 +222,24 @@
* @method Grid\Column|Collection lat(string $label = null) * @method Grid\Column|Collection lat(string $label = null)
* @method Grid\Column|Collection pharmacy_id(string $label = null) * @method Grid\Column|Collection pharmacy_id(string $label = null)
* @method Grid\Column|Collection pharmacy_name(string $label = null) * @method Grid\Column|Collection pharmacy_name(string $label = null)
* @method Grid\Column|Collection drug_id(string $label = null)
* @method Grid\Column|Collection dosage_id(string $label = null)
* @method Grid\Column|Collection batch_no(string $label = null)
* @method Grid\Column|Collection prescription_umber(string $label = null)
* @method Grid\Column|Collection patient_name(string $label = null)
* @method Grid\Column|Collection patient_age(string $label = null)
* @method Grid\Column|Collection patient_gender(string $label = null)
* @method Grid\Column|Collection diagnosis_id(string $label = null)
* @method Grid\Column|Collection diagnosis_name(string $label = null)
* @method Grid\Column|Collection inquiry_info(string $label = null)
* @method Grid\Column|Collection drug_info(string $label = null)
* @method Grid\Column|Collection doctor_online_hospital_name(string $label = null)
* @method Grid\Column|Collection doctor_department(string $label = null)
* @method Grid\Column|Collection doctor_license_no(string $label = null)
* @method Grid\Column|Collection pharmacist_id(string $label = null)
* @method Grid\Column|Collection pharmacist_name(string $label = null)
* @method Grid\Column|Collection pharmacist_license_number(string $label = null)
* @method Grid\Column|Collection log_info(string $label = null)
* @method Grid\Column|Collection tag_name(string $label = null) * @method Grid\Column|Collection tag_name(string $label = null)
* @method Grid\Column|Collection email_verified_at(string $label = null) * @method Grid\Column|Collection email_verified_at(string $label = null)
*/ */
...@@ -307,6 +343,24 @@ class MiniGrid extends Grid {} ...@@ -307,6 +343,24 @@ class MiniGrid extends Grid {}
* @property Show\Field|Collection lat * @property Show\Field|Collection lat
* @property Show\Field|Collection pharmacy_id * @property Show\Field|Collection pharmacy_id
* @property Show\Field|Collection pharmacy_name * @property Show\Field|Collection pharmacy_name
* @property Show\Field|Collection drug_id
* @property Show\Field|Collection dosage_id
* @property Show\Field|Collection batch_no
* @property Show\Field|Collection prescription_umber
* @property Show\Field|Collection patient_name
* @property Show\Field|Collection patient_age
* @property Show\Field|Collection patient_gender
* @property Show\Field|Collection diagnosis_id
* @property Show\Field|Collection diagnosis_name
* @property Show\Field|Collection inquiry_info
* @property Show\Field|Collection drug_info
* @property Show\Field|Collection doctor_online_hospital_name
* @property Show\Field|Collection doctor_department
* @property Show\Field|Collection doctor_license_no
* @property Show\Field|Collection pharmacist_id
* @property Show\Field|Collection pharmacist_name
* @property Show\Field|Collection pharmacist_license_number
* @property Show\Field|Collection log_info
* @property Show\Field|Collection tag_name * @property Show\Field|Collection tag_name
* @property Show\Field|Collection email_verified_at * @property Show\Field|Collection email_verified_at
* *
...@@ -405,6 +459,24 @@ class MiniGrid extends Grid {} ...@@ -405,6 +459,24 @@ class MiniGrid extends Grid {}
* @method Show\Field|Collection lat(string $label = null) * @method Show\Field|Collection lat(string $label = null)
* @method Show\Field|Collection pharmacy_id(string $label = null) * @method Show\Field|Collection pharmacy_id(string $label = null)
* @method Show\Field|Collection pharmacy_name(string $label = null) * @method Show\Field|Collection pharmacy_name(string $label = null)
* @method Show\Field|Collection drug_id(string $label = null)
* @method Show\Field|Collection dosage_id(string $label = null)
* @method Show\Field|Collection batch_no(string $label = null)
* @method Show\Field|Collection prescription_umber(string $label = null)
* @method Show\Field|Collection patient_name(string $label = null)
* @method Show\Field|Collection patient_age(string $label = null)
* @method Show\Field|Collection patient_gender(string $label = null)
* @method Show\Field|Collection diagnosis_id(string $label = null)
* @method Show\Field|Collection diagnosis_name(string $label = null)
* @method Show\Field|Collection inquiry_info(string $label = null)
* @method Show\Field|Collection drug_info(string $label = null)
* @method Show\Field|Collection doctor_online_hospital_name(string $label = null)
* @method Show\Field|Collection doctor_department(string $label = null)
* @method Show\Field|Collection doctor_license_no(string $label = null)
* @method Show\Field|Collection pharmacist_id(string $label = null)
* @method Show\Field|Collection pharmacist_name(string $label = null)
* @method Show\Field|Collection pharmacist_license_number(string $label = null)
* @method Show\Field|Collection log_info(string $label = null)
* @method Show\Field|Collection tag_name(string $label = null) * @method Show\Field|Collection tag_name(string $label = null)
* @method Show\Field|Collection email_verified_at(string $label = null) * @method Show\Field|Collection email_verified_at(string $label = null)
*/ */
......
<?php
return [
'labels' => [
'PharmacyDrug' => '药品管理',
'pharmacy-drug' => '药品管理',
],
'fields' => [
'pharmacy_id' => '药店',
'drug_id' => '药品池',
'dosage_id' => '用法用量表',
'batch_no' => '批次号',
],
'options' => [
],
];
<?php
return [
'labels' => [
'PrescriptionLog' => '处方日志',
'prescription-log' => '处方日志',
],
'fields' => [
'pharmacy_id' => '药店ID',
'pharmacy_name' => '药店名称',
'log_info' => '日志描述',
],
'options' => [
],
];
<?php
return [
'labels' => [
'Prescription' => '处方',
'prescription' => '处方',
],
'fields' => [
'status' => '审方状态',
'patient_name' => '问诊人姓名',
'patient_age' => '问诊人年龄',
'patient_gender' => '问诊人性别',
'diagnosis_id' => '诊断表ID',
'diagnosis_name' => '诊断',
'inquiry_info' => '问诊问题',
'drug_info' => '用药信息',
'doctor_id' => '医师表ID',
'doctor_name' => '医师姓名',
'doctor_online_hospital_name' => '医师互联网医院名称',
'doctor_department' => '医师科室',
'doctor_title' => '医师职称',
'doctor_license_no' => '医师执照编号',
'pharmacy_id' => '药店表ID',
'pharmacy_name' => '药店名称',
'pharmacist_id' => '药师表ID',
'pharmacist_name' => '药师姓名',
'pharmacist_license_number' => '药师执照编号',
'prescription_umber' => '处方单编号',
],
'options' => [
],
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment