fix: 🐛 优化批发商品购买数量不能低于起批量
parent
34ef7e555a
commit
053e5ce062
|
@ -238,6 +238,7 @@
|
||||||
:disabled="skuDetail.quantity === 0"
|
:disabled="skuDetail.quantity === 0"
|
||||||
v-model="count"
|
v-model="count"
|
||||||
:precision="0.1"
|
:precision="0.1"
|
||||||
|
@on-blur="changeCount"
|
||||||
></InputNumber>
|
></InputNumber>
|
||||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -317,6 +318,9 @@ export default {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.skuDetail = val.data;
|
this.skuDetail = val.data;
|
||||||
this.wholesaleList = val.wholesaleList;
|
this.wholesaleList = val.wholesaleList;
|
||||||
|
if (this.wholesaleList && this.wholesaleList.length > 0) {
|
||||||
|
this.count = this.wholesaleList[0].num;
|
||||||
|
}
|
||||||
this.swiperGoodsImg();
|
this.swiperGoodsImg();
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -364,6 +368,14 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
select(index, value) {
|
||||||
// 选择规格
|
// 选择规格
|
||||||
this.$set(this.currentSelceted, index, value);
|
this.$set(this.currentSelceted, index, value);
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
v-if="item.content.salesModel === 'WHOLESALE'"
|
v-if="item.content.salesModel === 'WHOLESALE'"
|
||||||
class="goods-show-tag"
|
class="goods-show-tag"
|
||||||
color="purple"
|
color="purple"
|
||||||
>
|
>
|
||||||
批发
|
批发
|
||||||
</Tag>
|
</Tag>
|
||||||
<span>{{ item.content.goodsName }}</span>
|
<span>{{ item.content.goodsName }}</span>
|
||||||
|
@ -76,33 +76,30 @@
|
||||||
>人评价
|
>人评价
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-show-seller">
|
<div class="goods-show-seller">
|
||||||
<Tag
|
|
||||||
class="goods-show-buyer"
|
|
||||||
v-if="item.content.selfOperated"
|
|
||||||
size="default"
|
|
||||||
color="error"
|
|
||||||
>自营
|
|
||||||
</Tag>
|
|
||||||
<div class="goods-show-right">
|
|
||||||
<div
|
|
||||||
class="goods-show-middle"
|
|
||||||
v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"
|
|
||||||
>
|
|
||||||
虚拟
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="goods-show-middle"
|
|
||||||
v-else-if="
|
|
||||||
goodsListType.content.goodsType == 'PHYSICAL_GOODS'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
实物
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span class="text-bottom" style="color: #e4393c">{{
|
<span class="text-bottom" style="color: #e4393c">{{
|
||||||
item.content.storeName
|
item.content.storeName
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="goods-show-right">
|
||||||
|
<Tag class="goods-show-tag" color="red" v-if="item.content.selfOperated">
|
||||||
|
自营
|
||||||
|
</Tag>
|
||||||
|
<Tag
|
||||||
|
class="goods-show-tag" color="blue"
|
||||||
|
v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"
|
||||||
|
>
|
||||||
|
虚拟
|
||||||
|
</Tag>
|
||||||
|
<Tag
|
||||||
|
class="goods-show-tag" color="blue"
|
||||||
|
v-else-if="
|
||||||
|
goodsListType.content.goodsType == 'PHYSICAL_GOODS'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
实物
|
||||||
|
</Tag>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,11 +254,12 @@ export default {
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "../assets/styles/goodsList.scss";
|
@import "../assets/styles/goodsList.scss";
|
||||||
.goods-show-info > .goods-show-seller > .goods-show-buyer {
|
.goods-show-info > .goods-show-seller > .goods-show-buyer {
|
||||||
height: 16px;
|
width: 35px;
|
||||||
width: 30px;
|
height: 17px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
align-content: center;
|
||||||
padding: 0 3px;
|
padding: 0 3px;
|
||||||
background-color: #e23a3a;
|
background-color: #e23a3a;
|
||||||
}
|
}
|
||||||
|
@ -298,27 +296,48 @@ export default {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
.goods-show-right {
|
.goods-show-right {
|
||||||
width: 35px;
|
display: flex;
|
||||||
height: 17px;
|
flex-direction: row;
|
||||||
// vertical-align:middle;
|
margin-top: 5px;
|
||||||
overflow: hidden;
|
}
|
||||||
margin-top: 1.5px;
|
|
||||||
margin-right: 5px;
|
|
||||||
line-height: 16px;
|
.goods-show-self {
|
||||||
background: white;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
float: left;
|
float: left;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 0 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
overflow: hidden;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
background: #e23a3a;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-show-middle {
|
||||||
|
float: left;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 0 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
border: 1px solid rgba(112, 123, 187, 0.8);
|
border: 1px solid rgba(112, 123, 187, 0.8);
|
||||||
color: rgba(112, 123, 187, 0.8);
|
color: rgba(112, 123, 187, 0.8);
|
||||||
}
|
}
|
||||||
.goods-show-middle:hover {
|
|
||||||
color: rgba(2, 15, 88, 0.6);
|
// .goods-show-middle:hover {
|
||||||
border: 0.2px solid rgba(0, 13, 87, 0.6);
|
// color: rgba(2, 15, 88, 0.6);
|
||||||
border-radius: 4px;
|
// border: 0.2px solid rgba(0, 13, 87, 0.6);
|
||||||
line-height: 18px;
|
// border-radius: 4px;
|
||||||
}
|
// line-height: 18px;
|
||||||
|
// }
|
||||||
|
|
||||||
.item-as-title {
|
.item-as-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
|
Loading…
Reference in New Issue