|
@@ -101,8 +101,17 @@
|
|
:useType="useType"
|
|
:useType="useType"
|
|
:buttonType="buttonType"
|
|
:buttonType="buttonType"
|
|
@confirm="onSaveNewUnit"
|
|
@confirm="onSaveNewUnit"
|
|
|
|
+ @activityClick="handleShowActivity"
|
|
v-if="productInfo"
|
|
v-if="productInfo"
|
|
></cm-goods-buy-popup>
|
|
></cm-goods-buy-popup>
|
|
|
|
+
|
|
|
|
+ <!-- 活动价 -->
|
|
|
|
+ <cm-goods-activity-popup
|
|
|
|
+ ref="activitypPopup"
|
|
|
|
+ :ladderList="ladderPriceList"
|
|
|
|
+ @open="$refs.receiveBuyPopup.close()"
|
|
|
|
+ @close="$refs.receiveBuyPopup.open()"
|
|
|
|
+ ></cm-goods-activity-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -154,7 +163,8 @@ const resetData = () => ({
|
|
useType: 'cart',
|
|
useType: 'cart',
|
|
buttonType: 'left',
|
|
buttonType: 'left',
|
|
goodsCouponList: [],
|
|
goodsCouponList: [],
|
|
- productInfo: null
|
|
|
|
|
|
+ productInfo: null,
|
|
|
|
+ ladderPriceList: []
|
|
})
|
|
})
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -211,7 +221,7 @@ export default {
|
|
this[key] = data[key]
|
|
this[key] = data[key]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 确认清空失效商品
|
|
// 确认清空失效商品
|
|
async onConfirmRemoveExp(e) {
|
|
async onConfirmRemoveExp(e) {
|
|
if (!e.index) return
|
|
if (!e.index) return
|
|
@@ -235,6 +245,7 @@ export default {
|
|
params.allPrice = this.allPrice
|
|
params.allPrice = this.allPrice
|
|
params.allCount = this.checkedProductList.length
|
|
params.allCount = this.checkedProductList.length
|
|
params.cartIds = this.checkedProductList.map(product => product.cartId)
|
|
params.cartIds = this.checkedProductList.map(product => product.cartId)
|
|
|
|
+ // params.skuIds = this.checkedProductList.map(product => product.skuId)
|
|
params.productIds = this.checkedProductList.map(product => product.productId)
|
|
params.productIds = this.checkedProductList.map(product => product.productId)
|
|
params.productCount = ''
|
|
params.productCount = ''
|
|
uni.setStorageSync('COMMIT_CART_INFO', params)
|
|
uni.setStorageSync('COMMIT_CART_INFO', params)
|
|
@@ -343,7 +354,7 @@ export default {
|
|
const shopInfo = this.shopList.find(item => row.shopId === item.shopId)
|
|
const shopInfo = this.shopList.find(item => row.shopId === item.shopId)
|
|
if (!shopInfo) return
|
|
if (!shopInfo) return
|
|
shopInfo.productList.forEach(item => {
|
|
shopInfo.productList.forEach(item => {
|
|
- if (row.checkedList.includes(item.productId.toString())) {
|
|
|
|
|
|
+ if (row.checkedList.includes(item.skuId.toString())) {
|
|
this.$set(item, 'checked', true)
|
|
this.$set(item, 'checked', true)
|
|
} else {
|
|
} else {
|
|
this.$set(item, 'checked', false)
|
|
this.$set(item, 'checked', false)
|
|
@@ -390,6 +401,13 @@ export default {
|
|
}, 1000)
|
|
}, 1000)
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 活动价弹窗
|
|
|
|
+ handleShowActivity(current) {
|
|
|
|
+ if (!current.ladderPriceList) return
|
|
|
|
+ this.ladderPriceList = current.ladderPriceList
|
|
|
|
+ this.$refs.receiveBuyPopup.open()
|
|
|
|
+ },
|
|
|
|
+
|
|
// 保存商品规格
|
|
// 保存商品规格
|
|
async onSaveNewUnit(e) {
|
|
async onSaveNewUnit(e) {
|
|
try {
|
|
try {
|