Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
c1f871c8
Commit
c1f871c8
authored
Aug 24, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印标签前端生成二维码
parent
b147953f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
PrintTag.vue
src/views/ecw/order/components/PrintTag.vue
+3
-5
No files found.
src/views/ecw/order/components/PrintTag.vue
View file @
c1f871c8
...
...
@@ -26,7 +26,7 @@
style=
"width: 80mm; margin: 0 auto;"
:id=
"'order-print-tag' + item.num"
:style=
"
{display: index == 0 ? 'block':'none' }"
:key="item.num">
<div
style=
"float: left; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; "
>
<div
style=
"float: left;
text-align: center;
width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; "
>
<img
class=
"qrcode"
src=
""
:alt=
"item.url"
style=
"width: 26mm"
/>
<p
class=
"tag"
style=
" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; "
>
{{
item
.
tag
}}
</p>
<p
style=
"margin-top: -1mm; text-align: center"
>
...
...
@@ -144,7 +144,7 @@ export default {
this
.
$nextTick
(
async
()
=>
{
const
first
=
document
.
getElementsByClassName
(
'
order-print-tag-item
'
)[
0
]
const
tag
=
first
.
getElementsByClassName
(
'
tag
'
)[
0
].
innerText
const
qrcode
=
await
QRCode
.
toDataURL
(
tag
)
const
qrcode
=
await
QRCode
.
toDataURL
(
tag
,
{
margin
:
1
}
)
first
.
getElementsByClassName
(
'
qrcode
'
)[
0
].
setAttribute
(
"
src
"
,
qrcode
)
}
)
}
)
...
...
@@ -162,15 +162,13 @@ export default {
LODOP
.
SET_PRINT_STYLE
(
"
FontSize
"
,
18
);
LODOP
.
SET_PRINT_STYLE
(
"
Bold
"
,
1
);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
console
.
log
({
items
}
)
LODOP
.
SET_PRINT_PAGESIZE
(
0
,
800
,
600
,
"
TAG
"
);
let
i
=
0
;
for
(
let
item
of
items
){
const
tag
=
item
.
getElementsByClassName
(
'
tag
'
)[
0
].
innerText
const
qrcode
=
await
QRCode
.
toDataURL
(
tag
)
const
qrcode
=
await
QRCode
.
toDataURL
(
tag
,
{
margin
:
1
}
)
item
.
getElementsByClassName
(
'
qrcode
'
)[
0
].
setAttribute
(
"
src
"
,
qrcode
)
LODOP
.
ADD_PRINT_HTM
(
"
2mm
"
,
0
,
800
,
600
,
item
.
innerHTML
);
console
.
log
(
'
item.innerHTML
'
,
item
.
innerHTML
)
if
(
i
<
items
.
length
){
LODOP
.
NewPage
()
}
...
...
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