ソースを参照

全部切换部分经销商,需要不弹窗问题

chenrui 8 ヶ月 前
コミット
692be33e3a

+ 5 - 1
src/views/easyPassManagement/promotionalActivities/addPromotionModal.vue

@@ -187,6 +187,7 @@ export default {
       openDealerModal: false, // 经销商弹窗
       hasEq: null, // 选择经销商数据是否发生变化
       oldDealerFlag: null, // 编辑页面,初始选择经销商值
+      isAllDealerFlag: null, // 是否是全部经销商
       form: {
         promoType: undefined, // 促销类型
         promoName: '', // '促销名称'
@@ -220,11 +221,12 @@ export default {
     // 参与经销商 change
     changeDealerScope (val) {
       // 全部切部分
-      if (this.form.allDealerFlag == '1' && this.form.allDealerFlag != val) {
+      if (this.isAllDealerFlag == '1' && this.isAllDealerFlag != val) {
         this.oldDealerFlag = '1'
       } else {
         this.oldDealerFlag = '0'
       }
+      console.log('1111111111111:', this.oldDealerFlag)
       const _this = this
       _this.form.allDealerFlag = val
       if (val == '1' || !val) {
@@ -288,6 +290,7 @@ export default {
           delete formData.time
           delete formData.shopPromoDealerList
           if (_this.itemSn && _this.itemSn.length > 0) {
+            console.log('22222222222222:', _this.oldDealerFlag)
             if (_this.chooseProductNum > 0 && _this.hasEq && _this.hasEq.length > 0 && _this.oldDealerFlag != '1') {
               _this.$confirm({
                 title: '提示',
@@ -386,6 +389,7 @@ export default {
           _this.pageType = res.data.promoType
           _this.promotionName = res.data.promoName
         }
+        _this.isAllDealerFlag = _this.form.allDealerFlag // 存储是否是全部经销商
         // 部分经销商
         if (_this.form.allDealerFlag == 0) {
           _this.chooseDealerList = _this.form.shopPromoDealerList