Browse Source

修改bug

chenrui 7 months ago
parent
commit
f6699b20e0

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

@@ -289,22 +289,22 @@ export default {
                 content: <div>变更【参与经销商】后将会【<span style="color:red">清空</span>】已选产品列表,确定变更吗?</div>,
                 content: <div>变更【参与经销商】后将会【<span style="color:red">清空</span>】已选产品列表,确定变更吗?</div>,
                 centered: true,
                 centered: true,
                 onOk () {
                 onOk () {
-                  _this.saveSuccess(formData)
+                  _this.saveSuccess(formData, '1')
                 },
                 },
                 onCancel () {
                 onCancel () {
                   console.log('取消变更经销商')
                   console.log('取消变更经销商')
                 }
                 }
               })
               })
             } else {
             } else {
-              _this.saveSuccess(formData)
+              _this.saveSuccess(formData, '0')
             }
             }
           } else {
           } else {
-            _this.saveSuccess(formData)
+            _this.saveSuccess(formData, '0')
           }
           }
         }
         }
       })
       })
     },
     },
-    saveSuccess (ajaxData) {
+    saveSuccess (ajaxData, type) {
       const _this = this
       const _this = this
       _this.spinning = true
       _this.spinning = true
       ajaxData.saveType = 'alone'
       ajaxData.saveType = 'alone'
@@ -332,7 +332,7 @@ export default {
           _this.$message.success(res.message)
           _this.$message.success(res.message)
           _this.$nextTick(() => {
           _this.$nextTick(() => {
             _this.isShow = false
             _this.isShow = false
-            _this.$emit('ok')
+            _this.$emit('ok', type)
           })
           })
         } else {
         } else {
           _this.spinning = false
           _this.spinning = false

+ 4 - 2
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -347,10 +347,12 @@ export default {
       this.form.productNum = this.$refs.chooseProductList.getChooseProductNum()
       this.form.productNum = this.$refs.chooseProductList.getChooseProductNum()
       this.$refs.promotionAddModal.getDetail()
       this.$refs.promotionAddModal.getDetail()
     },
     },
-    promotionAddOk () {
+    promotionAddOk (type) {
       const _this = this
       const _this = this
       // 情况产品列表
       // 情况产品列表
-      _this.$refs.chooseProductList.clearTable()
+      if (type == '1') {
+        _this.$refs.chooseProductList.clearTable()
+      }
       _this.getDetail({ sn: _this.$route.params.sn })
       _this.getDetail({ sn: _this.$route.params.sn })
     },
     },
     // 禁用日期时间
     // 禁用日期时间