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
2d4d6113
Commit
2d4d6113
authored
Dec 27, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提单和条款模板
parent
470036ca
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
341 additions
and
10 deletions
+341
-10
makeLadingBill.vue
src/views/ecw/box/ladingBill/makeLadingBill.vue
+4
-2
index.vue
src/views/ecw/warehouse/index.vue
+5
-0
tpl.js
src/views/ecw/warehouse/tpl.js
+332
-8
No files found.
src/views/ecw/box/ladingBill/makeLadingBill.vue
View file @
2d4d6113
...
...
@@ -174,7 +174,7 @@ export default {
},
createPdf
(){
let
loading
=
this
.
$loading
()
html2canvas
(
document
.
querySelector
(
"
#html2canvas-container
"
),
{
dpi
:
144
}).
then
(
canvas
=>
{
html2canvas
(
document
.
querySelector
(
"
#html2canvas-container
"
),
{
dpi
:
144
,
useCORS
:
true
}).
then
(
canvas
=>
{
const
doc
=
new
jsPDF
(
'
p
'
,
'
pt
'
,
'
a4
'
,
true
);
const
imgWidth
=
canvas
.
width
...
...
@@ -187,7 +187,8 @@ export default {
}
const
_left
=
(
595.28
-
_w
)
/
2
;
doc
.
addImage
(
canvas
,
'
PNG
'
,
_left
,
0
,
_w
,
_h
,
''
,
'
FAST
'
);
// doc.save("a4.pdf");
doc
.
save
(
"
a4.pdf
"
);
return
Promise
.
reject
()
let
form
=
new
FormData
()
form
.
append
(
'
file
'
,
new
File
([
doc
.
output
(
'
arraybuffer
'
)],
Date
.
now
()
+
'
.pdf
'
,
{
type
:
'
application/pdf
'
}))
return
uploadFile
(
form
)
...
...
@@ -253,6 +254,7 @@ export default {
<
style
lang=
"scss"
scoped
>
::v-deep
#html2canvas-container
{
padding
:
3rem
;
p
{
margin
:
0
;
}
...
...
src/views/ecw/warehouse/index.vue
View file @
2d4d6113
...
...
@@ -364,6 +364,8 @@
</el-card>
<el-form-item
:label=
"$t('条款')"
prop=
"contentZh"
>
<el-link
type=
"primary"
@
click.native=
"setAgreementTpl('agreementSea')"
>
海运模板
</el-link>
|
<el-link
type=
"primary"
@
click.native=
"setAgreementTpl('agreementAir')"
>
空运模板
</el-link>
<ueditor
v-model=
"ladingform.contentZh"
:min-height=
"192"
style=
"width:960px"
/>
</el-form-item>
...
...
@@ -649,6 +651,9 @@ export default {
setTpl
(
type
){
this
.
ladingform
.
titleZh
=
tpl
[
type
]
},
setAgreementTpl
(
type
){
this
.
ladingform
.
contentZh
=
tpl
[
type
]
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
...
...
src/views/ecw/warehouse/tpl.js
View file @
2d4d6113
This diff is collapsed.
Click to expand it.
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