|
@@ -67,8 +67,8 @@
|
67
|
67
|
<i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i>
|
68
|
68
|
</div>
|
69
|
69
|
</div>
|
70
|
|
- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link>
|
71
|
|
- <!-- <a @click="showCalcMenu = true">下单</a> -->
|
|
70
|
+ <!-- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link> -->
|
|
71
|
+ <a @click="toPlaceOrder">下单</a>
|
72
|
72
|
</div>
|
73
|
73
|
<orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
|
74
|
74
|
<calcMenu :show="showCalcMenu" :totalNum="totalCupNum" :data="settlementList" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
|
|
@@ -259,6 +259,13 @@ export default {
|
259
|
259
|
'getGoodsTypeList',
|
260
|
260
|
'getGoodsList',
|
261
|
261
|
]),
|
|
262
|
+ toPlaceOrder () { // 下单
|
|
263
|
+ if(this.settlementList.length){
|
|
264
|
+ this.$router.push({name: 'placeOrderDetail', query: {info: JSON.stringify(this.settlementList), caseid: encodeURI(this.caseId), areaid: encodeURI(this.areaId), areaname: encodeURI(this.areaName), areaid: encodeURI(this.areaId), tableid: encodeURI(this.tableId), tableno: encodeURI(this.tableNo)}})
|
|
265
|
+ }else{
|
|
266
|
+ this.$toast('您还没有选择商品哦~')
|
|
267
|
+ }
|
|
268
|
+ },
|
262
|
269
|
mapArr () { // 匹配商品规格
|
263
|
270
|
var aArr = this.goodsTypeList, bArr = this.goodsList
|
264
|
271
|
for (var n = 0; n < aArr.length; n++) {
|
|
@@ -307,7 +314,7 @@ export default {
|
307
|
314
|
title: '提示',
|
308
|
315
|
message: '返回页面将清空当前选择的商品,确定要返回吗?'
|
309
|
316
|
}).then(() => {
|
310
|
|
- this.$router.push({name: 'coffeeIndex'})
|
|
317
|
+ this.$router.push({ name: 'coffeeIndex' })
|
311
|
318
|
})
|
312
|
319
|
},
|
313
|
320
|
placeOrder () { // 下单
|