Browse Source

项目商机新建联系人调整

qymljy 10 months ago
parent
commit
cd6d546a37

+ 9 - 4
src/HDrpManagement/projectChange/modules/modules/contacts/components/add.vue

@@ -517,7 +517,7 @@ export default {
       this.form.remarks = val.remarks
       this.form.sys_phonebookid = val.sys_phonebookid
       this.associatedCustomers.param.content.sys_phonebookid = val.sys_phonebookid
-      this.associatedCustomersList()
+      this.associatedCustomersList('联系人')
     },
     handleSizeChangeMy(val) {
       // console.log(`每页 ${val} 条`);
@@ -530,13 +530,18 @@ export default {
       this.myContactList()
     },
     /*关联客户*/
-    async associatedCustomersList(){
+    async associatedCustomersList(val){
       const res = await this.$api.requested(this.associatedCustomers.param)
       this.associatedCustomers.listData = res.data
       this.associatedCustomers.total = res.total
       this.associatedCustomers.currentPage = res.pageNumber
-      this.form.sys_enterpriseid = res.data[0].sys_enterpriseid
-      this.form.enterprisename = res.data[0].enterprisename
+      if (val == '联系人'){
+        this.form.sys_enterpriseid = ''
+        this.form.enterprisename = ''
+        this.form.sys_enterpriseid = res.data[0].sys_enterpriseid
+        this.form.enterprisename = res.data[0].enterprisename
+      }
+
     },
     associatedCustomersSelect(val){
       this.form.sys_enterpriseid = val.sys_enterpriseid