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
6f3bb8bf
authored
Nov 26, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大小
parent
4712799c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
app/Admin/Controllers/PrescriptionPrintController.php
+9
-9
No files found.
app/Admin/Controllers/PrescriptionPrintController.php
View file @
6f3bb8bf
...
...
@@ -99,33 +99,33 @@ public function search()
// 姓名
$img
->
text
(
$prescription
->
patient_name
,
410
,
260
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
});
// 性别
$gender
=
PatientModel
::
SEX_MAP
[
$prescription
->
patient_gender
];
$img
->
text
(
$gender
,
890
,
260
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
});
// 年龄
$img
->
text
(
"
{
$prescription
->
patient_age
}
岁"
,
1270
,
260
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
});
// 开方日期
$date
=
\Carbon\Carbon
::
parse
(
$prescription
->
prescription_at
)
->
format
(
'Y-m-d'
);
$img
->
text
(
$date
,
1215
,
330
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
});
// 诊断
$img
->
text
(
$prescription
->
diagnosis_name
,
330
,
460
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
32
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
});
...
...
@@ -157,7 +157,7 @@ public function search()
$medicineText
=
"
{
$medicine
[
'drug_name'
]
}
{
$medicine
[
'spec'
]
}
{
$medicine
[
'num'
]
}{
$medicine
[
'unit'
]
}
"
;
$img
->
text
(
$medicineText
,
450
,
$yCoordinate
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
$font
->
align
(
'left'
);
});
...
...
@@ -168,7 +168,7 @@ public function search()
// 打印 sig 信息
$img
->
text
(
'Sig: '
.
$medicine
[
'dosage_desc'
],
450
,
$yCoordinate
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
36
);
$font
->
size
(
40
);
$font
->
color
(
'#000000'
);
$font
->
align
(
'left'
);
});
...
...
@@ -206,7 +206,7 @@ public function search()
// 不带印章处方图片生成
$picName
=
$prescriptionNo
.
'.jpg'
;
$tempPath
=
storage_path
(
'app/public'
)
.
$picName
;
$img
->
save
(
$tempPath
);
// 不带电子印章
$img
->
save
(
$tempPath
,
quality
:
100
);
// 不带电子印章
// 上传到腾讯云
Storage
::
putFileAs
(
'prescriptions'
,
$tempPath
,
$picName
);
...
...
@@ -217,7 +217,7 @@ public function search()
$img
->
place
(
$eseal
,
'bottom-right'
,
180
,
500
);
$picEsealName
=
$prescriptionNo
.
'-eseal.jpg'
;
$tempEsealPath
=
storage_path
(
'app/public'
)
.
$picEsealName
;
$img
->
save
(
$tempEsealPath
);
$img
->
save
(
$tempEsealPath
,
quality
:
100
);
// 上传到腾讯云
Storage
::
putFileAs
(
'prescriptions'
,
$tempEsealPath
,
$picEsealName
);
...
...
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