|
@@ -598,11 +598,13 @@ export default {
|
|
|
}
|
|
|
if (resultObj.giveRuleList && resultObj.giveRuleList.length > 0) {
|
|
|
_this.fullGiftRuleList = resultObj.giveRuleList
|
|
|
- _this.$nextTick(() => {
|
|
|
- resultObj.giveRuleList.forEach((item, i) => {
|
|
|
- _this.$refs['offerProduct' + i][0].setTabVal(_this.newData(resultObj.giftProductMap['GIFT' + (i * 1 + 1)]))
|
|
|
+ if (resultObj.giftProductMap && Object.keys(resultObj.giftProductMap).length > 0) {
|
|
|
+ _this.$nextTick(() => {
|
|
|
+ resultObj.giveRuleList.forEach((item, i) => {
|
|
|
+ _this.$refs['offerProduct' + i][0].setTabVal(_this.newData(resultObj.giftProductMap['GIFT' + (i * 1 + 1)]))
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
// 重新组成保存数据
|
|
|
if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {
|
|
@@ -721,9 +723,11 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
// 阶梯数据处理
|
|
|
- const stepIndex = this.chooseVal.split('')[1]
|
|
|
- if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
|
|
|
+ const idInfo = this.chooseVal.split('c')[1]
|
|
|
+ const stepIndex = this.fullGiftRuleList.findIndex(item => item.id === idInfo)
|
|
|
+ if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0 && stepIndex > -1) {
|
|
|
const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])
|
|
|
+
|
|
|
if (stepPreviewList && stepPreviewList.length > 0) {
|
|
|
this.previewList = stepPreviewList
|
|
|
const resuleObj = {
|