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
b3c78569
authored
Dec 04, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单个药品排他
parent
9b588ecb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
app/Admin/Controllers/DoctorController.php
+2
-2
app/Api/Controllers/DrugController.php
+1
-1
app/Api/Controllers/PrescriptionController.php
+2
-2
app/Models/DoctorModel.php
+1
-0
No files found.
app/Admin/Controllers/DoctorController.php
View file @
b3c78569
...
@@ -48,7 +48,7 @@ protected function grid()
...
@@ -48,7 +48,7 @@ protected function grid()
$grid
->
column
(
'user.openid'
,
'关联用户'
);
$grid
->
column
(
'user.openid'
,
'关联用户'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'created_at'
);
// $grid->column('updated_at')->sortable();
// $grid->column('updated_at')->sortable();
$grid
->
column
(
'type'
,
'医师类型'
)
->
using
(
DoctorModel
::
DOCTOR_TYPE_MAP
);
$grid
->
column
(
'type'
,
'医师类型'
)
->
using
(
DoctorModel
::
DOCTOR_TYPE_MAP
);
// 快捷搜索
// 快捷搜索
$grid
->
quickSearch
([
'name'
,
'mobile'
,
'id_card'
])
->
placeholder
(
'请输入[姓名|手机号|身份证号码]'
)
->
width
(
25
);
$grid
->
quickSearch
([
'name'
,
'mobile'
,
'id_card'
])
->
placeholder
(
'请输入[姓名|手机号|身份证号码]'
)
->
width
(
25
);
...
@@ -131,7 +131,7 @@ protected function form()
...
@@ -131,7 +131,7 @@ protected function form()
$form
->
display
(
'user_id'
);
$form
->
display
(
'user_id'
);
$form
->
switch
(
'status'
);
$form
->
switch
(
'status'
);
$form
->
switch
(
'is_auto'
);
$form
->
switch
(
'is_auto'
);
$form
->
radio
(
'type'
,
'医师类型'
)
->
options
(
DoctorModel
::
DOCTOR_TYPE_MAP
)
->
default
(
DoctorModel
::
DOCTOR_TYPE_WM
)
->
required
();
$form
->
radio
(
'type'
,
'医师类型'
)
->
options
(
DoctorModel
::
DOCTOR_TYPE_MAP
)
->
default
(
DoctorModel
::
DOCTOR_TYPE_WM
)
->
required
();
$form
->
display
(
'created_at'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
$form
->
display
(
'updated_at'
);
});
});
...
...
app/Api/Controllers/DrugController.php
View file @
b3c78569
...
@@ -159,7 +159,7 @@ public function drugLimit(Request $request)
...
@@ -159,7 +159,7 @@ public function drugLimit(Request $request)
if
(
$canBuyMahuangCount
<
0
)
{
if
(
$canBuyMahuangCount
<
0
)
{
$canBuyMahuangCount
=
0
;
$canBuyMahuangCount
=
0
;
}
}
Log
::
info
(
'all_limit_num=>'
.
$limit_num
.
' drugCounts=>'
.
$drugCounts
.
' drugs=>'
.
$drugs
.
' canBuyMahuangCount=>'
.
$canBuyMahuangCount
);
Log
::
info
(
'all_limit_num=>'
.
$limit_num
.
' drugCounts=>'
.
$drugCounts
.
' drugs=>'
.
$drugs
.
' canBuyMahuangCount=>'
.
$canBuyMahuangCount
);
// 处理麻黄素药品数据
// 处理麻黄素药品数据
$mahuangsu_buy_num
=
0
;
// 本次购买麻黄素药品数量
$mahuangsu_buy_num
=
0
;
// 本次购买麻黄素药品数量
$exclusions
=
[];
// 单个药品的排他管理
$exclusions
=
[];
// 单个药品的排他管理
...
...
app/Api/Controllers/PrescriptionController.php
View file @
b3c78569
...
@@ -109,8 +109,8 @@ public function create(Request $request)
...
@@ -109,8 +109,8 @@ public function create(Request $request)
$inquirys
=
$request
->
input
(
'inquirys'
);
// [['inquiry_id'=>1, 'answer'=>1]]
$inquirys
=
$request
->
input
(
'inquirys'
);
// [['inquiry_id'=>1, 'answer'=>1]]
$drugs
=
$request
->
input
(
'drugs'
);
// [['pharmacy_drug_id'=>2, 'num'=>1]]
$drugs
=
$request
->
input
(
'drugs'
);
// [['pharmacy_drug_id'=>2, 'num'=>1]]
$prescription_type
=
$request
->
input
(
'prescription_type'
,
0
);
$prescription_type
=
$request
->
input
(
'prescription_type'
,
0
);
#
医师类型
//
医师类型
$doctor_type
=
$prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_WM
?
[
DoctorModel
::
DOCTOR_TYPE_ALL
,
DoctorModel
::
DOCTOR_TYPE_WM
]
:
[
DoctorModel
::
DOCTOR_TYPE_ALL
,
DoctorModel
::
DOCTOR_TYPE_TCM
];
$doctor_type
=
$prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_WM
?
[
DoctorModel
::
DOCTOR_TYPE_ALL
,
DoctorModel
::
DOCTOR_TYPE_WM
]
:
[
DoctorModel
::
DOCTOR_TYPE_ALL
,
DoctorModel
::
DOCTOR_TYPE_TCM
];
$pharmacy
=
null
;
$pharmacy
=
null
;
$open_source
=
0
;
$open_source
=
0
;
...
...
app/Models/DoctorModel.php
View file @
b3c78569
...
@@ -55,6 +55,7 @@ class DoctorModel extends Model
...
@@ -55,6 +55,7 @@ class DoctorModel extends Model
self
::
DOCTOR_TYPE_WM
=>
'西药'
,
self
::
DOCTOR_TYPE_WM
=>
'西药'
,
self
::
DOCTOR_TYPE_TCM
=>
'中药'
,
self
::
DOCTOR_TYPE_TCM
=>
'中药'
,
];
];
// 医师所属于的用户,一对一
// 医师所属于的用户,一对一
public
function
user
()
public
function
user
()
{
{
...
...
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