瀏覽代碼

修改bug

chenrui 2 年之前
父節點
當前提交
154607d292
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/views/promotionRulesManagement/promotionManagement/addModal.vue

+ 6 - 6
src/views/promotionRulesManagement/promotionManagement/addModal.vue

@@ -175,12 +175,6 @@ export default {
           buyerName: con.dealerName
         }
       })
-      const newArr = list.map(item => {
-        return {
-          buyerSn: item.dealerSn
-        }
-      })
-      this.form.promoBuyerList = newArr
       this.openDealerModal = false
       // 移除表单必填项
       this.$refs.ruleForm.clearValidate('promoBuyerList')
@@ -209,6 +203,12 @@ export default {
     //  保存促销
     handleSave () {
       const _this = this
+      const newArr = this.chooseDealerList.map(item => {
+        return {
+          buyerSn: item.buyerSn
+        }
+      })
+      this.form.promoBuyerList = newArr
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))