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
f5ac9356
authored
Nov 24, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处方单增加筛选
parent
c08299e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/Admin/Controllers/PrescriptionController.php
+4
-0
app/Api/Controllers/InquiryController.php
+1
-1
app/Models/PrescriptionModel.php
+1
-1
No files found.
app/Admin/Controllers/PrescriptionController.php
View file @
f5ac9356
...
...
@@ -69,6 +69,7 @@ protected function grid()
// $grid->column('pharmacist_license_number');
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'is_abnormal'
)
->
using
([
0
=>
'否'
,
1
=>
'是'
]);
$grid
->
column
(
'is_voided'
)
->
using
(
PrescriptionModel
::
IS_VOIDED_MAP
);
// $grid->column('updated_at')->sortable();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
...
...
@@ -79,7 +80,10 @@ protected function grid()
$filter
->
like
(
'diagnosis_name'
)
->
width
(
3
);
$filter
->
equal
(
'pharmacy_id'
)
->
select
(
PharmacyModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
3
);
$filter
->
in
(
'status'
)
->
checkbox
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
)
->
width
(
3
);
$filter
->
in
(
'is_abnormal'
)
->
checkbox
([
0
=>
'否'
,
1
=>
'是'
])
->
width
(
3
);
$filter
->
in
(
'is_voided'
)
->
checkbox
(
PrescriptionModel
::
IS_VOIDED_MAP
)
->
width
(
3
);
});
// $show->field('is_voided')->width(3)->using(PrescriptionModel::IS_VOIDED_MAP);
// 行按钮控制
$grid
->
disableCreateButton
();
// 禁用创建按钮
...
...
app/Api/Controllers/InquiryController.php
View file @
f5ac9356
...
...
@@ -25,7 +25,7 @@ public function InquirytList(Request $request)
if
(
$drug_ids
)
{
Log
::
info
(
'drug_ids=>'
.
json_encode
(
$drug_ids
)
.
'===>'
.
gettype
(
$drug_ids
));
$tag_ids
=
DrugRelatedTagModel
::
whereIn
(
'drug_id'
,
$drug_ids
)
->
pluck
(
'tag_id'
)
->
toArray
();
Log
::
info
(
'tag_ids=>'
.
json_encode
(
$tag_ids
)
.
'===>'
.
gettype
(
$tag_ids
));
Log
::
info
(
'tag_ids=>'
.
json_encode
(
$tag_ids
)
.
'===>'
.
gettype
(
$tag_ids
));
// 获取标签关联的问题
if
(
$tag_ids
)
{
$inquiry_ids
=
DrugTagRelatedInquiryModel
::
whereIn
(
'tag_id'
,
$tag_ids
)
->
pluck
(
'inquiry_id'
)
->
toArray
();
...
...
app/Models/PrescriptionModel.php
View file @
f5ac9356
...
...
@@ -54,7 +54,7 @@ class PrescriptionModel extends Model
// 作废状态-文字映射
const
IS_VOIDED_MAP
=
[
self
::
IS_VOIDED_FALSE
=>
'未作废'
,
self
::
IS_VOIDED_
FALS
E
=>
'作废'
,
self
::
IS_VOIDED_
TRU
E
=>
'作废'
,
];
public
function
getDoctorSignedPicAttribute
(
$value
)
...
...
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