From dbf34179e947c35592f05fa1bfdadd7fede4da54 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 4 Dec 2024 17:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E5=95=86=E5=93=81=E9=BB=98=E8=AE=A4=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E6=88=96=E8=80=85=E6=94=AF=E4=BB=98=E5=90=8E=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E6=95=B4=E5=8D=95=E7=AD=89=E5=8F=AB=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/components/cart-item.vue | 12 +++++++++++- src/views/tool/Instead/index.vue | 15 +++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/tool/Instead/components/cart-item.vue b/src/views/tool/Instead/components/cart-item.vue index b472feb..33c6247 100644 --- a/src/views/tool/Instead/components/cart-item.vue +++ b/src/views/tool/Instead/components/cart-item.vue @@ -6,7 +6,7 @@ >
- + 退
@@ -35,6 +35,9 @@ >赠 +
+ ¥{{ currentPrice}}/{{ item.unit }} +
{{ item.specSnap }}
@@ -164,6 +167,12 @@ export default { }; }, computed: { + currentPrice(){ + if(!this.isShowVipPrice){ + return this.item.salePrice + } + return this.memberPrice?this.memberPrice:this.item.salePrice + }, discountNewPrice(){ const item = this.item; const originPrice=this.isShowVipPrice?this.vipAllPrice:this.allPrice @@ -317,6 +326,7 @@ export default { .pack { background: #35ac6a; } + .da { background: #35ac6a; } diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index bd760b3..66384a4 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -1833,7 +1833,8 @@ export default { if (this.order.selIndex < 0) { 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) => { return v.productId === productId && v.skuId === skuId; }); + const newNum=this.order.number + (oldGoods ? oldGoods.number : 0) $updateCart({ cartId: item.id, productId, skuId, tableId: this.table.tableId, - num: this.order.number + (oldGoods ? oldGoods.number : 0), // 0会删除此商品 + num:newNum.toFixed(2) , // 0会删除此商品 }).then((res) => { this.$set(this.order.list, this.order.selIndex, { ...res, specSnap: item.specSnap || res.skuName, - number: this.order.number, }); }); return; - this.updateOrder({ - num: newval, // 0会删除此商品 - }); }, 30), "goods.query.productId": function (newval) { if (!this.$goodsData) { @@ -2581,9 +2579,9 @@ export default { }); }, async returnCreateOrderData() { + this.isWaitCall=false; if (this.key == "isJieZhang" || this.order.list.length <= 0) { //结账来的下单或者已经生成订单 - // this.order.old.list = formatOrderGoodsList(this.createOrder.data.detailList||[]); this.isCreateOrder = true; return this.createOrder.data; } @@ -3373,7 +3371,7 @@ export default { return this.removeCart(); } if (key === "print") { - const isPrint = orderGoods.isPrint; + const isPrint = (orderGoods.isPrint||orderGoods.isPrint===null)?true:false; this.updateOrder({ isPrint: !isPrint }); return; } @@ -3902,6 +3900,7 @@ export default { }, reset() { // this.goods.list = []; + this.isAllWaitCall=false; this.guazhangRen = ""; this.order.status = ""; this.loading = false;