|
@@ -42,6 +42,7 @@
|
|
|
{{pros.retailPrice ? pros.retailPrice.toFixed(2) : ''}}
|
|
|
</view>
|
|
|
<view class="count" :class="[isshowDelbtn ? 'none':'show']">
|
|
|
+ <text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
|
|
|
<view class="number-box">
|
|
|
<view class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
|
|
|
<input class="btn-input" type="number" maxlength='6' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
|
|
@@ -187,10 +188,17 @@
|
|
|
this.hasNextPage = resultsData.hasNextPage;
|
|
|
this.goodsList = resultsData.results;
|
|
|
this.goodsList.forEach((item,index) => {
|
|
|
- let productsListLength = item.productsList.length,
|
|
|
- invalidLength = 0;
|
|
|
+ let productsListLength = item.productsList.length,invalidLength = 0;
|
|
|
item.productsList.forEach(pros => {
|
|
|
pros.shopID = item.shopID;
|
|
|
+ pros.isStep = false
|
|
|
+ if(pros.step === 2){
|
|
|
+ if(pros.productCount % pros.minBuyNumber != 0){
|
|
|
+ pros.productCount = pros.minBuyNumber
|
|
|
+ this.totalShopPeice()
|
|
|
+ this.updateShoppogNum(pros)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
this.pullFlag = false;
|
|
@@ -221,6 +229,20 @@
|
|
|
let resultsData = response.data.pageDate
|
|
|
this.hasNextPage = resultsData.hasNextPage;
|
|
|
this.goodsList = this.goodsList.concat(resultsData.results)
|
|
|
+ this.goodsList.forEach((item,index) => {
|
|
|
+ let productsListLength = item.productsList.length,invalidLength = 0;
|
|
|
+ item.productsList.forEach(pros => {
|
|
|
+ pros.shopID = item.shopID;
|
|
|
+ pros.isStep = false
|
|
|
+ if(pros.step === 2){
|
|
|
+ if(pros.productCount % pros.minBuyNumber != 0){
|
|
|
+ pros.productCount = pros.minBuyNumber
|
|
|
+ this.totalShopPeice()
|
|
|
+ this.updateShoppogNum(pros)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
this.pullFlag = false;// 防上拉暴滑
|
|
|
setTimeout(()=>{this.pullFlag = true;},500)
|
|
|
if(this.hasNextPage){
|
|
@@ -351,9 +373,16 @@
|
|
|
})
|
|
|
},
|
|
|
changeCountAdd(item,pros){//商品数量加加
|
|
|
- pros.productCount++
|
|
|
- this.processActivityPrice(pros)
|
|
|
- this.isStock =false
|
|
|
+ if(pros.step === 2){
|
|
|
+ pros.isStep = false
|
|
|
+ pros.productCount += pros.minBuyNumber
|
|
|
+ this.processActivityPrice(pros)
|
|
|
+ this.isStock = false
|
|
|
+ }else{
|
|
|
+ pros.productCount++
|
|
|
+ this.processActivityPrice(pros)
|
|
|
+ this.isStock = false
|
|
|
+ }
|
|
|
this.updateShoppogNum(pros)
|
|
|
this.totalShopPeice();
|
|
|
},
|
|
@@ -363,7 +392,12 @@
|
|
|
this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
|
|
|
return
|
|
|
}else{
|
|
|
- pros.productCount--
|
|
|
+ if(pros.step === 2){
|
|
|
+ pros.isStep = false
|
|
|
+ pros.productCount -= pros.minBuyNumber
|
|
|
+ }else{
|
|
|
+ pros.productCount--
|
|
|
+ }
|
|
|
this.processActivityPrice(pros)
|
|
|
}
|
|
|
this.updateShoppogNum(pros)
|
|
@@ -376,7 +410,11 @@
|
|
|
}else if(_value < pros.minBuyNumber){
|
|
|
this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
|
|
|
pros.productCount = pros.minBuyNumber
|
|
|
+ }else if(_value % pros.minBuyNumber != 0){
|
|
|
+ pros.isStep = true
|
|
|
+ pros.productCount = pros.minBuyNumber
|
|
|
}else{
|
|
|
+ pros.isStep = false
|
|
|
pros.productCount = e.detail.value
|
|
|
this.processActivityPrice(pros)
|
|
|
}
|
|
@@ -740,6 +778,37 @@
|
|
|
&.none{
|
|
|
display: none;
|
|
|
}
|
|
|
+ .count-tips{
|
|
|
+ width: auto;
|
|
|
+ display: inline-block;
|
|
|
+ padding: 0 15rpx;
|
|
|
+ line-height: 44rpx;
|
|
|
+ height: 44rpx;
|
|
|
+ border-radius: 22rpx;
|
|
|
+ background: $btn-confirm;
|
|
|
+ font-size: $font-size-24;
|
|
|
+ text-align: center;
|
|
|
+ color: #FFFFFF;
|
|
|
+ position: absolute;
|
|
|
+ top:-60rpx;
|
|
|
+ left: -5rpx;
|
|
|
+ z-index: 5;
|
|
|
+ &.step{
|
|
|
+ left:-217rpx
|
|
|
+ }
|
|
|
+ &::before{
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ bottom: -30rpx;
|
|
|
+ right: 15rpx;
|
|
|
+ z-index:1;
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ border-width: 18rpx;
|
|
|
+ border-style: solid;
|
|
|
+ border-color:$color-system transparent transparent transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
.number-box{
|
|
|
display: flex;
|
|
|
justify-content: center;
|