printDialog.vue
3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<template>
<el-dialog
title="调整单打印"
:visible.sync="visible"
:showprint="showprint"
width="1000px"
append-to-body
@close="$emit('update:showprint', false)"
>
<div id="print">
<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="6"><div class="date">2020-09-30</div></el-col>
<el-col :span="6"><div class="ad-sheet">调整单</div></el-col>
<el-col :span="6"
><div class="bar-code">
<barcode
:value="123456789"
></barcode></div
></el-col>
</el-row>
<div class="no-print">
<el-row>
<el-button
size="mini"
type="primary"
icon="el-icon-printer"
@click="print"
v-print="'#print'"
class="pull-right"
>打印</el-button
></el-row
>
</div>
<el-divider></el-divider>
<el-table>
<el-table-column label="容器" align="center" prop="userId" />
<el-table-column
label="明细id"
align="center"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物料编码"
align="center"
prop="nickName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物料名称"
align="center"
prop="dept.deptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统数"
align="center"
prop="phonenumber"
width="120"
/>
<el-table-column
label="实际数"
align="center"
prop="phonenumber"
width="120"
/>
<el-table-column
label="差异数"
align="center"
prop="phonenumber"
width="120"
/>
<el-table-column
label="调整数"
align="center"
prop="phonenumber"
width="120"
/>
<el-table-column
label="条码"
align="center"
prop="phonenumber"
width="120"
/>
</el-table>
</div>
</el-dialog>
</template>
<script>
// import { importTemplate } from '@/api/inventory/look/header'
export default {
props: {
showprint: {
type: Boolean,
default: false,
},
},
data() {
return {
visible: this.showprint,
};
},
watch: {
showprint() {
this.visible = this.showprint;
},
},
methods: {},
created() {},
};
</script>
<style lang="scss" scoped>
.row-bg {
padding: 10px 0;
}
.ad-sheet {
text-align: center;
font-size: 16px;
}
.bar-code {
text-align: right;
}
/*去除打印页眉页脚*/
@page {
size: auto; /* auto is the initial value */
margin: 3mm; /* this affects the margin in the printer settings */
}
html {
background-color: #ffffff;
margin: 0; /* this affects the margin on the html before sending to printer */
}
body {
border: solid 1px blue;
margin: 10mm 15mm 10mm 15mm; /* margin you want for the content */
}
/*去除打印页眉页脚*/
</style>