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
27bf24e5
authored
Nov 24, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加筛选和状态显示
parent
24961383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
app/Admin/Controllers/PrescriptionController.php
+1
-1
app/Models/PrescriptionModel.php
+10
-3
No files found.
app/Admin/Controllers/PrescriptionController.php
View file @
27bf24e5
...
...
@@ -30,7 +30,7 @@ protected function grid()
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
column
(
'id'
,
'处方单编号'
)
->
sortable
();
$grid
->
column
(
'status'
)
->
using
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
);
$grid
->
column
(
'status'
)
->
using
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
)
->
badge
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP_COLOR
)
;
$grid
->
column
(
'patient_name'
);
$grid
->
column
(
'patient_age'
);
$grid
->
column
(
'patient_gender'
)
->
using
(
PatientModel
::
SEX_MAP
);
...
...
app/Models/PrescriptionModel.php
View file @
27bf24e5
...
...
@@ -35,6 +35,13 @@ class PrescriptionModel extends Model
self
::
PRESCRIPTION_STATUS_SUCCESS
=>
'审方成功'
,
];
// 审方状态-文字映射
const
PRESCRIPTION_STATUS_MAP_COLOR
=
[
self
::
PRESCRIPTION_STATUS_PENDING
=>
'info'
,
self
::
PRESCRIPTION_STATUS_REVIEWING
=>
'warning'
,
self
::
PRESCRIPTION_STATUS_SUCCESS
=>
'success'
,
];
// 开方来源[0=客开,1=店开]
const
OPEN_SOURCE_CUSTOMER
=
0
;
...
...
@@ -63,15 +70,15 @@ class PrescriptionModel extends Model
self
::
IS_VOIDED_TRUE
=>
'danger'
,
];
// 作废状态[0=
否,1=是
]
// 作废状态[0=
未作废,1=作废
]
const
IS_VOIDED_FALSE
=
0
;
const
IS_VOIDED_TRUE
=
1
;
// 作废状态-文字映射
const
IS_VOIDED_MAP
=
[
self
::
IS_VOIDED_FALSE
=>
'
否
'
,
self
::
IS_VOIDED_TRUE
=>
'
是
'
,
self
::
IS_VOIDED_FALSE
=>
'
未作废
'
,
self
::
IS_VOIDED_TRUE
=>
'
作废
'
,
];
// 作废状态-颜色映射
...
...
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