|
|
@@ -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,
|