Просмотр исходного кода

feature(项目跟进):项目跟进允许添加渠道联系人

ZZH-wl 2 лет назад
Родитель
Сommit
3efdbe92c7

+ 2 - 2
src/components/select/SelectBusinessContact.vue

@@ -67,7 +67,7 @@
     props: {
       title: {
         type: String,
-        default: '选择客户联系人',
+        default: '选择项目联系人',
       },
       addButton: Boolean,
       multiple: Boolean,
@@ -106,7 +106,7 @@
           {
             label: '客户名称',
             width: 'auto',
-            prop: 'custName',
+            prop: 'cuctName',
           },
           {
             label: '手机号码',

+ 1 - 1
src/components/select/SelectCustomerContact.vue

@@ -129,7 +129,7 @@
           {
             label: '客户名称',
             width: 'auto',
-            prop: 'custName',
+            prop: 'cuctName',
           },
           {
             label: '手机号码',

+ 17 - 8
src/views/proj/business/components/FollowAdd.vue

@@ -98,12 +98,14 @@
       <el-button :loading="loading" type="primary" @click="save">确 定</el-button>
     </div>
 
+    <!-- 选择项目联系人弹窗 -->
+    <select-business-contact ref="selectContact" :query-params="queryContact" @save="selectContact" />
     <!-- 选择客户联系人弹窗 -->
-    <select-contact
-      ref="selectContact"
-      :default-customer="customerInfo"
-      :query-params="queryContact"
-      @save="selectContact" />
+    <!--    <select-contact-->
+    <!--      ref="selectContact"-->
+    <!--      :default-customer="customerInfo"-->
+    <!--      :query-params="queryContact"-->
+    <!--      @save="selectContact" />-->
 
     <select-distributor
       ref="selectDistributor"
@@ -119,15 +121,15 @@
   import axios from 'axios'
   import to from 'await-to-js'
   import followApi from '@/api/customer/follow'
-  import SelectContact from '@/components/select/SelectCustomerContact'
   import SelectDistributor from '@/components/select/SelectDistributorContact'
   import SelectUser from '@/components/select/SelectUser'
   import asyncUploadFile from '@/utils/uploadajax'
+  import SelectBusinessContact from '@/components/select/SelectBusinessContact'
 
   export default {
     name: 'FollowAdd',
     components: {
-      SelectContact,
+      SelectBusinessContact,
       SelectDistributor,
       SelectUser,
     },
@@ -148,6 +150,7 @@
           targetType: '',
           custId: null,
           custName: null,
+          contactType: '',
           contactsId: '',
           contactsName: '',
           reminders: '',
@@ -220,7 +223,10 @@
       },
       selectContact(val) {
         if (val && val.length > 0) {
-          if (this.form.targetType == '50') {
+          if (this.form.targetType == '20') {
+            this.form.contactType = val[0].contactType
+            this.form.contactsName = val.map((item) => item.cuctName).join()
+          } else if (this.form.targetType == '50') {
             this.form.contactsName = val.map((item) => item.name).join()
           } else if (this.form.targetType == '70') {
             this.form.contactsName = val.map((item) => item.nickName).join()
@@ -237,6 +243,9 @@
         this.form = Object.assign(this.form, row)
         console.log(this.form)
         if (this.form.targetType == '10' || this.form.targetType == '20' || this.form.targetType == '60') {
+          if (this.form.targetType == '20') {
+            this.queryContact.busId = this.form.targetId
+          }
           this.queryContact.custId = this.form.custId
           this.customerInfo = {
             custId: this.form.custId,

+ 1 - 0
src/views/proj/business/detail.vue

@@ -372,6 +372,7 @@
           targetName: this.details.nboName,
           custId: this.details.custId,
           custName: this.details.custName,
+          contactType: '10',
           contactsId: this.details.contactId,
           contactsName: this.details.contactName,
         }