Browse Source

客户、转化客户调整

qymljy 2 năm trước cách đây
mục cha
commit
bebd8a0332

+ 15 - 6
src/Form/publicCustomer/add.vue

@@ -302,7 +302,7 @@
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
-                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
+                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
@@ -314,9 +314,9 @@
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
                 <div style="width: 100%">
-                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange"></el-input>
+                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                   <span style="color: #999999">——</span>
-                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange"></el-input>
+                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                 </div>
 
               </el-form-item>
@@ -777,8 +777,10 @@ export default {
       this.value = ''
     },
     onClose(){
-      this.$refs['form'].resetFields();
+      this.form.contactsinfo.telephone = ''
+      this.form.contactsinfo.phonenumber = ''
       this.isPhone = true
+      this.$refs['form'].resetFields();
       this.areaCode = ''
       this.telephone = ''
       this.dialogFormVisible = false
@@ -985,8 +987,15 @@ export default {
       this.myContacts.param.content.pageNumber = val
       this.myContactList()
     },
-    telephoneChange(){
-      this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+    telephoneChange(val){
+      if (val === '座机'){
+        this.form.contactsinfo.phonenumber = ''
+        this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+      }else {
+        this.form.contactsinfo.telephone = ''
+        this.areaCode = ''
+        this.telephone = ''
+      }
     }
   },
   mounted() {

+ 4 - 4
src/Form/publicCustomer/edit.vue

@@ -422,11 +422,11 @@ export default {
         this.form.grade = ''
       }
       this.form.contactsinfo.name = this.form.contactsinfo[0].name
-      if (this.form.contactsinfo[0].telephone){
+      if (this.form.contactsinfo[0].phonenumber.substring(0,this.form.contactsinfo[0].phonenumber.indexOf('-'))){
         this.isPhone = false
-         this.areaCode = this.form.contactsinfo[0].telephone.substring(0,this.form.contactsinfo[0].telephone.indexOf('-'))
-         this.telephone = this.form.contactsinfo[0].telephone.substring(this.areaCode.length+1)
-         this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+         this.areaCode = this.form.contactsinfo[0].phonenumber.substring(0,this.form.contactsinfo[0].phonenumber.indexOf('-'))
+         this.telephone = this.form.contactsinfo[0].phonenumber.substring(this.areaCode.length+1)
+         this.form.contactsinfo.phonenumber = this.areaCode + '-' + this.telephone
       }else {
         this.isPhone = true
         this.form.contactsinfo.phonenumber = this.form.contactsinfo[0].phonenumber

+ 17 - 24
src/Form/salerPrivatecustomer/add.vue

@@ -301,7 +301,7 @@
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
-                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
+                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
@@ -313,9 +313,9 @@
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
                 <div style="width: 100%">
-                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange"></el-input>
+                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                   <span style="color: #999999">——</span>
-                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange"></el-input>
+                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                 </div>
               </el-form-item>
             </el-col>
@@ -700,30 +700,16 @@ export default {
      })
     },
     onClose () {
+      this.form.contactsinfo.telephone = ''
+      this.form.contactsinfo.phonenumber = ''
+      this.isPhone = true
       this.$refs['form'].resetFields();
-     /* this.form = {
-        sa_customersid:0,
-        sys_enterpriseid:0,
-        enterprisename:'',
-        type:'',
-        source:'',
-        parentid:0,
-        superiorenterprisename:'',
-        abbreviation:'',
-        taxno:'',
-        customergrade:'',
-        industry:'',
-        phonenumber:'',
-        province:'',
-        city:'',
-        county:'',
-        address:'',
-        ispublic:0
-      }*/
       this.dialogFormVisible = false
       this.checkResults = ''
       this.value = ''
       this.businessShow = false
+      this.areaCode = ''
+      this.telephone = ''
       this.$emit('onSuccess')
     },
     /*客户类型列表*/
@@ -962,8 +948,15 @@ export default {
       this.myContacts.param.content.pageNumber = val
       this.myContactList()
     },
-    telephoneChange(){
-      this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+    telephoneChange(val){
+      if (val === '座机'){
+        this.form.contactsinfo.phonenumber = ''
+        this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+      }else {
+        this.form.contactsinfo.telephone = ''
+        this.areaCode = ''
+        this.telephone = ''
+      }
     }
   }
 }

+ 4 - 4
src/Form/salerPrivatecustomer/edit.vue

@@ -381,11 +381,11 @@ export default {
         this.form.sa_agentsid  = ''
       }
       this.form.contactsinfo.name = this.form.contactsinfo[0].name
-      if (this.form.contactsinfo[0].telephone){
+      if (this.form.contactsinfo[0].phonenumber.substring(0,this.form.contactsinfo[0].phonenumber.indexOf('-'))){
         this.isPhone = false
-        this.areaCode = this.form.contactsinfo[0].telephone.substring(0,this.form.contactsinfo[0].telephone.indexOf('-'))
-        this.telephone = this.form.contactsinfo[0].telephone.substring(this.areaCode.length+1)
-        this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+        this.areaCode = this.form.contactsinfo[0].phonenumber.substring(0,this.form.contactsinfo[0].phonenumber.indexOf('-'))
+        this.telephone = this.form.contactsinfo[0].phonenumber.substring(this.areaCode.length+1)
+        this.form.contactsinfo.phonenumber = this.areaCode + '-' + this.telephone
       }else {
         this.isPhone = true
         this.form.contactsinfo.phonenumber = this.form.contactsinfo[0].phonenumber

+ 14 - 6
src/SManagement/orderclue_detail/components/changeCustomer.vue

@@ -251,7 +251,7 @@
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
-                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
+                <el-input v-model="form.contactsinfo.phonenumber" placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
@@ -262,10 +262,10 @@
                   <el-radio v-model="isPhone" :label="true" @change="phoneChang('手机')">手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" @change="phoneChang('座机')">座机电话</el-radio>
                 </el-button-group>
-                <div style="100%">
-                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange"></el-input>
+                <div style="width: 100%">
+                  <el-input v-model="areaCode" placeholder="请输入区号" style="width:25%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                   <span style="color: #999999">——</span>
-                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange"></el-input>
+                  <el-input v-model="telephone" placeholder="请输入座机电话" style="width:68%;margin-top: 10px" @input="telephoneChange('座机')"></el-input>
                 </div>
               </el-form-item>
             </el-col>
@@ -841,8 +841,16 @@ export default {
       this.myContacts.param.content.pageNumber = val
       this.myContactList()
     },
-    telephoneChange(){
-      this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+    telephoneChange(val){
+      if (val === '座机'){
+        this.form.contactsinfo.phonenumber = ''
+        this.form.contactsinfo.telephone = this.areaCode + '-' + this.telephone
+      }else {
+        this.form.contactsinfo.telephone = ''
+        this.areaCode = ''
+        this.telephone = ''
+      }
+
     }
   },
   mounted() {

+ 4 - 0
src/components/duplicatesCheck/customerChangeCheck.vue

@@ -124,6 +124,10 @@ export default {
       });
     },
     async onSubmit(){
+      if (this.data.contactsinfo.telephone){
+        this.data.contactsinfo.phonenumber = this.data.contactsinfo.telephone
+        this.data.contactsinfo.telephone = ''
+      }
       const res = await this.$api.requested({
         "id": 20221216184302,
         "content": this.data

+ 4 - 0
src/components/duplicatesCheck/customerCheck.vue

@@ -124,6 +124,10 @@ export default {
       });
     },
     async onSubmit(){
+      if (this.data.contactsinfo.telephone){
+        this.data.contactsinfo.phonenumber = this.data.contactsinfo.telephone
+        this.data.contactsinfo.telephone = ''
+      }
       const res = await this.$api.requested({
         "id": 20221012163902,
         "content": this.data

+ 4 - 0
src/components/duplicatesCheck/publicCustomerCheck.vue

@@ -125,6 +125,10 @@ export default {
       });
     },
     async onSubmit(){
+      if (this.data.contactsinfo.telephone){
+        this.data.contactsinfo.phonenumber = this.data.contactsinfo.telephone
+        this.data.contactsinfo.telephone = ''
+      }
       const res = await this.$api.requested({
         "id": 20221010164302,
         "content": this.data