Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3346b0dd
authored
Dec 23, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标题调整
parent
50a7d574
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
app/Admin/Controllers/PharmacyExternalPrescriptionController.php
+21
-20
No files found.
app/Admin/Controllers/PharmacyExternalPrescriptionController.php
View file @
3346b0dd
...
...
@@ -29,24 +29,25 @@ protected function grid()
if
(
!
Admin
::
user
()
->
pharmacy_id
)
{
admin_exit
(
Content
::
make
()
->
withError
(
trans
(
'admin.deny'
)));
}
$grid
->
setName
(
'580处方单'
);
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
model
()
->
where
(
'pharmacy_id'
,
Admin
::
user
()
->
pharmacy_id
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'external_prescription_id'
);
$grid
->
column
(
'issue_at'
)
->
sortable
();
$grid
->
column
(
'status'
);
$grid
->
column
(
'company_name'
);
$grid
->
column
(
'pharmacy_name'
);
$grid
->
column
(
'external_prescription_id'
,
'580处方单编号'
);
$grid
->
column
(
'issue_at'
,
'处方开具时间'
)
->
sortable
();
$grid
->
column
(
'status'
,
'状态'
);
$grid
->
column
(
'company_name'
,
'企业名称'
);
$grid
->
column
(
'pharmacy_name'
,
'药店名称'
);
// $grid->column('pharmacy_id');
$grid
->
column
(
'agent'
);
$grid
->
column
(
'patient_name'
);
$grid
->
column
(
'patient_mobile'
);
$grid
->
column
(
'patient_gender'
)
->
using
(
ExternalPrescriptionModel
::
SEX_MAP
);
$grid
->
column
(
'patient_age'
);
$grid
->
column
(
'patient_id_card'
);
$grid
->
column
(
'doctor_name'
);
$grid
->
column
(
'diagnosis'
);
$grid
->
column
(
'drug_info'
)
->
display
(
function
(
$drugInfoJson
)
{
$grid
->
column
(
'agent'
,
'会员/代理人'
);
$grid
->
column
(
'patient_name'
,
'就诊人姓名'
);
$grid
->
column
(
'patient_mobile'
,
'就诊人手机号'
);
$grid
->
column
(
'patient_gender'
,
'就诊人性别'
)
->
using
(
ExternalPrescriptionModel
::
SEX_MAP
);
$grid
->
column
(
'patient_age'
,
'就诊人年龄'
);
$grid
->
column
(
'patient_id_card'
,
'就诊人身份证号'
);
$grid
->
column
(
'doctor_name'
,
'接诊医师姓名'
);
$grid
->
column
(
'diagnosis'
,
'诊断'
);
$grid
->
column
(
'drug_info'
,
'用药信息'
)
->
display
(
function
(
$drugInfoJson
)
{
// 尝试将 $drugInfoJson 解码为数组
$drugInfoArray
=
json_decode
(
$drugInfoJson
,
true
);
// 检查解码是否成功且 $drugInfoArray 是一个数组
...
...
@@ -62,12 +63,12 @@ protected function grid()
return
$drugInfoJson
;
// 或者返回一个错误消息,如 'Invalid JSON'
}
})
->
label
();
// 设置列的标签
$grid
->
column
(
'pharmacist_name'
);
$grid
->
column
(
'review_at'
);
$grid
->
column
(
'pharmacist_attr'
);
$grid
->
column
(
'dispatcher'
);
$grid
->
column
(
'checker'
);
$grid
->
column
(
'dispenser'
);
$grid
->
column
(
'pharmacist_name'
,
'审核药师'
);
$grid
->
column
(
'review_at'
,
'审核时间'
);
$grid
->
column
(
'pharmacist_attr'
,
'药师属性'
);
$grid
->
column
(
'dispatcher'
,
'调配人'
);
$grid
->
column
(
'checker'
,
'核对人'
);
$grid
->
column
(
'dispenser'
,
'发药人'
);
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
// 工具栏普通按钮
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment