|
@@ -43,28 +43,33 @@
|
43
|
43
|
</div>
|
44
|
44
|
</div>
|
45
|
45
|
<div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:{{item.Remark}}</div>
|
46
|
|
- <div style="padding:10px 20px;">下单人:{{item.UserName}}</div>
|
|
46
|
+ <div style="padding:10px 20px;" @click="printPdf(`item${index}`)">下单人:{{item.UserName}}</div>
|
47
|
47
|
</div>
|
48
|
48
|
<div class="print-area" :class="'item' + index" style="width:180px;">
|
49
|
|
- <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
|
|
49
|
+ <div style="padding:0px 10px 5px;border-bottom:2px solid #cccccc;">
|
50
|
50
|
<div style="display:inline-block;">
|
51
|
|
- <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="">
|
52
|
|
- <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=""> {{item.AreaName}}</span>
|
53
|
|
- <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
|
|
51
|
+ <img class="topIcon" style="display:block;width:60%;margin:0 0 20px 0px;" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt="">
|
|
52
|
+ <span style="display:block;font-size:20px;font-weight:700;text-align: center;"> <img width='25px' height="25px" :src='item.AreaIconWhite' alt=""> {{item.AreaName}}</span>
|
54
|
53
|
</div>
|
55
|
54
|
</div>
|
56
|
|
- <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;" v-for='(item1,index1) in item.Goods' :key='index1'>
|
57
|
|
- <div style="display:flex;justify-content: space-between;align-items: center;"><span>{{item1.GoodsName}}</span><span style="display:inline-block;width:20%;text-align:right" v-if='!item1.SpecName'>x {{item1.Number}}</span></div>
|
|
55
|
+ <div style="padding:10px 10px 5px;border-bottom:1px solid #cccccc;" v-for='(item1,index1) in item.Goods' :key='index1'>
|
|
56
|
+ <div style="display:flex;justify-content: space-between;align-items: center;font-size:12px;"><span>{{item1.GoodsName}}</span><span style="display:inline-block;width:20%;text-align:right;font-size:12px;" v-if='!item1.SpecName'>x {{item1.Number}}</span></div>
|
58
|
57
|
<div style="margin-top:8px;" v-if='item1.SpecName'>
|
59
|
58
|
<span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">{{item1.SpecName}}</span>
|
60
|
59
|
<span style="display:inline-block;width:20%;text-align:right;font-size:12px;">× {{item1.Number}}</span>
|
61
|
60
|
</div>
|
62
|
61
|
</div>
|
63
|
|
- <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:{{item.Remark}}</div>
|
|
62
|
+ <div style="padding:10px 10px 5px;border-bottom:1px solid #cccccc;">
|
|
63
|
+ <div style="font-size:12px;">下单人:{{item.UserName}}</div>
|
|
64
|
+ <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
|
|
65
|
+ </div>
|
|
66
|
+ <div style="padding:10px 10px;font-size:12px;">备注:{{item.Remark}}</div>
|
|
67
|
+ <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
|
|
68
|
+ <div style="height:10px"></div>
|
64
|
69
|
</div>
|
65
|
70
|
<div class="btns">
|
66
|
|
- <span @click="cancel(item.id)">取消</span>
|
67
|
|
- <span @click="submit(item.id)">确定</span>
|
|
71
|
+ <span @click="cancel(item.OrdersId)">取消</span>
|
|
72
|
+ <span @click="submit(item.OrdersId)">确定</span>
|
68
|
73
|
</div>
|
69
|
74
|
</div>
|
70
|
75
|
</div>
|
|
@@ -164,22 +169,25 @@ export default {
|
164
|
169
|
'closeBusiness',
|
165
|
170
|
'checkOrder',
|
166
|
171
|
'cancelOrder',
|
167
|
|
- 'getBusinessStatus'
|
|
172
|
+ 'getBusinessStatus',
|
|
173
|
+ 'updateList'
|
168
|
174
|
]),
|
169
|
175
|
...mapActions([
|
170
|
176
|
'updateSystemInfo'
|
171
|
177
|
]),
|
172
|
178
|
submit (id) {
|
|
179
|
+ console.log(id)
|
173
|
180
|
this.$confirm('确定完成此饮品?', '提示', {
|
174
|
181
|
confirmButtonText: '确定',
|
175
|
182
|
cancelButtonText: '取消',
|
176
|
183
|
type: 'warning'
|
177
|
184
|
}).then((res) => {
|
178
|
|
- this.checkOrder().then(() => {
|
|
185
|
+ this.checkOrder({ id: id }).then(() => {
|
179
|
186
|
this.$message({
|
180
|
187
|
type: 'success',
|
181
|
188
|
message: '确认订单成功'
|
182
|
189
|
})
|
|
190
|
+ this.init()
|
183
|
191
|
})
|
184
|
192
|
}).catch((res) => {
|
185
|
193
|
this.$message({
|
|
@@ -194,11 +202,12 @@ export default {
|
194
|
202
|
cancelButtonText: '取消',
|
195
|
203
|
type: 'warning'
|
196
|
204
|
}).then((res) => {
|
197
|
|
- this.cancelOrder().then(() => {
|
|
205
|
+ this.cancelOrder({ id: id }).then(() => {
|
198
|
206
|
this.$message({
|
199
|
207
|
type: 'success',
|
200
|
208
|
message: '取消订单成功'
|
201
|
209
|
})
|
|
210
|
+ this.init()
|
202
|
211
|
})
|
203
|
212
|
}).catch((res) => {
|
204
|
213
|
this.$message({
|
|
@@ -222,8 +231,8 @@ export default {
|
222
|
231
|
console.log(this.user)
|
223
|
232
|
let caseid = this.caseid
|
224
|
233
|
let id = this.userInfo.UserId
|
225
|
|
- // const wsuri = `${window.location.origin.replace('http', 'ws')}/api/common/MQ/websocket/${caseid}/${id}`
|
226
|
|
- const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
|
|
234
|
+ const wsuri = `${window.location.origin.replace('http', 'ws')}/api/common/MQ/websocket/${caseid}/${id}`
|
|
235
|
+ // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
|
227
|
236
|
try {
|
228
|
237
|
this.websock = new WebSocket(wsuri)
|
229
|
238
|
} catch (e) {
|
|
@@ -238,11 +247,12 @@ export default {
|
238
|
247
|
let lengthOld = this.list.length
|
239
|
248
|
let lengthNew = JSON.parse(e.data).data.refreshOnlineGoodsOrders.length
|
240
|
249
|
let newData = JSON.parse(e.data).data.refreshOnlineGoodsOrders.slice(lengthOld - lengthNew)
|
241
|
|
- this.list = JSON.parse(e.data).data.refreshOnlineGoodsOrders
|
242
|
|
- for (let i = 0; i < newData.length; i++) {
|
243
|
|
- let index = newData.indexOf(this.list)
|
244
|
|
- this.printPdf(`item${index}`)
|
245
|
|
- }
|
|
250
|
+ this.updateList(JSON.parse(e.data).data.refreshOnlineGoodsOrders).then(() => {
|
|
251
|
+ for (let i = 0; i < newData.length; i++) {
|
|
252
|
+ let index = newData[i].indexOf(this.list)
|
|
253
|
+ this.printPdf(`item${index}`)
|
|
254
|
+ }
|
|
255
|
+ })
|
246
|
256
|
},
|
247
|
257
|
open () {
|
248
|
258
|
if (!this.caseid) {
|