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
ef6ae026
authored
Nov 13, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签
parent
765a84b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
app/Admin/Controllers/DrugController.php
+7
-3
app/Api/Controllers/DrugController.php
+6
-5
app/Api/Controllers/PatientController.php
+1
-1
app/Api/Controllers/PrescriptionController.php
+0
-2
No files found.
app/Admin/Controllers/DrugController.php
View file @
ef6ae026
...
@@ -20,7 +20,7 @@ class DrugController extends AdminController
...
@@ -20,7 +20,7 @@ class DrugController extends AdminController
*/
*/
protected
function
grid
()
protected
function
grid
()
{
{
return
Grid
::
make
(
new
DrugRepository
(),
function
(
Grid
$grid
)
{
return
Grid
::
make
(
new
DrugRepository
(
'tag'
),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
model
()
->
orderBy
(
'id'
,
'DESC'
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'id'
)
->
sortable
();
...
@@ -33,7 +33,11 @@ protected function grid()
...
@@ -33,7 +33,11 @@ protected function grid()
$grid
->
column
(
'factory'
);
$grid
->
column
(
'factory'
);
$grid
->
column
(
'approval_no'
);
$grid
->
column
(
'approval_no'
);
$grid
->
column
(
'limit_buy_7'
);
$grid
->
column
(
'limit_buy_7'
);
$grid
->
column
(
'tag'
);
$grid
->
column
(
'tag'
)
->
display
(
function
(
$tags
)
{
return
collect
(
$tags
)
->
map
(
function
(
$tag
)
{
return
"<span class='label' style='background:#6d8be6'>
{
$tag
->
tag_name
}
</span>"
;
})
->
implode
(
' '
);
});
$grid
->
column
(
'standard_code'
);
$grid
->
column
(
'standard_code'
);
// $grid->column('created_at');
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
// $grid->column('updated_at')->sortable();
...
@@ -101,7 +105,7 @@ protected function form()
...
@@ -101,7 +105,7 @@ protected function form()
return
Form
::
make
(
new
DrugRepository
(
'tag'
),
function
(
Form
$form
)
{
return
Form
::
make
(
new
DrugRepository
(
'tag'
),
function
(
Form
$form
)
{
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
text
(
'name'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'name'
)
->
width
(
4
)
->
required
();
$form
->
hidden
(
'code'
)
->
width
(
4
)
->
required
(
);
$form
->
text
(
'code'
)
->
readonly
()
->
width
(
4
);
$form
->
text
(
'unit'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'unit'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'spec'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'spec'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'dosage_form'
)
->
width
(
4
)
->
required
();
$form
->
text
(
'dosage_form'
)
->
width
(
4
)
->
required
();
...
...
app/Api/Controllers/DrugController.php
View file @
ef6ae026
...
@@ -30,17 +30,18 @@ public function drugList(Request $request)
...
@@ -30,17 +30,18 @@ public function drugList(Request $request)
return
$this
->
success
(
$data
);
return
$this
->
success
(
$data
);
}
}
#
药品7日内限购
//
药品7日内限购
public
function
drugLimit
(
Request
$request
)
public
function
drugLimit
(
Request
$request
)
{
{
$drug_id
=
$request
->
input
(
'drug_id'
);
$drug_id
=
$request
->
input
(
'drug_id'
);
#
判断当前药品有没有设置7日内限购
//
判断当前药品有没有设置7日内限购
$drug
=
DrugModel
::
query
()
->
find
(
$drug_id
);
$drug
=
DrugModel
::
query
()
->
find
(
$drug_id
);
#
当前药品未设置则使用全局的7日内限购
//
当前药品未设置则使用全局的7日内限购
$limit_num
=
0
;
$limit_num
=
0
;
if
(
$drug
->
limit_num
==
0
)
{
if
(
$drug
->
limit_num
==
0
)
{
}
}
return
$this
->
success
(
$limit_num
);
return
$this
->
success
(
$limit_num
);
}
}
...
...
app/Api/Controllers/PatientController.php
View file @
ef6ae026
...
@@ -46,7 +46,7 @@ public function add(Request $request)
...
@@ -46,7 +46,7 @@ public function add(Request $request)
$idCardInfo
=
Util
::
getIdCardInfo
(
$data
[
'id_card'
]);
$idCardInfo
=
Util
::
getIdCardInfo
(
$data
[
'id_card'
]);
$data
[
'gender'
]
=
$idCardInfo
[
'gender'
];
$data
[
'gender'
]
=
$idCardInfo
[
'gender'
];
#
$data['age'] = $idCardInfo['age'];
//
$data['age'] = $idCardInfo['age'];
$res
=
PatientModel
::
create
(
$data
);
$res
=
PatientModel
::
create
(
$data
);
if
(
$res
)
{
if
(
$res
)
{
return
$this
->
success
(
$res
);
return
$this
->
success
(
$res
);
...
...
app/Api/Controllers/PrescriptionController.php
View file @
ef6ae026
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
// 问诊人控制器
// 问诊人控制器
class
PrescriptionController
extends
BaseApiController
class
PrescriptionController
extends
BaseApiController
{
{
public
function
test
()
public
function
test
()
{
{
// 分派医师 医师当日开方未达到上限以及是否在时间段的搜索出来
// 分派医师 医师当日开方未达到上限以及是否在时间段的搜索出来
...
@@ -122,5 +121,4 @@ public function create(Request $request)
...
@@ -122,5 +121,4 @@ public function create(Request $request)
return
$this
->
success
(
$data
);
return
$this
->
success
(
$data
);
}
}
}
}
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