+
{{
status[item.status] ? status[item.status].label : ""
}}
- {{
- goods.status=='end'?'没有更多了':'加载中'
- }}
+
+ {{ goods.status == "end" ? "没有更多了" : "加载中" }}
+
0) {
+ try {
+ res1 = await this.$confirm(
+ "该台桌购物车里有商品,是否清除该台桌里的商品?",
+ "提示",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ );
+ } catch (e) {
+ console.log(e);
+ }
+ await $choseTable({
+ masterId: this.masterId,
+ tableId: item.tableId,
+ isClear: res1 == "confirm" ? true : false,
+ });
+ }
+
this.table = item;
this.tableShow = false;
},
@@ -2100,9 +2144,10 @@ export default {
}
this.pays();
},
- payTypeItemClick(item) {
- console.log(item);
- console.log(this.vipUser.id);
+ payTypeItemClick(item,order) {
+ order=order?order:this.createOrder.data;
+ console.log('--------order------')
+ console.log(order)
if (item.payType == "vipPay") {
return this.refChooseUserOpen();
}
@@ -2112,7 +2157,7 @@ export default {
}
if (item.payType == "scanCode") {
//扫码支付
- return this.refToggle("refWxScanCode", true, this.createOrder.data);
+ return this.refToggle("refWxScanCode", true, {orderId:order.id,payAmount: (this.createOrder.data.amount * order.discount).toFixed(2)});
}
},
ChangeDiscount(discount) {
@@ -2246,7 +2291,7 @@ export default {
return this.refChooseUserOpen();
}
if (this.order.payType == "scanCode") {
- return this.refToggle("refWxScanCode", true, this.createOrder.data);
+ return this.refToggle("refWxScanCode", true, {orderId:this.createOrder.data.id,payAmount: (this.createOrder.data.amount * this.createOrder.discount).toFixed(2)});
}
if (this.order.payType == "deposit") {
return this.refToggle("refScanCode", true);
@@ -3168,10 +3213,10 @@ export default {
}
},
async getGoods() {
- if(this.goods.status=='end'){
- return
+ if (this.goods.status == "end") {
+ return;
}
- this.goods.status='loadmore'
+ this.goods.status = "loadmore";
const res = await getGoodsLists(this.goods.query);
let $goodsMap = {};
const goods = res.records.filter((v) => {
@@ -3190,7 +3235,8 @@ export default {
for (let i in goods) {
this.goods.list.push(goods[i]);
}
- this.goods.status= this.goods.list.length>=res.total ? 'end' : 'loadmore'
+ this.goods.status =
+ this.goods.list.length >= res.total ? "end" : "loadmore";
this.goods.total = res.total;
this.$goodsData = goods;
},
@@ -3246,7 +3292,7 @@ export default {
},
close() {
if (this.table.tableId) {
- this.$router.replace({ path: "/table/table_list" });
+ this.$router.replace({ path: "/tool/table_list" });
} else {
this.$router.go(0);
// this.reset();