Browse Source

feature(订单管理系统):
1、公海客户和储备可以创建用户添加招标关键字

niezch 2 years ago
parent
commit
f4bbc1f945
1 changed files with 16 additions and 3 deletions
  1. 16 3
      src/views/customer/components/Edit.vue

+ 16 - 3
src/views/customer/components/Edit.vue

@@ -87,6 +87,13 @@
             <el-input v-model="editForm.custAddress" placeholder="请输入详细地址" />
           </el-form-item>
         </el-col>
+        <el-col :span="24">
+          <el-form-item label="招标关键字" prop="keyword">
+            <el-select v-model="editForm.keyword" clearable multiple placeholder="请选择招标关键字" style="width: 100%">
+              <el-option v-for="item in keywordoptions" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
       </el-row>
       <el-row :gutter="20">
         <!--        <el-col :span="12">-->
@@ -165,6 +172,7 @@
           province: {}, //省
           city: {}, //市
           region: {}, //区
+          keyword: [], //招标关键字
         },
         editRules: {
           custName: [{ required: true, validator: checkCustName, trigger: 'blur' }],
@@ -177,6 +185,7 @@
         industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         sourceOptions: [], //客户来源
+        keywordoptions: [], //招标关键字
       }
     },
     mounted() {
@@ -194,8 +203,10 @@
         this.areaEditDisable = true
         const [err, res] = await to(api.getDetail({ ids }))
         if (err) return
-        if (res.data.list[0]) this.editForm = res.data.list[0]
-        else return
+        if (res.data.list[0]) {
+          this.editForm = res.data.list[0]
+          this.editForm.keyword = res.data.list[0].keyword != '' ? JSON.parse(res.data.list[0].keyword) : ''
+        } else return
         this.editVisible = true
         this.showLocation()
       },
@@ -205,12 +216,14 @@
           this.getDicts('cust_level'),
           this.getDicts('cust_idy'),
           this.getDicts('cust_source'),
+          this.getDicts('customer_bidding_keywords'),
         ])
-          .then(([province, level, industry, source]) => {
+          .then(([province, level, industry, source, keyword]) => {
             this.provinceOptions = province.data.list || []
             this.levelOptions = level.data.values || []
             this.industryOptions = industry.data.values || []
             this.sourceOptions = source.data.values || []
+            this.keywordoptions = keyword.data.values || []
           })
           .catch((err) => console.log(err))
       },