浏览代码

修改bug

chenrui 1 年之前
父节点
当前提交
45e2e93830

+ 3 - 2
src/views/promotionRulesManagement/dealerPromotions/chooseProductsModal.vue

@@ -90,9 +90,11 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { productList } from '@/api/product'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
 export default {
   name: 'ChooseProductsModal',
-  components: { STable },
+  components: { STable, ProductBrand, productTypeAll },
   mixins: [commonMixin],
   props: {
     openModal: { //  弹框显示状态
@@ -170,7 +172,6 @@ export default {
   methods: {
     // 表格选中项
     rowSelectionFun (obj) {
-      console.log('11111111111:', obj)
       this.rowSelectionInfo = obj || null
     },
     // 重置数据

+ 12 - 9
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -292,8 +292,8 @@ export default {
               _this.$message.warning('订单起订量设置不能为空!')
               return
             }
-            const isCountEmpty = isNumEmpty(form.specialProductList)
-            const isMoneyEmpty = isNumEmpty(form.specialProductList)
+            const isCountEmpty = _this.isNumEmpty(form.specialProductList)
+            const isMoneyEmpty = _this.isNumEmpty(form.specialProductList)
             if (isCountEmpty.flag) {
               _this.$message.warning('促销比例不能为空!')
               return
@@ -328,11 +328,11 @@ export default {
       dataList.forEach(item => {
         if (item.dataSourceOrigin === '0') { // 判断分类品牌
           if (!item.provinceDiscountRate || !item.cityDiscountRate || !item.specialDiscountRate) {
-            arr.push()
+            arr.push(item.productScopeSn)
           }
         } else {
           if (!item.cityDiscountPrice || !item.provinceDiscountPrice || !item.specialDiscountPrice) {
-            arr1.push()
+            arr1.push(item.productScopeSn)
           }
         }
       })
@@ -527,12 +527,18 @@ export default {
       return snArr
     },
     handleProductsAdd (con) {
+      debugger
       const newArr = []
       con.forEach(newCon => {
         if (!newCon.provincePrice || !newCon.cityPrice || !newCon.specialPrice) {
           newArr.push(newCon.code)
         }
       })
+      con.map((list, pos) => {
+        if (!list.provincePrice || !list.cityPrice || !list.specialPrice) {
+          con.splice(pos, 1)
+        }
+      })
       const _this = this
       if (newArr && newArr.length > 0) {
         _this.$info({
@@ -541,14 +547,11 @@ export default {
           closable: true,
           centered: true,
           onOk () {
-            con.map((list, pos) => {
-              if (!list.provincePrice || !list.cityPrice || !list.specialPrice) {
-                con.splice(pos, 1)
-              }
-            })
             _this.handleProductsOk(con)
           }
         })
+      } else {
+        _this.handleProductsOk(con)
       }
     },
     // +新增产品