|
@@ -9,8 +9,8 @@
|
9
|
9
|
<div class="moreFilter"></div>
|
10
|
10
|
</div>
|
11
|
11
|
<div class="order-list-box">
|
12
|
|
- <div v-for="(item,index) in list" :key="index">
|
13
|
|
- <div class="print-area" :class="'item' + index">
|
|
12
|
+ <div style='position:relative;' v-for="(item,index) in list" :key="index">
|
|
13
|
+ <div>
|
14
|
14
|
<div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
|
15
|
15
|
<i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
|
16
|
16
|
<div style="display:inline-block;">
|
|
@@ -30,37 +30,27 @@
|
30
|
30
|
<span style="display:inline-block;width:20%;text-align:right">x 2</span>
|
31
|
31
|
</div>
|
32
|
32
|
</div>
|
33
|
|
- <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
|
34
|
|
- <div>卡布奇诺</div>
|
35
|
|
- <div style="margin-top:8px;">
|
36
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
|
37
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 1</span>
|
38
|
|
- </div>
|
39
|
|
- <div style="margin-top:8px;">
|
40
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
|
41
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 2</span>
|
42
|
|
- </div>
|
43
|
|
- </div>
|
44
|
|
- <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
|
45
|
|
- <div>卡布奇诺</div>
|
46
|
|
- <div style="margin-top:8px;">
|
47
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
|
48
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 1</span>
|
49
|
|
- </div>
|
50
|
|
- <div style="margin-top:8px;">
|
51
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
|
52
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 2</span>
|
|
33
|
+ <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
|
|
34
|
+ <div style="padding:10px 20px;">下单人:xxxxx</div>
|
|
35
|
+ </div>
|
|
36
|
+ <div class="print-area" :class="'item' + index" style="width:180px;">
|
|
37
|
+ <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
|
|
38
|
+ <div style="display:inline-block;">
|
|
39
|
+ <img class="topIcon" style="display:block;width:60%;margin:0 0 20px 10px;" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt="">
|
|
40
|
+ <span style="display:block;font-size:20px;font-weight:700;"> <img width='25px' height="25px" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt=""> A区域1号桌</span>
|
|
41
|
+ <span style="display:block;margin-top:10px;font-size:12px;">下单时间:21:30:39</span>
|
|
42
|
+ <span style="display:block;margin-top:10px;font-size:12px;">已等待:<span style="color:red;font-weight:700;">30:29</span></span>
|
53
|
43
|
</div>
|
54
|
44
|
</div>
|
55
|
45
|
<div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
|
56
|
46
|
<div>卡布奇诺</div>
|
57
|
47
|
<div style="margin-top:8px;">
|
58
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
|
59
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 1</span>
|
|
48
|
+ <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">热</span>
|
|
49
|
+ <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 1</span>
|
60
|
50
|
</div>
|
61
|
51
|
<div style="margin-top:8px;">
|
62
|
|
- <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
|
63
|
|
- <span style="display:inline-block;width:20%;text-align:right">x 2</span>
|
|
52
|
+ <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">冷</span>
|
|
53
|
+ <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 2</span>
|
64
|
54
|
</div>
|
65
|
55
|
</div>
|
66
|
56
|
<div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
|
|
@@ -95,7 +85,7 @@ export default {
|
95
|
85
|
pagesize: 10, // 请求数据量
|
96
|
86
|
},
|
97
|
87
|
currentList: [],
|
98
|
|
- list: [1, 2, 3, 4, 5]
|
|
88
|
+ list: [1]
|
99
|
89
|
}
|
100
|
90
|
},
|
101
|
91
|
components: {
|
|
@@ -115,21 +105,43 @@ export default {
|
115
|
105
|
'GetOrdersList',
|
116
|
106
|
]),
|
117
|
107
|
submit (cl) {
|
118
|
|
- this.printPdf(cl)
|
|
108
|
+ this.$confirm('确定完成此饮品?', '提示', {
|
|
109
|
+ confirmButtonText: '确定',
|
|
110
|
+ cancelButtonText: '取消',
|
|
111
|
+ type: 'warning'
|
|
112
|
+ }).then((res) => {
|
|
113
|
+ // this.printPdf(cl)
|
|
114
|
+ }).catch((res) => {
|
|
115
|
+ this.$message({
|
|
116
|
+ type: 'info',
|
|
117
|
+ message: '已取消'
|
|
118
|
+ })
|
|
119
|
+ })
|
119
|
120
|
},
|
120
|
121
|
printPdf (cl) {
|
121
|
122
|
this.CreateOneFormPage(cl)
|
122
|
|
- // LODOP.PRINT();
|
123
|
|
- LODOP.PREVIEW()
|
|
123
|
+ LODOP.PRINT()
|
|
124
|
+ // LODOP.PREVIEW()
|
124
|
125
|
},
|
125
|
126
|
CreateOneFormPage (cl) {
|
126
|
127
|
LODOP = getLodop()
|
127
|
128
|
LODOP.PRINT_INIT('订单')
|
128
|
|
- LODOP.SET_PRINT_PAGESIZE(0, document.getElementsByClassName(cl)[0].offsetWidth * 10 / 4 + 100, document.getElementsByClassName(cl)[0].offsetHeight * 10 / 4 + 120, 'CreateCustomPage')
|
|
129
|
+ LODOP.SET_PRINT_PAGESIZE(3, 480, 40, '')
|
129
|
130
|
LODOP.ADD_PRINT_HTM(0, 0, document.getElementsByClassName(cl)[0].offsetWidth, document.getElementsByClassName(cl)[0].offsetHeight, document.getElementsByClassName(cl)[0].innerHTML)
|
130
|
131
|
},
|
131
|
132
|
cancel () {
|
132
|
|
-
|
|
133
|
+ this.$confirm('确定取消此饮品?', '提示', {
|
|
134
|
+ confirmButtonText: '确定',
|
|
135
|
+ cancelButtonText: '取消',
|
|
136
|
+ type: 'warning'
|
|
137
|
+ }).then((res) => {
|
|
138
|
+ // this.cancel()
|
|
139
|
+ }).catch((res) => {
|
|
140
|
+ this.$message({
|
|
141
|
+ type: 'info',
|
|
142
|
+ message: '已取消'
|
|
143
|
+ })
|
|
144
|
+ })
|
133
|
145
|
},
|
134
|
146
|
initWebSocket (code) {
|
135
|
147
|
const wsuri = `${baseUrl}/websocket/${code}`
|
|
@@ -142,23 +154,7 @@ export default {
|
142
|
154
|
this.websock.onclose = this.websocketclose
|
143
|
155
|
},
|
144
|
156
|
websocketonmessage (e) {
|
145
|
|
- const redata = JSON.parse(e.data)
|
146
|
|
- if (redata.code === '1') {
|
147
|
|
- this.$toast({
|
148
|
|
- message: '核销成功',
|
149
|
|
- position: 'center',
|
150
|
|
- duration: 1000
|
151
|
|
- })
|
152
|
|
- setTimeout(() => {
|
153
|
|
- this.$router.go(-1)
|
154
|
|
- }, 1000)
|
155
|
|
- } else {
|
156
|
|
- // this.$toast({
|
157
|
|
- // message: redata.message,
|
158
|
|
- // position: 'center',
|
159
|
|
- // duration: 1000
|
160
|
|
- // })
|
161
|
|
- }
|
|
157
|
+ // const redata = JSON.parse(e.data)
|
162
|
158
|
}
|
163
|
159
|
}
|
164
|
160
|
}
|