Commit fbf61bc3 by 李伟康

refactor(OrderPopup): 优化 SKU 弹窗逻辑

- 在 SkuGoodsList 组件中,修改 openSkuPopup 事件的参数,增加 chooseList
- 在 SkuPopup 组件中,添加 currentId 初始化操作
- 修改 OrderPopup 组件中的 openSkuPopup 方法,根据 chooseList 决定是否关闭弹窗
1 parent 00524deb
......@@ -303,7 +303,7 @@ export default {
item.specificationStr = item.specificationData.replace(/;~;/g, '/')
})
goodsList[index].multipleSpecificationsGoods.skuGoodsList = goodsArr
this.$emit('openSkuPopup', goodsList[index])
this.$emit('openSkuPopup', goodsList[index], this.chooseList)
this.$set(searchStatus ? this.searchList : this.list, index, goodsList[index])
}
} else {
......
......@@ -74,6 +74,7 @@ export default {
},
methods: {
open (data) {
this.currentId = ''
this.data = data
this.$nextTick(() => {
this.$refs.popup.open()
......
......@@ -137,10 +137,10 @@ export default {
position: 'bottom',
chooseContent: null,
componentObject: JSON.parse(JSON.stringify(config.componentConfig)),
positionTypeList:[]
positionTypeList: []
}
},
watch: {
popupType: {
handler (val) {
......@@ -233,8 +233,9 @@ export default {
})
}
},
openSkuPopup (data) {
this.confirm()
openSkuPopup (data, chooseList) {
if (chooseList.length) this.confirm()
else this.$refs.popup.close()
this.$refs.skuPopupRef.open(data)
},
skuConfirm (e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!