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
3f40e840
authored
Dec 09, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
减小重要处方药品文字大小,防止重叠
parent
0e000050
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/Admin/Controllers/PrescriptionPrintController.php
+2
-2
No files found.
app/Admin/Controllers/PrescriptionPrintController.php
View file @
3f40e840
...
@@ -200,7 +200,7 @@ public function search()
...
@@ -200,7 +200,7 @@ public function search()
if
(
$prescription
->
prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_TCM
)
{
if
(
$prescription
->
prescription_type
==
PrescriptionModel
::
PRESCRIPTION_TYPE_TCM
)
{
$lineHeight
=
100
;
// 每3条数据换行后的行间距
$lineHeight
=
100
;
// 每3条数据换行后的行间距
$horizontalSpacing
=
350
;
// 每行中的每条记录之间的水平间距
$horizontalSpacing
=
350
;
// 每行中的每条记录之间的水平间距
$xStart
=
4
00
;
// 起始x坐标值
$xStart
=
3
00
;
// 起始x坐标值
foreach
(
$medicines
as
$k
=>
$medicine
)
{
foreach
(
$medicines
as
$k
=>
$medicine
)
{
// 每行显示3个记录,并且如果不是第一行,增加下一行的Y坐标
// 每行显示3个记录,并且如果不是第一行,增加下一行的Y坐标
if
(
$k
%
3
==
0
)
{
if
(
$k
%
3
==
0
)
{
...
@@ -215,7 +215,7 @@ public function search()
...
@@ -215,7 +215,7 @@ public function search()
$medicineText
=
sprintf
(
'%-12s %-12s'
,
$medicine
[
'drug_name'
],
"*
{
$medicine
[
'num'
]
}{
$medicine
[
'unit'
]
}
"
);
$medicineText
=
sprintf
(
'%-12s %-12s'
,
$medicine
[
'drug_name'
],
"*
{
$medicine
[
'num'
]
}{
$medicine
[
'unit'
]
}
"
);
$img
->
text
(
$medicineText
,
$xCoordinate
,
$yCoordinate
,
function
(
$font
)
{
$img
->
text
(
$medicineText
,
$xCoordinate
,
$yCoordinate
,
function
(
$font
)
{
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
filename
(
public_path
(
'static/fonts/SimHei.ttf'
));
$font
->
size
(
40
);
$font
->
size
(
35
);
$font
->
color
(
'#000000'
);
$font
->
color
(
'#000000'
);
$font
->
align
(
'left'
);
$font
->
align
(
'left'
);
});
});
...
...
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