lilei 6 ماه پیش
والد
کامیت
f16cac684c

+ 4 - 21
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -560,6 +560,7 @@ export default {
           specialPriceBalance // 差额
         })
       }
+      // 获取禁用的活动规则
       this.disabledActiveIds()
     },
     // 禁用的活动规则
@@ -594,11 +595,11 @@ export default {
     },
     // 刷新当前规则
     refashRow (item, enable) {
-      console.log(enable, 'enable')
       // 刷新产品列表
-      this.$emit('refash', '')
+      this.$emit('refash', '', 'update')
       const active = this.tableData.find(k => k.id == item.id)
       active.enabledFlag = enable
+      // 获取禁用的活动规则
       this.disabledActiveIds()
     },
     // 查看累计产品 详情
@@ -744,25 +745,7 @@ export default {
       salesBatchInsert(params).then(res => {
         if (res.status == 200) {
           this.$message.success('产品导入成功', 2.5)
-          this.$emit('refash', 'promo')
-        }
-      })
-    },
-    hanldeImportTotalOk (list, row, type) {
-      const params = {
-        salesBillSn: this.salesBillSn,
-        salesBillDetailList: list
-      }
-      // 活动导入
-      if (row.salesPromoSn) {
-        params.salesPromoSn = row.salesPromoSn
-        // params.promoRuleSn = row.promoRuleSn
-        params.promoProductClz = promoProductClz
-      }
-      importBorrowTotalProduct(params).then(res => {
-        if (res.status == 200) {
-          this.$message.success('产品导入成功', 2.5)
-          this.$emit('refash', 'promo')
+          this.$emit('refash', 'promo', 'import')
         }
       })
     },

+ 7 - 7
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -661,7 +661,7 @@ export default {
         if (res.status == 200) {
           this.$message.success('产品添加成功', 2.5)
           this.resetSearchForm(true)
-          this.$emit('refash', 'promo')
+          this.$emit('refash', 'promo', 'add')
         }
         this.spinning = false
         this.isInster = false
@@ -696,7 +696,7 @@ export default {
           }
           this.$message.success('累计产品添加成功', 2.5)
           this.resetSearchForm(true)
-          this.$emit('refash', 'promo')
+          this.$emit('refash', 'promo', 'add')
         }
         this.spinning = false
         this.isInster = false
@@ -766,7 +766,7 @@ export default {
           deleteAll({ salesBillSn: _this.salesBillSn, salesPromoSn: '' }).then(res => {
             if (res.status == 200) {
               _this.searchProduct()
-              _this.$emit('refash', 'promo')
+              _this.$emit('refash', 'promo', 'batchDel')
               _this.$message.success(res.message)
             }
             _this.spinning = false
@@ -796,7 +796,7 @@ export default {
           }).then(res => {
             if (res.status == 200) {
               _this.searchProduct()
-              _this.$emit('refash', 'promo')
+              _this.$emit('refash', 'promo', 'batchDel')
               _this.$message.success(res.message)
             }
             _this.spinning = false
@@ -839,7 +839,7 @@ export default {
         console.log(res)
         if (res.status == 200) {
           _this.$message.success(res.message)
-          _this.$emit('refash', 'promo')
+          _this.$emit('refash', 'promo', 'update')
         }
         _this.openWarehouseModal = false
         _this.searchProduct()
@@ -895,7 +895,7 @@ export default {
           salesPromoSn: ''
         }).then(res => {
           if (res.status == 200) {
-            _this.$emit('refash', 'promo')
+            _this.$emit('refash', 'promo', 'update')
             _this.$message.success(res.message)
           }
           _this.searchProduct()
@@ -919,7 +919,7 @@ export default {
           salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: '' }).then(res => {
             if (res.status == 200) {
               _this.searchProduct()
-              _this.$emit('refash', 'promo')
+              _this.$emit('refash', 'promo', 'del')
               _this.$message.success(res.message)
             }
             _this.delLoading = false