Ver Fonte

修改bug

chenrui há 10 meses atrás
pai
commit
563331bbdf

+ 11 - 2
src/views/promotionRulesManagement/promotionManagement/edit.vue

@@ -207,7 +207,6 @@
             </a-col>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
               <a-form-model-item label="生成方式" prop="ruleBaseType">
               <a-form-model-item label="生成方式" prop="ruleBaseType">
-                <!-- showType="radio" -->
                 <v-select
                 <v-select
                   style="width:40%;"
                   style="width:40%;"
                   v-model="sellForm.ruleBaseType"
                   v-model="sellForm.ruleBaseType"
@@ -611,8 +610,11 @@ export default {
             }
             }
           }
           }
         }
         }
+
         formData.dealerEditFlag = _this.sellForm.dealerEditFlag
         formData.dealerEditFlag = _this.sellForm.dealerEditFlag
         formData.publishFlag = _this.sellForm.publishFlag
         formData.publishFlag = _this.sellForm.publishFlag
+        console.log('11111111111111111111111:')
+        debugger
         const numInfo = _this.$refs.chooseProductList.getDataNum()
         const numInfo = _this.$refs.chooseProductList.getDataNum()
         if (numInfo == 0) {
         if (numInfo == 0) {
           if (!_this.sellForm.validDays) {
           if (!_this.sellForm.validDays) {
@@ -779,7 +781,14 @@ export default {
         }
         }
       })
       })
       // 保存产品范围
       // 保存产品范围
-      saveBatchEntity({ list: this.sellForm.productRangeList, promoActiveSn: this.$route.params.sn }).then(res => {
+      const newArr = this.sellForm.productRangeList.map(item => {
+        return {
+          promoActiveSn: this.$route.params.sn,
+          promoRuleSn: this.sellForm.promoRuleSn,
+          productTypeSn: item
+        }
+      })
+      saveBatchEntity({ list: newArr, promoActiveSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           console.log('保存产品范围成功')
           console.log('保存产品范围成功')
         }
         }