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
4e896a43
authored
Nov 19, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
药店权限
parent
534da0fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
app/Admin/Controllers/PharmacyConfigController.php
+6
-0
app/Admin/Controllers/PrescriptionPrintController.php
+13
-1
No files found.
app/Admin/Controllers/PharmacyConfigController.php
View file @
4e896a43
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Admin\Controllers
;
namespace
App\Admin\Controllers
;
use
App\Admin\Extensions\Form\PharmacyConfigForm
;
use
App\Admin\Extensions\Form\PharmacyConfigForm
;
use
Dcat\Admin\Admin
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Layout\Content
;
use
Dcat\Admin\Layout\Content
;
...
@@ -11,6 +12,11 @@ class PharmacyConfigController extends AdminController
...
@@ -11,6 +12,11 @@ class PharmacyConfigController extends AdminController
{
{
public
function
index
(
Content
$content
)
:
Content
public
function
index
(
Content
$content
)
:
Content
{
{
// 权限判断和数据过滤
if
(
!
Admin
::
user
()
->
isRole
(
'pharmacy'
))
{
admin_exit
(
Content
::
make
()
->
withError
(
trans
(
'admin.deny'
)));
}
return
$content
->
header
(
'药店配置'
)
return
$content
->
header
(
'药店配置'
)
->
description
(
''
)
->
description
(
''
)
->
body
(
new
PharmacyConfigForm
());
->
body
(
new
PharmacyConfigForm
());
...
...
app/Admin/Controllers/PrescriptionPrintController.php
View file @
4e896a43
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
use
App\Models\PatientModel
;
use
App\Models\PatientModel
;
use
App\Models\PharmacyDrugModel
;
use
App\Models\PharmacyDrugModel
;
use
App\Models\PrescriptionModel
;
use
App\Models\PrescriptionModel
;
use
Dcat\Admin\Admin
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Layout\Content
;
use
Dcat\Admin\Layout\Content
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
...
@@ -16,6 +17,11 @@ class PrescriptionPrintController extends AdminController
...
@@ -16,6 +17,11 @@ class PrescriptionPrintController extends AdminController
// 处方打印首页,显示输入框,可以搜索处方
// 处方打印首页,显示输入框,可以搜索处方
public
function
index
(
Content
$content
)
:
Content
public
function
index
(
Content
$content
)
:
Content
{
{
// 权限判断和数据过滤
if
(
!
Admin
::
user
()
->
isRole
(
'pharmacy'
))
{
admin_exit
(
Content
::
make
()
->
withError
(
trans
(
'admin.deny'
)));
}
// 加载处方打印页面
// 加载处方打印页面
return
$content
->
header
(
'处方打印'
)
return
$content
->
header
(
'处方打印'
)
->
description
(
'根据处方编号搜索并打印处方'
)
->
description
(
'根据处方编号搜索并打印处方'
)
...
@@ -27,13 +33,19 @@ public function index(Content $content): Content
...
@@ -27,13 +33,19 @@ public function index(Content $content): Content
*/
*/
public
function
search
()
public
function
search
()
{
{
if
(
!
Admin
::
user
()
->
isRole
(
'pharmacy'
))
{
return
response
()
->
json
([
'status'
=>
false
,
'message'
=>
'您没有权限~'
,
]);
}
$prescriptionNo
=
request
(
'prescription_no'
);
$prescriptionNo
=
request
(
'prescription_no'
);
$isEseal
=
request
(
'is_eseal'
,
0
);
// 是否打印电子印章,实时生成
$isEseal
=
request
(
'is_eseal'
,
0
);
// 是否打印电子印章,实时生成
if
(
empty
(
$prescriptionNo
))
{
if
(
empty
(
$prescriptionNo
))
{
return
response
()
->
json
([
return
response
()
->
json
([
'status'
=>
false
,
'status'
=>
false
,
'message'
=>
'请输入处方编号'
,
'message'
=>
'请输入处方编号
~
'
,
]);
]);
}
}
...
...
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