Эх сурвалжийг харах

fix(客户管理):转移客户清空,编辑联系人添加校验,搜索联系人添加失焦触发

wanglj 2 жил өмнө
parent
commit
9b6ad97945

+ 2 - 1
src/views/customer/components/Allocate.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 14:34:34
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-11 18:25:24
+ * @LastEditTime: 2023-01-12 16:36:20
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\components\allocate.vue
 -->
@@ -63,6 +63,7 @@
     methods: {
       handleClose() {
         this.form.allocate = ''
+        this.userList = []
       },
       choose() {
         // this.$refs.transfer.innerVisible = true

+ 10 - 7
src/views/customer/components/Contact.vue

@@ -120,7 +120,6 @@
           cuctName: [{ required: true, trigger: 'blur', message: '请输入联系人姓名' }],
           custName: [{ required: true, trigger: 'blur', message: '请输入客户名称' }],
           telephone: [{ required: true, trigger: 'blur', validator: validateTel }],
-          postion: [{ required: true, trigger: 'blur', message: '请输入职位' }],
           email: [{ trigger: 'blur', validator: validateEmail }],
         },
       }
@@ -141,12 +140,16 @@
       },
       // 联系人编辑
       async contactEdit() {
-        let params = { ...this.contactForm }
-        const [err, res] = await to(api.updateContact(params))
-        if (err) return
-        this.$message.success(res.msg)
-        this.contactVisible = false
-        this.$emit('contactSave')
+        this.$refs.contactForm.validate(async (valid) => {
+          if (valid) {
+            let params = { ...this.contactForm }
+            const [err, res] = await to(api.updateContact(params))
+            if (err) return
+            this.$message.success(res.msg)
+            this.contactVisible = false
+            this.$emit('contactSave')
+          }
+        })
       },
       contactClose() {
         this.contactForm = {

+ 1 - 1
src/views/customer/components/Edit.vue

@@ -31,7 +31,7 @@
       </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item label="客户来源" prop="">
+          <el-form-item label="客户来源" prop="source">
             <el-select v-model="editForm.source" placeholder="请选择客户来源" style="width: 100%">
               <el-option v-for="item in sourceOptions" :key="item.value" :label="item.value" :value="item.value" />
             </el-select>

+ 2 - 1
src/views/customer/detail.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 09:30:47
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-12 09:39:55
+ * @LastEditTime: 2023-01-12 16:40:08
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\detail.vue
 -->
@@ -182,6 +182,7 @@
                   placeholder="请输入单据名称/编号"
                   prefix-icon="el-icon-search"
                   style="width: 50%"
+                  @blur="handleClick({ name: 'contact' })"
                   @keyup.enter.native="handleClick({ name: 'contact' })" />
               </vab-query-form-left-panel>
               <vab-query-form-right-panel :span="12">