ソースを参照

【新增】销售政策计划单

howie 2 年 前
コミット
0c59fd4193
1 ファイル変更9 行追加6 行削除
  1. 9 6
      src/views/supply/policy/components/retail_form.vue

+ 9 - 6
src/views/supply/policy/components/retail_form.vue

@@ -65,7 +65,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="24" :sm="12" :lg="12" v-if="goodsList.length && goodsList[0].commercialType">
+        <el-col :span="24" :sm="12" :lg="12" v-if="goodsList.length && commercialType">
           <el-form-item label="计划单" prop="isPlanOrder">
             <el-radio-group v-model="mainForm.isPlanOrder">
               <el-radio :label="true">是</el-radio>
@@ -746,7 +746,8 @@ export default {
       totalArr: [],
       type: 1,
       newMultipleSelections: [],
-      remark: ''
+      remark: '',
+      commercialType: false
     }
   },
 
@@ -944,11 +945,13 @@ export default {
       this.dataList = []
       this.popDataArr = []
       this.screenForm.saleTypeCode = ''
-      const type = this.policyList.filter(k => {
+
+      const policy = this.policyList.filter(k => {
         return k.code === e
-      })[0].type
-      console.log(type == 'PROVISION')
-      if (type == 'PROVISION') {
+      })[0]
+      this.commercialType = policy.commercialType
+      console.log(policy.type)
+      if (policy.type == 'PROVISION') {
         // PROVISION 配提
         //   选择销售政策PolidcyId改变获取条件列表
         const { data } = await getPolicyConditionList({ policyId: e })