Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
vanke
manage
Commits
b2e78f39
Commit
b2e78f39
authored
Aug 19, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库管理打印物品详情
parent
94ee6baa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
index.html
index.html
+1
-1
PrintDetail.vue
src/views/inv/PrintDetail.vue
+23
-17
No files found.
index.html
View file @
b2e78f39
...
@@ -253,5 +253,5 @@
...
@@ -253,5 +253,5 @@
<script
src=
"https://cdn.bootcss.com/babel-polyfill/7.6.0/polyfill.js"
></script>
<script
src=
"https://cdn.bootcss.com/babel-polyfill/7.6.0/polyfill.js"
></script>
<script
src=
"./static/tinymce4.7.5/tinymce.min.js"
></script>
<script
src=
"./static/tinymce4.7.5/tinymce.min.js"
></script>
<script
src=
"print.js"
></script>
<script
src=
"print.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"print.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"print.css"
>
</html>
</html>
src/views/inv/PrintDetail.vue
View file @
b2e78f39
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<!-- 搜索栏 -->
<!-- 搜索栏 -->
<el-card
class=
"filter-container"
<el-card
class=
"filter-container"
shadow=
"never"
>
shadow=
"never"
>
<div
id=
"printJS-form
"
>
<div
ref=
"printTable"
class=
"content
"
>
<el-form
:model=
"formData"
>
<el-form
:model=
"formData"
id=
"printJS-form"
>
<el-table
<el-table
:data=
"formData.tableData"
:data=
"formData.tableData"
ref=
"formData"
ref=
"formData"
class=
"print_table"
>
class=
"print_table"
>
<el-table-column
<el-table-column
prop=
"goodsName"
prop=
"goodsName"
label=
"物品名称"
>
label=
"物品名称"
align=
"left"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goodsNo"
prop=
"goodsNo"
...
@@ -72,8 +74,20 @@ export default {
...
@@ -72,8 +74,20 @@ export default {
this
.
$router
.
go
(
-
1
);
//返回上一层
this
.
$router
.
go
(
-
1
);
//返回上一层
},
},
print
(){
print
(){
// this.$print(this.$refs.formData)
printJS
({
printJS
({
printable
:
'printJS-form'
,
type
:
'html'
,
documentTitle
:
'入库物品详情'
})
printable
:
this
.
formData
.
tableData
,
documentTitle
:
'物品详情'
,
properties
:
[
{
field
:
'goodsName'
,
displayName
:
'物品名称'
},
{
field
:
'goodsNo'
,
displayName
:
'型号'
},
{
field
:
'categoryName'
,
displayName
:
'物品类别'
},
{
field
:
'inboundNum'
,
displayName
:
'数量'
},
{
field
:
'price'
,
displayName
:
'价格(元)'
},
{
field
:
'supplierName'
,
displayName
:
'供应商'
}],
type
:
'json'
,
gridHeaderStyle
:
'color: red; border: 2px solid #3971A5;'
,
gridStyle
:
'border: 2px solid #3971A5;padding: 10px;text-align:center;'
})
}
}
}
}
}
}
...
@@ -81,19 +95,11 @@ export default {
...
@@ -81,19 +95,11 @@ export default {
<
style
lang=
'scss'
scoped
>
<
style
lang=
'scss'
scoped
>
.app-container
{
.app-container
{
width
:
7
0%
;
width
:
10
0%
;
margin
:
0
auto
;
margin
:
0
auto
;
@media
print
{
width
:
100%
;
text-align
:
center
;
page-break-after
:
always
;
.print_table{
width
:
100%
;
text-align
:
center
;
}
}
.print_table{
.print_table{
width
:
100%
;
width
:
70%
;
margin
:
0
auto
;
}
}
.print_btn
{
.print_btn
{
margin
:
50px
0
;
margin
:
50px
0
;
...
...
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