代客下单新增称重商品
This commit is contained in:
@@ -1321,7 +1321,9 @@
|
||||
<div class="key" @click="keyboradAdd('9')">9</div>
|
||||
</div>
|
||||
<div class="key-line">
|
||||
<div class="key"></div>
|
||||
<div class="key" @click="keyboradAdd('.')">
|
||||
<span v-if="selGoods.isSku=='weight'">.</span>
|
||||
</div>
|
||||
<div class="key" @click="keyboradAdd('0')">0</div>
|
||||
<div
|
||||
class="key"
|
||||
@@ -1502,6 +1504,8 @@
|
||||
|
||||
<!-- 称重商品 -->
|
||||
<popup-weight-goods
|
||||
:isShowVipPrice="isShowVipPrice"
|
||||
|
||||
ref="refWeightGoods"
|
||||
@confirm="refWeightGoodsConfirm"
|
||||
>
|
||||
@@ -2361,15 +2365,9 @@ export default {
|
||||
},
|
||||
//称重商品确认
|
||||
async refWeightGoodsConfirm(item,number){
|
||||
let {masterId} =await this.getMasterId()
|
||||
let obj = {
|
||||
num:number *1,
|
||||
masterId,
|
||||
productId: this.selGoods.data.id,
|
||||
}
|
||||
// console.log(obj,'拿到的obj')
|
||||
// console.log(this.selGoods,'拿到的')
|
||||
this.chooseSkuConfirm()
|
||||
console.log(item)
|
||||
console.log(number)
|
||||
this.goodsClick(item,number,true)
|
||||
},
|
||||
//挂账人支付确认
|
||||
guazhangPayConfirm(guazhangren, price) {
|
||||
@@ -3299,6 +3297,9 @@ export default {
|
||||
});
|
||||
},
|
||||
keyboradAdd(n) {
|
||||
if(this.selGoods.isSku!='weight'&&n=='.'){
|
||||
return
|
||||
}
|
||||
if (Number(this.keyborad.number) === 0) {
|
||||
return (this.keyborad.number = n);
|
||||
}
|
||||
@@ -3327,9 +3328,13 @@ export default {
|
||||
},
|
||||
changeKeyboradShow(show) {
|
||||
if (show) {
|
||||
this.selGoods=this.order.list[this.order.selIndex]
|
||||
this.keyborad.number = `${this.order.list[this.order.selIndex].number}`;
|
||||
}
|
||||
this.keyborad.show = show;
|
||||
if(!show){
|
||||
this.selGoods=''
|
||||
}
|
||||
},
|
||||
// 获取本地缓存挂单
|
||||
// getPrveCart() {
|
||||
@@ -4069,11 +4074,11 @@ export default {
|
||||
}
|
||||
},
|
||||
//根据右侧商品单规格多规格做不同处理
|
||||
async goodsClick(item) {
|
||||
async goodsClick(item,number=0, isConfirm=false) {
|
||||
// if (!this.table) {
|
||||
// return this.$message.error("暂不支持无桌台下单,请先选择桌台");
|
||||
// }
|
||||
if(item.type=='weigh'){
|
||||
if(item.type=='weigh'&&!isConfirm){
|
||||
return this.refWeightGoodsShow(item)
|
||||
}
|
||||
if (item.typeEnum === "sku") {
|
||||
@@ -4107,7 +4112,8 @@ export default {
|
||||
// tableId: this.table.tableId,
|
||||
// num: orderGoods.number * 1 + item.specList[0].suit, // 0会删除此商品
|
||||
// });
|
||||
orderGoods.number += item.specList[0].suit;
|
||||
const suit=number||item.specList[0].suit
|
||||
orderGoods.number +=suit*1 ;
|
||||
this.order.number = orderGoods.number;
|
||||
this.changeOrderSel(orderGoodsIndex);
|
||||
} else {
|
||||
@@ -4122,7 +4128,7 @@ export default {
|
||||
productId: item.id,
|
||||
skuId: item.specList[0].id,
|
||||
tableId: this.table.tableId,
|
||||
num: item.specList[0].suit, // 0会删除此商品
|
||||
num:number|| item.specList[0].suit, // 0会删除此商品
|
||||
isPack: false, // 是否打包
|
||||
isWaitCall:this.isAllWaitCall //是否等叫
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user