From 053e5ce062f06e74589f8119b9477138ccffb449 Mon Sep 17 00:00:00 2001 From: paulGao Date: Tue, 29 Nov 2022 11:40:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BC=98=E5=8C=96=E6=89=B9?= =?UTF-8?q?=E5=8F=91=E5=95=86=E5=93=81=E8=B4=AD=E4=B9=B0=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BD=8E=E4=BA=8E=E8=B5=B7=E6=89=B9=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 12 ++ buyer/src/pages/GoodsList.vue | 103 +++++++++++------- 2 files changed, 73 insertions(+), 42 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 7b844042..7924be84 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -238,6 +238,7 @@ :disabled="skuDetail.quantity === 0" v-model="count" :precision="0.1" + @on-blur="changeCount" > 库存{{ skuDetail.quantity }} @@ -317,6 +318,9 @@ export default { handler(val) { this.skuDetail = val.data; this.wholesaleList = val.wholesaleList; + if (this.wholesaleList && this.wholesaleList.length > 0) { + this.count = this.wholesaleList[0].num; + } this.swiperGoodsImg(); }, deep: true, @@ -364,6 +368,14 @@ export default { }, }, methods: { + changeCount(val) { + if (this.wholesaleList && this.wholesaleList.length > 0) { + if (this.count <= this.wholesaleList[0].num) { + this.$Message.warning("购买数量不能小于起批数量"); + this.count = this.wholesaleList[0].num; + } + } + }, select(index, value) { // 选择规格 this.$set(this.currentSelceted, index, value); diff --git a/buyer/src/pages/GoodsList.vue b/buyer/src/pages/GoodsList.vue index 6ff52c06..3721b1c0 100644 --- a/buyer/src/pages/GoodsList.vue +++ b/buyer/src/pages/GoodsList.vue @@ -66,7 +66,7 @@ v-if="item.content.salesModel === 'WHOLESALE'" class="goods-show-tag" color="purple" - > + > 批发 {{ item.content.goodsName }} @@ -76,33 +76,30 @@ >人评价
- 自营 - -
-
- 虚拟 -
-
- 实物 -
-
{{ item.content.storeName }}
+ +
+ + 自营 + + + 虚拟 + + + 实物 + +
@@ -257,11 +254,12 @@ export default {