소스 검색

修改bug

chenrui 1 년 전
부모
커밋
8e87fa59eb
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

+ 6 - 4
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -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) {