Merge branch 'ymf_test' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into test
This commit is contained in:
commit
5cbd9aa18e
|
|
@ -6,7 +6,7 @@
|
||||||
>
|
>
|
||||||
<div class="absolute status-box">
|
<div class="absolute status-box">
|
||||||
<span class="pack" v-if="item.isPack === 'true'"> 包 </span>
|
<span class="pack" v-if="item.isPack === 'true'"> 包 </span>
|
||||||
<span class="da" v-if="item.isPrint"> 打 </span>
|
<span class="da" v-if="item.isPrint||item.isPrint===null"> 打 </span>
|
||||||
<span class="isWaitCall" v-if="item.isWaitCall">等 </span>
|
<span class="isWaitCall" v-if="item.isWaitCall">等 </span>
|
||||||
<span class="tui" v-if="item.status === 'return'"> 退 </span>
|
<span class="tui" v-if="item.status === 'return'"> 退 </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,6 +35,9 @@
|
||||||
>赠</span
|
>赠</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="item.typeEnum=='weight'" class="specSnap">
|
||||||
|
¥{{ currentPrice}}/{{ item.unit }}
|
||||||
|
</div>
|
||||||
<div v-if="item.specSnap" class="specSnap">
|
<div v-if="item.specSnap" class="specSnap">
|
||||||
{{ item.specSnap }}
|
{{ item.specSnap }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -164,6 +167,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
currentPrice(){
|
||||||
|
if(!this.isShowVipPrice){
|
||||||
|
return this.item.salePrice
|
||||||
|
}
|
||||||
|
return this.memberPrice?this.memberPrice:this.item.salePrice
|
||||||
|
},
|
||||||
discountNewPrice(){
|
discountNewPrice(){
|
||||||
const item = this.item;
|
const item = this.item;
|
||||||
const originPrice=this.isShowVipPrice?this.vipAllPrice:this.allPrice
|
const originPrice=this.isShowVipPrice?this.vipAllPrice:this.allPrice
|
||||||
|
|
@ -317,6 +326,7 @@ export default {
|
||||||
.pack {
|
.pack {
|
||||||
background: #35ac6a;
|
background: #35ac6a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.da {
|
.da {
|
||||||
background: #35ac6a;
|
background: #35ac6a;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1833,7 +1833,8 @@ export default {
|
||||||
if (this.order.selIndex < 0) {
|
if (this.order.selIndex < 0) {
|
||||||
return "免厨打";
|
return "免厨打";
|
||||||
}
|
}
|
||||||
return this.order.list[this.order.selIndex].isPrint
|
const cart=this.order.list[this.order.selIndex]
|
||||||
|
return (cart.isPrint||cart.isPrint===null)
|
||||||
? "免厨打"
|
? "免厨打"
|
||||||
: "打印";
|
: "打印";
|
||||||
},
|
},
|
||||||
|
|
@ -2312,23 +2313,20 @@ export default {
|
||||||
const oldGoods = this.order.old.list.find((v) => {
|
const oldGoods = this.order.old.list.find((v) => {
|
||||||
return v.productId === productId && v.skuId === skuId;
|
return v.productId === productId && v.skuId === skuId;
|
||||||
});
|
});
|
||||||
|
const newNum=this.order.number + (oldGoods ? oldGoods.number : 0)
|
||||||
$updateCart({
|
$updateCart({
|
||||||
cartId: item.id,
|
cartId: item.id,
|
||||||
productId,
|
productId,
|
||||||
skuId,
|
skuId,
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
num: this.order.number + (oldGoods ? oldGoods.number : 0), // 0会删除此商品
|
num:newNum.toFixed(2) , // 0会删除此商品
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.$set(this.order.list, this.order.selIndex, {
|
this.$set(this.order.list, this.order.selIndex, {
|
||||||
...res,
|
...res,
|
||||||
specSnap: item.specSnap || res.skuName,
|
specSnap: item.specSnap || res.skuName,
|
||||||
number: this.order.number,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
this.updateOrder({
|
|
||||||
num: newval, // 0会删除此商品
|
|
||||||
});
|
|
||||||
}, 30),
|
}, 30),
|
||||||
"goods.query.productId": function (newval) {
|
"goods.query.productId": function (newval) {
|
||||||
if (!this.$goodsData) {
|
if (!this.$goodsData) {
|
||||||
|
|
@ -2581,9 +2579,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async returnCreateOrderData() {
|
async returnCreateOrderData() {
|
||||||
|
this.isWaitCall=false;
|
||||||
if (this.key == "isJieZhang" || this.order.list.length <= 0) {
|
if (this.key == "isJieZhang" || this.order.list.length <= 0) {
|
||||||
//结账来的下单或者已经生成订单
|
//结账来的下单或者已经生成订单
|
||||||
// this.order.old.list = formatOrderGoodsList(this.createOrder.data.detailList||[]);
|
|
||||||
this.isCreateOrder = true;
|
this.isCreateOrder = true;
|
||||||
return this.createOrder.data;
|
return this.createOrder.data;
|
||||||
}
|
}
|
||||||
|
|
@ -3373,7 +3371,7 @@ export default {
|
||||||
return this.removeCart();
|
return this.removeCart();
|
||||||
}
|
}
|
||||||
if (key === "print") {
|
if (key === "print") {
|
||||||
const isPrint = orderGoods.isPrint;
|
const isPrint = (orderGoods.isPrint||orderGoods.isPrint===null)?true:false;
|
||||||
this.updateOrder({ isPrint: !isPrint });
|
this.updateOrder({ isPrint: !isPrint });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3902,6 +3900,7 @@ export default {
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
// this.goods.list = [];
|
// this.goods.list = [];
|
||||||
|
this.isAllWaitCall=false;
|
||||||
this.guazhangRen = "";
|
this.guazhangRen = "";
|
||||||
this.order.status = "";
|
this.order.status = "";
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue