|
@@ -147,7 +147,8 @@ export default {
|
|
|
productCount: 1,
|
|
|
type: 1
|
|
|
},
|
|
|
- isBtnDisabled: false
|
|
|
+ isBtnDisabled: false,
|
|
|
+ ladderPriceList:[]
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -174,6 +175,10 @@ export default {
|
|
|
this.addParams.skuId = this.skuList[0].skuId
|
|
|
this.addParams.clubId = clubInfo.clubId ? clubInfo.clubId : 0
|
|
|
this.addParams.serviceProviderId = userInfo.serviceProviderId
|
|
|
+ if(this.skuList[0].ladderPriceList){
|
|
|
+ this.isShowLadder = true
|
|
|
+ this.ladderPriceList = this.skuList[0].ladderPriceList
|
|
|
+ }
|
|
|
},
|
|
|
PromotionsFormat(promo) {
|
|
|
//促销活动类型数据处理
|
|
@@ -197,6 +202,7 @@ export default {
|
|
|
} else {
|
|
|
this.productCount++
|
|
|
}
|
|
|
+ this.totalLadderPrice()
|
|
|
},
|
|
|
//popup弹窗数量减按钮
|
|
|
changeCountSub() {
|
|
@@ -211,6 +217,7 @@ export default {
|
|
|
} else {
|
|
|
this.productCount--
|
|
|
}
|
|
|
+ this.totalLadderPrice()
|
|
|
this.isQuantity = false
|
|
|
}
|
|
|
},
|
|
@@ -229,6 +236,18 @@ export default {
|
|
|
} else {
|
|
|
this.productCount = e.detail.value
|
|
|
}
|
|
|
+ this.totalLadderPrice()
|
|
|
+ },
|
|
|
+ totalLadderPrice() {
|
|
|
+ //单独处理活动价格和阶梯价格
|
|
|
+ if(this.ladderPriceList.length>0){
|
|
|
+ this.ladderPriceList.forEach((ladder, index) => {
|
|
|
+ if (this.productCount >= ladder.buyNum) {
|
|
|
+ this.skuProduct.price = ladder.buyPrice
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log('22222222',this.skuProduct.price)
|
|
|
},
|
|
|
handleBuyConfirm() {
|
|
|
this.addParams.productCount = this.productCount
|
|
@@ -256,6 +275,10 @@ export default {
|
|
|
this.skuProduct.price = sku.price
|
|
|
this.skuProduct.originalPrice = sku.originalPrice
|
|
|
this.isBtnDisabled = sku.stock === 0
|
|
|
+ if(sku.ladderPriceList.length>0){
|
|
|
+ this.ladderPriceList = sku.ladderPriceList
|
|
|
+ }
|
|
|
+ console.log('1111111111111',this.ladderPriceList)
|
|
|
this.$emit('skuClick', sku)
|
|
|
},
|
|
|
hidePopup() {
|