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
e12dee54
authored
Nov 29, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印处方bug
parent
f6e770a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/Admin/Controllers/PrescriptionPrintController.php
+3
-3
app/Models/PrescriptionModel.php
+4
-4
database/migrations/2024_11_28_223219_add_prescription_type_to_prescription_table.php
+1
-1
No files found.
app/Admin/Controllers/PrescriptionPrintController.php
View file @
e12dee54
...
@@ -78,9 +78,9 @@ public function search()
...
@@ -78,9 +78,9 @@ public function search()
// 创建处方图片
// 创建处方图片
// 处方背景图宽1653,高2339
// 处方背景图宽1653,高2339
$backgroudImg
=
public_path
(
'static/images/
zhong
yao.jpg'
);
$backgroudImg
=
public_path
(
'static/images/
xi
yao.jpg'
);
if
(
$prescription
->
prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_
W
M
)
{
if
(
$prescription
->
prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_
TC
M
)
{
$backgroudImg
=
public_path
(
'static/images/
xi
yao.jpg'
);
$backgroudImg
=
public_path
(
'static/images/
zhong
yao.jpg'
);
}
}
$img
=
Image
::
read
(
$backgroudImg
);
$img
=
Image
::
read
(
$backgroudImg
);
...
...
app/Models/PrescriptionModel.php
View file @
e12dee54
...
@@ -87,15 +87,15 @@ class PrescriptionModel extends Model
...
@@ -87,15 +87,15 @@ class PrescriptionModel extends Model
self
::
IS_VOIDED_TRUE
=>
'danger'
,
self
::
IS_VOIDED_TRUE
=>
'danger'
,
];
];
// 处方类型[0=
中药,1=西
药]
// 处方类型[0=
西药,1=中
药]
const
PRESCRIPTION_TYPE_
TC
M
=
0
;
const
PRESCRIPTION_TYPE_
W
M
=
0
;
const
PRESCRIPTION_TYPE_
W
M
=
1
;
const
PRESCRIPTION_TYPE_
TC
M
=
1
;
// 处方类型-文字映射
// 处方类型-文字映射
const
PRESCRIPTION_TYPE_MAP
=
[
const
PRESCRIPTION_TYPE_MAP
=
[
self
::
PRESCRIPTION_TYPE_TCM
=>
'中药'
,
self
::
PRESCRIPTION_TYPE_WM
=>
'西药'
,
self
::
PRESCRIPTION_TYPE_WM
=>
'西药'
,
self
::
PRESCRIPTION_TYPE_TCM
=>
'中药'
,
];
];
public
function
getDoctorSignedPicAttribute
(
$value
)
public
function
getDoctorSignedPicAttribute
(
$value
)
...
...
database/migrations/2024_11_28_223219_add_prescription_type_to_prescription_table.php
View file @
e12dee54
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
public
function
up
()
:
void
public
function
up
()
:
void
{
{
Schema
::
table
(
'prescription'
,
function
(
Blueprint
$table
)
{
Schema
::
table
(
'prescription'
,
function
(
Blueprint
$table
)
{
$table
->
tinyInteger
(
'prescription_type'
)
->
default
(
0
)
->
comment
(
'处方类型[0=
中药,1=西
药]'
);
$table
->
tinyInteger
(
'prescription_type'
)
->
default
(
0
)
->
comment
(
'处方类型[0=
西药,1=中
药]'
);
});
});
}
}
...
...
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