Browse Source

修改bug

chenrui 1 year ago
parent
commit
e05898c2d1

+ 7 - 6
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -382,22 +382,23 @@ export default {
     },
     // 判断品牌,分类,产品其中一个必填
     isJudge (list) {
-      const flag = list.some(con => {
+      let flag = null
+      list.forEach(con => {
         if (con.productThisList) {
           if (con.productThisList.length > 0) {
-            return false
+            flag = false
           } else {
             if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-              return false
+              flag = false
             } else {
-              return true
+              flag = true
             }
           }
         } else {
           if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-            return false
+            flag = false
           } else {
-            return true
+            flag = true
           }
         }
       })

+ 10 - 7
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -355,7 +355,9 @@ export default {
           }
 
           const form = JSON.parse(JSON.stringify(_this.form))
-          let rowFlag1, rowFlag2, rowFlag3
+          let rowFlag1 = null
+          let rowFlag2 = null
+          let rowFlag3 = null
           if (form.gateFlag == '1') {
             form.gateProductList = this.$refs.cillProduct.getResultVal()
             form.gateAmount = form.gateType === 'RATIO_AMOUNT' ? form.gateAmount / 100 : form.gateAmount
@@ -413,22 +415,23 @@ export default {
     },
     // 判断品牌,分类,产品其中一个必填
     isJudge (list) {
-      const flag = list.forEach(con => {
+      let flag = null
+      list.forEach(con => {
         if (con.productThisList) {
           if (con.productThisList.length > 0) {
-            return false
+            flag = false
           } else {
             if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-              return false
+              flag = false
             } else {
-              return true
+              flag = true
             }
           }
         } else {
           if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-            return false
+            flag = false
           } else {
-            return true
+            flag = true
           }
         }
       })