From 78cf30802189becef2725af73f37b5d2cb28600f Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 11 八月 2023 10:57:48 +0800
Subject: [PATCH] 新建跟进记录入参修改

---
 src/views/client/salesLead/AddSalesLeadDialog.vue |   66 ++++++++++++++------------------
 1 files changed, 29 insertions(+), 37 deletions(-)

diff --git a/src/views/client/salesLead/AddSalesLeadDialog.vue b/src/views/client/salesLead/AddSalesLeadDialog.vue
index 179850f..4c9ec58 100644
--- a/src/views/client/salesLead/AddSalesLeadDialog.vue
+++ b/src/views/client/salesLead/AddSalesLeadDialog.vue
@@ -46,7 +46,12 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="鎵嬫満鍙风爜" prop="contact_phone">
-                  <el-input v-model="editConfig.infomation.contact_phone"></el-input>
+                  <el-input
+                    v-model="editConfig.infomation.contact_phone"
+                    maxlength="11"
+                    show-word-limit
+                    oninput="value=value.replace(/[^\d]/g,'')"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -82,7 +87,7 @@
               <el-col :span="12">
                 <el-form-item label="璐熻矗浜�" prop="member_id">
                   <el-select v-model="editConfig.infomation.member_id" placeholder="璇烽�夋嫨" size="mini">
-                    <el-option v-for="item in ownerOptions" :key="item.id" :label="item.username" :value="item.id">
+                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                     </el-option>
                   </el-select>
                 </el-form-item>
@@ -172,7 +177,7 @@
                 </el-form-item>
               </el-col>
             </el-row>
-            <el-row>
+            <!-- <el-row>
               <el-col :span="24">
                 <el-form-item label="鍦板潃" prop="address">
                   <el-input
@@ -183,7 +188,7 @@
                   ></el-input>
                 </el-form-item>
               </el-col>
-            </el-row>
+            </el-row> -->
           </div>
           <!-- 澶囨敞淇℃伅 -->
           <div v-if="isUnflod" class="basic-info-title">澶囨敞淇℃伅</div>
@@ -233,33 +238,13 @@
         return {
           visible: false,
           title: "鏂板缓",
-          infomation: {
-            name: "",
-            number: "LEA50",
-            contact_name: "",
-            contact_position: "",
-            contact_phone: "",
-            businessStatus: "",
-            sales_sources_id: "",
-            member_id: "",
-            country_id: "",
-            province_id: "",
-            city_id: "",
-            region_id: "",
-            address: "",
-            desc: "",
-            id: ""
-          }
+          infomation: {}
         }
       }
     }
   },
   components: { EditDropdownDialog },
-  computed: {
-    searchCommonHeight() {
-      return this.$refs.searchCommonView.offsetHeight
-    }
-  },
+  computed: {},
   data() {
     return {
       dialogWidth: "80%",
@@ -268,18 +253,19 @@
         name: [{ required: true, message: "璇疯緭鍏ュ鎴峰悕绉�", trigger: "blur" }],
         number: [{ required: true, message: "璇疯緭鍏ラ攢鍞嚎绱㈢紪鍙�", trigger: "blur" }],
         businessStatus: [{ required: true, message: "璇疯緭鍏ュ晢鏈虹姸鎬�", trigger: "blur" }],
-        sales_sources_id: [{ required: true, message: "璇烽�夋嫨鍟嗘満鏉ユ簮", trigger: "change" }]
+        sales_sources_id: [{ required: true, message: "璇烽�夋嫨鍟嗘満鏉ユ簮", trigger: "change" }],
+        contact_phone: [
+          { required: false, message: "", trigger: "blur" },
+          { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: "blur" },
+          {
+            pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
+            message: "璇疯緭鍏ユ纭殑鎵嬫満鍙�",
+            trigger: "blur"
+          }
+        ]
       },
       businessSourceOptions: [],
-      ownerOptions: [
-        { value: "1", label: "BOSS" },
-        { value: "2", label: "Mia" },
-        { value: "3", label: "璐㈠姟" },
-        { value: "4", label: "甯傚満" },
-        { value: "5", label: "绯荤粺绠$悊鍛�" },
-        { value: "6", label: "閿�鍞�" },
-        { value: "7", label: "閿�鍞�荤洃" }
-      ],
+      memberOptions: [],
       countryOptions: [], // 鍥藉
       provinceOptions: [], // 鐪佷唤
       cityOptions: [], // 鍩庡競
@@ -296,6 +282,7 @@
   created() {
     this.getCommonData()
   },
+  mounted() {},
   methods: {
     getCommonData() {
       getAllData()
@@ -306,6 +293,7 @@
           this.provinceOptions = res.data.province
           this.cityOptions = res.data.city
           this.regionOptions = res.data.region
+          this.memberOptions = res.data.member
         })
         .catch((err) => {
           console.log(err)
@@ -386,9 +374,13 @@
     },
     // 缂栬緫涓嬫媺妗�
     editDropdownBox() {
-      console.log("aaa")
       this.editDropdownConfig.editVisible = true
       this.editDropdownConfig.title = "鍟嗘満鏉ユ簮"
+    },
+    // 鎵嬫満鍙疯緭鍏�
+    confirmPhone(value) {
+      const inputValue = value.replace(/[^\d*]/g, "")
+      this.editConfig.infomation.contact_phone = inputValue
     }
   }
 }

--
Gitblit v1.8.0