From 8403afd685e4bdac75708beb6f51d58d931ef310 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 31 Oct 2024 16:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=A2=B3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .../order_manage/components/orderDetail.vue | 6 +- src/views/order_manage/order_list.vue | 22 +- .../tool/Instead/components/cart-item.vue | 2 +- .../tool/Instead/components/discount.vue | 2 +- src/views/tool/Instead/index.vue | 296 ++++++++++++------ src/views/tool/Instead/util.js | 61 +++- 7 files changed, 280 insertions(+), 113 deletions(-) diff --git a/.env.development b/.env.development index 98c3e63..fdeba2f 100644 --- a/.env.development +++ b/.env.development @@ -5,9 +5,9 @@ ENV = 'development' # VUE_APP_BASE_API = 'http://192.168.2.42:8000' # VUE_APP_BASE_API = 'http://192.168.2.133:8000' # 测试 -# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' +VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' #预发布 -VUE_APP_BASE_API = 'https://pre-cashieradmin.sxczgkj.cn' +# VUE_APP_BASE_API = 'https://pre-cashieradmin.sxczgkj.cn' # 生产 # VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' diff --git a/src/views/order_manage/components/orderDetail.vue b/src/views/order_manage/components/orderDetail.vue index 6e3a19e..d7405ce 100644 --- a/src/views/order_manage/components/orderDetail.vue +++ b/src/views/order_manage/components/orderDetail.vue @@ -130,14 +130,14 @@ ¥{{ scope.row.priceAmount }} - + @@ -280,6 +280,7 @@ export default { num:e.num }] }); + this.$message.success("退款成功"); this.update(); }, update(){ @@ -291,6 +292,7 @@ export default { cartId: this.selGoods.id, tableId: this.detail.tableId, }); + this.$message.success("退菜成功"); this.update(); }, tuikuan(item){ diff --git a/src/views/order_manage/order_list.vue b/src/views/order_manage/order_list.vue index 79fef88..219db31 100644 --- a/src/views/order_manage/order_list.vue +++ b/src/views/order_manage/order_list.vue @@ -146,9 +146,12 @@ {{ scope.row.createdAt | timeFilter }} - + @@ -247,6 +250,21 @@ export default { }, methods: { + //结账 + payOrder(order){ + console.log(order); + this.$router.push({ + path: "/tool/Instead/index", + query: { + table_name: order.tableName, + tableId: order.tableId, + useType: order.useType, + masterId: order.masterId, + orderId: order.id, + key:'isJieZhang' + }, + }); + }, // 获取订单汇总 async payCount() { try { diff --git a/src/views/tool/Instead/components/cart-item.vue b/src/views/tool/Instead/components/cart-item.vue index f88f087..65b7197 100644 --- a/src/views/tool/Instead/components/cart-item.vue +++ b/src/views/tool/Instead/components/cart-item.vue @@ -76,7 +76,7 @@ }" > ¥{{ item.totalAmount }} - ¥{{ item.totalAmount }} + ¥{{ (item.salePrice*item.number+(item.packAmount||0)).toFixed(2) }} diff --git a/src/views/tool/Instead/components/discount.vue b/src/views/tool/Instead/components/discount.vue index 6f21835..f7c0270 100644 --- a/src/views/tool/Instead/components/discount.vue +++ b/src/views/tool/Instead/components/discount.vue @@ -154,7 +154,7 @@ export default { } if (curretnMoney > money) { this.$message.error("实收金额不能大于总金额"); - this.form.curretnMoney = 0; + this.form.curretnMoney = form.money; } this.form.reduceMoney = (money - this.form.curretnMoney).toFixed(2); this.form.discount =toFixedNoRounding( ((this.form.curretnMoney / money) * 100).toFixed(3) ); diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index c50dcbb..229a95c 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -46,11 +46,12 @@ trigger="click" v-model="tableShow" > - + @input="searchInput" + >
-