parent
977b2e5cd7
commit
555d0ebaa0
|
|
@ -921,6 +921,7 @@ export default {
|
|||
},
|
||||
order: {
|
||||
payType: "",
|
||||
masterId:'',
|
||||
allPack: false,
|
||||
btns: [
|
||||
{
|
||||
|
|
@ -1084,7 +1085,11 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
"vipUser.id": async function (val) {
|
||||
const { masterId } = await this.getMasterId();
|
||||
let masterId=this.order.masterId
|
||||
if(!masterId){
|
||||
const res = await this.getMasterId();
|
||||
masterId=res.masterId
|
||||
}
|
||||
this.masterId = masterId;
|
||||
$setUser({
|
||||
tableId: this.table.tableId,
|
||||
|
|
@ -1269,17 +1274,17 @@ export default {
|
|||
this.isCreateOrder = false;
|
||||
},
|
||||
async createOrderShow() {
|
||||
this.order.payType;
|
||||
this.isCreateOrder = true;
|
||||
const res = await $createOrder({
|
||||
masterId: this.masterId,
|
||||
masterId:this.order.masterId||this.masterId,
|
||||
vipUserId: this.vipUser.id,
|
||||
tableId: this.table.tableId,
|
||||
note: this.note.content,
|
||||
note: this.note.content
|
||||
});
|
||||
this.createOrder.data = res;
|
||||
const masterId = await this.getMasterId();
|
||||
this.masterId = masterId;
|
||||
this.isCreateOrder = true;
|
||||
|
||||
},
|
||||
|
||||
// 获取取餐号
|
||||
|
|
@ -1425,12 +1430,14 @@ export default {
|
|||
isPending: false,
|
||||
});
|
||||
this.masterId = masterId;
|
||||
console.log(masterId)
|
||||
const { records } = await getCart({
|
||||
masterId,
|
||||
tableId,
|
||||
vipUserId: userId != "null" ? userId : "",
|
||||
});
|
||||
console.log(records);
|
||||
this.order.masterId=masterId
|
||||
this.order.list = records;
|
||||
this.prveOrder.show = false;
|
||||
return;
|
||||
|
|
@ -1468,6 +1475,7 @@ export default {
|
|||
vipUserId: this.vipUser.id,
|
||||
isPending: true,
|
||||
});
|
||||
this.order.masterId='';
|
||||
this.order.list = [];
|
||||
this.order.selIndex = -1;
|
||||
const masterId = await this.getMasterId();
|
||||
|
|
@ -1779,6 +1787,7 @@ export default {
|
|||
},
|
||||
reset() {
|
||||
// this.goods.list = [];
|
||||
this.order.masterId='';
|
||||
this.order.list = [];
|
||||
this.order.query.page = 1;
|
||||
this.goods.total = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue