chenrui 1 год назад
Родитель
Сommit
d9a55824e1

+ 1 - 1
src/views/common/chooseTypeModal.vue

@@ -10,7 +10,7 @@
     width="50%">
     <div class="chooseType-con">
       <div>
-        <a-checkbox :checked="checkAll" :disabled="!linkageStatus&&chooseData.length>0 " @change="onCheckAllChange">全选</a-checkbox>
+        <a-checkbox :checked="checkAll" :disabled="!linkageStatus&&chooseList.length>0 " @change="onCheckAllChange">全选</a-checkbox>
       </div>
       <a-divider />
       <a-tree

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -274,7 +274,7 @@ export default {
     calculatePrice () {
       const _this = this
       if (_this.form.regularAmount && _this.form.giveAmount) {
-        _this.scaleNum = Math.floor(((_this.form.giveAmount / _this.form.regularAmount) * 100).toFixed(2))
+        _this.scaleNum = ((_this.form.giveAmount / _this.form.regularAmount) * 100).toFixed(2)
       } else {
         _this.scaleNum = 0
       }

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -256,7 +256,7 @@ export default {
         promotionQty: undefined,
         restrictFlag: '0', // 限制正价产品款数
         restrictCategory: '',
-        accrualFlag: undefined, // 数量叠加
+        accrualFlag: '1', // 数量叠加
         minOrderFlag: '0', // 起订金额
         minOrderAmount: undefined,
         upperLimitFlag: '0', // 活动经费上限

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -299,7 +299,7 @@ export default {
               return
             }
             if (isCountEmpty.flag1) {
-              _this.$message.warning('促销金额不能为空!')
+              _this.$message.warning('折扣金额不能为空!')
               return
             }
           }

+ 58 - 49
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -326,15 +326,17 @@ export default {
       var flag = false
       var c_typeArr = []
       this.dataSource.forEach(item => {
-        if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
-          item.productBrandList.forEach((con) => {
-            row.productBrandList.forEach(newCon => {
-              if (newCon.productBrandSn == con.productBrandSn) {
-                flag = true
-                c_typeArr = c_typeArr.concat(item.productTypeList)
-              }
+        if (item.dataSourceOrigin === '0') {
+          if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
+            item.productBrandList.forEach((con) => {
+              row.productBrandList.forEach(newCon => {
+                if (newCon.productBrandSn == con.productBrandSn) {
+                  flag = true
+                  c_typeArr = c_typeArr.concat(item.productTypeList)
+                }
+              })
             })
-          })
+          }
         }
       })
       const disTypeList = []
@@ -422,17 +424,18 @@ export default {
       // 同行中分类是否与所选分类相同   已选分类
       var flag = false
       var c_brandArr = []
-      console.log('111111111111:', this.dataSource)
       this.dataSource.forEach(item => {
-        if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
-          item.productTypeArr.forEach((con) => {
-            row.productTypeArr.forEach(newCon => {
-              if (newCon.id == con.id) {
-                flag = true
-                c_brandArr = c_brandArr.concat(item.productBrandList)
-              }
+        if (item.dataSourceOrigin === '0') {
+          if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
+            item.productTypeArr.forEach((con) => {
+              row.productTypeArr.forEach(newCon => {
+                if (newCon.id == con.id) {
+                  flag = true
+                  c_brandArr = c_brandArr.concat(item.productBrandList)
+                }
+              })
             })
-          })
+          }
         }
       })
       const reBrandArr = c_brandArr.map(list => {
@@ -477,21 +480,23 @@ export default {
       const _this = this
       const snArr = []
       _this.dataSource.forEach(item => {
-        if (item.productTypeList && item.productTypeList.length > 0) {
-          if (!item.productBrandList || (item.productBrandList && item.productBrandList.length == 0)) {
-            item.productTypeList.forEach(con => {
-              for (const i in con) {
-                const newObj = {
-                  goodsSn: con[i]
-                }
-                if (i === 'productTypeSn1') {
-                  newObj.disabled = true
-                } else {
-                  newObj.disableCheckbox = true
+        if (item.dataSourceOrigin === '0') {
+          if (item.productTypeList && item.productTypeList.length > 0) {
+            if (!item.productBrandList || (item.productBrandList && item.productBrandList.length == 0)) {
+              item.productTypeList.forEach(con => {
+                for (const i in con) {
+                  const newObj = {
+                    goodsSn: con[i]
+                  }
+                  if (i === 'productTypeSn1') {
+                    newObj.disabled = true
+                  } else {
+                    newObj.disableCheckbox = true
+                  }
+                  snArr.push(newObj)
                 }
-                snArr.push(newObj)
-              }
-            })
+              })
+            }
           }
         }
       })
@@ -502,11 +507,13 @@ export default {
       const _this = this
       var snArr = []
       _this.dataSource.forEach(item => {
-        if (item.productBrandList && item.productBrandList.length > 0) {
-          if (!item.productTypeArr || (item.productTypeArr && item.productTypeArr.length == 0)) {
-            item.productBrandList.forEach(con => {
-              snArr.push(con.productBrandSn)
-            })
+        if (item.dataSourceOrigin === '0') {
+          if (item.productBrandList && item.productBrandList.length > 0) {
+            if (!item.productTypeArr || (item.productTypeArr && item.productTypeArr.length == 0)) {
+              item.productBrandList.forEach(con => {
+                snArr.push(con.productBrandSn)
+              })
+            }
           }
         }
       })
@@ -544,20 +551,22 @@ export default {
       const _this = this
       const snArr = []
       _this.dataSource.forEach(item => {
-        if (item.productTypeList && item.productTypeList.length > 0) {
-          item.productTypeList.forEach(con => {
-            for (const i in con) {
-              const newObj = {
-                goodsSn: con[i]
-              }
-              if (i === 'productTypeSn1') {
-                newObj.disabled = true
-              } else {
-                newObj.disableCheckbox = true
+        if (item.dataSourceOrigin === '0') {
+          if (item.productTypeList && item.productTypeList.length > 0) {
+            item.productTypeList.forEach(con => {
+              for (const i in con) {
+                const newObj = {
+                  goodsSn: con[i]
+                }
+                if (i === 'productTypeSn1') {
+                  newObj.disabled = true
+                } else {
+                  newObj.disableCheckbox = true
+                }
+                snArr.push(newObj)
               }
-              snArr.push(newObj)
-            }
-          })
+            })
+          }
         }
       })
       return snArr