From e876fed618abd4237b9818424b72d01e24f8908c Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期四, 01 八月 2024 16:22:17 +0800 Subject: [PATCH] update --- sub_pages/customer/trade/detail.vue | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sub_pages/customer/trade/detail.vue b/sub_pages/customer/trade/detail.vue index b645d37..dec4ff7 100644 --- a/sub_pages/customer/trade/detail.vue +++ b/sub_pages/customer/trade/detail.vue @@ -172,7 +172,7 @@ } else { if (!item.stock || t > item.stock) { - this.$message.showToast('库存不足无法修改') + this.$message.showToast('库存不足无法修改') return } this.addnum(item, (t - item.shopnum)) @@ -196,7 +196,7 @@ if (!item.stock) { item.stock = 0 } - if (item.shopnum + addnum > item.stock) { + if (addnum > 0 & item.shopnum + addnum > item.stock) { this.$message.showToast('库存不足,无法修改') return } @@ -223,7 +223,9 @@ }, async refreshShopNum() { - this.shopnum = await this.$store.dispatch('countShopping'); + this.shopnum = await this.$store.dispatch('countShopping'); + this.$store.dispatch('sign_add','shopnum') + }, async collectItem(dto) { if (!this.currentInfo.id) { -- Gitblit v1.9.3