|
@@ -25,27 +25,31 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
|
|
- <!-- <el-form-item label="跟进内容" prop="followContentType">-->
|
|
|
|
|
- <!-- <el-select v-model="form.followContentType" placeholder="请选择跟进内容" style="width: 100%">-->
|
|
|
|
|
- <!-- <el-option-->
|
|
|
|
|
- <!-- v-for="item in followContentTypeOptions"-->
|
|
|
|
|
- <!-- :key="item.key"-->
|
|
|
|
|
- <!-- :label="item.value"-->
|
|
|
|
|
- <!-- :value="item.key" />-->
|
|
|
|
|
- <!-- </el-select>-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
- <!-- <el-col v-if="followContentType !== '10'" :span="12">-->
|
|
|
|
|
- <!-- <el-form-item label="总部支持人员" prop="supportName">-->
|
|
|
|
|
- <!-- <el-input v-model="form.supportName" />-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="跟进内容" prop="followContent">
|
|
|
|
|
|
|
+ <el-form-item label="本次跟进内容" prop="followContent">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="form.followContent"
|
|
v-model="form.followContent"
|
|
|
- placeholder="请输入拜访对象,协同拜访人员、具体沟通内容、进展或问题,下一步工作计划及完成时间"
|
|
|
|
|
|
|
+ placeholder="请输入本次跟进内容"
|
|
|
|
|
+ rows="5"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ type="textarea" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="达成效果" prop="effect">
|
|
|
|
|
+ <el-input v-model="form.effect" placeholder="请输入达成效果" rows="5" show-word-limit type="textarea" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="问题或困难" prop="issue">
|
|
|
|
|
+ <el-input v-model="form.issue" placeholder="请输入问题或困难" rows="5" show-word-limit type="textarea" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="下一步跟进计划和目标" prop="furtherPlan">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.furtherPlan"
|
|
|
|
|
+ placeholder="请输入下一步工作计划及完成时间"
|
|
|
rows="5"
|
|
rows="5"
|
|
|
show-word-limit
|
|
show-word-limit
|
|
|
type="textarea" />
|
|
type="textarea" />
|
|
@@ -100,12 +104,19 @@
|
|
|
:default-customer="customerInfo"
|
|
:default-customer="customerInfo"
|
|
|
:query-params="queryContact"
|
|
:query-params="queryContact"
|
|
|
@save="selectContact" />
|
|
@save="selectContact" />
|
|
|
|
|
+
|
|
|
|
|
+ <select-distributor
|
|
|
|
|
+ ref="selectDistributor"
|
|
|
|
|
+ :query-params="queryContact"
|
|
|
|
|
+ :title="distrTitle"
|
|
|
|
|
+ @save="selectContact" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import followApi from '@/api/customer/follow'
|
|
import followApi from '@/api/customer/follow'
|
|
|
import SelectContact from '@/components/select/SelectCustomerContact'
|
|
import SelectContact from '@/components/select/SelectCustomerContact'
|
|
|
|
|
+ import SelectDistributor from '@/components/select/SelectDistributorContact'
|
|
|
import asyncUploadFile from '@/utils/uploadajax'
|
|
import asyncUploadFile from '@/utils/uploadajax'
|
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
|
|
|
|
|
@@ -113,18 +124,23 @@
|
|
|
name: 'FollowAdd',
|
|
name: 'FollowAdd',
|
|
|
components: {
|
|
components: {
|
|
|
SelectContact,
|
|
SelectContact,
|
|
|
|
|
+ SelectDistributor,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ distrTitle: '',
|
|
|
form: {
|
|
form: {
|
|
|
followType: '',
|
|
followType: '',
|
|
|
followDate: '',
|
|
followDate: '',
|
|
|
followContentType: '',
|
|
followContentType: '',
|
|
|
|
|
+ effect: '',
|
|
|
followContent: '',
|
|
followContent: '',
|
|
|
|
|
+ issue: '',
|
|
|
|
|
+ furtherPlan: '',
|
|
|
targetId: '',
|
|
targetId: '',
|
|
|
targetName: '',
|
|
targetName: '',
|
|
|
targetType: '',
|
|
targetType: '',
|
|
|
- custId: '',
|
|
|
|
|
|
|
+ custId: 0,
|
|
|
custName: '',
|
|
custName: '',
|
|
|
contactsId: '',
|
|
contactsId: '',
|
|
|
contactsName: '',
|
|
contactsName: '',
|
|
@@ -138,7 +154,10 @@
|
|
|
followType: [{ required: true, trigger: 'blur', message: '请输入跟进方式' }],
|
|
followType: [{ required: true, trigger: 'blur', message: '请输入跟进方式' }],
|
|
|
followDate: [{ required: true, trigger: 'blur', message: '请输入跟进时间' }],
|
|
followDate: [{ required: true, trigger: 'blur', message: '请输入跟进时间' }],
|
|
|
followContentType: [{ required: true, trigger: 'blur', message: '请输入跟进内容类型' }],
|
|
followContentType: [{ required: true, trigger: 'blur', message: '请输入跟进内容类型' }],
|
|
|
- followContent: [{ required: true, trigger: 'blur', message: '请输入跟进内容' }],
|
|
|
|
|
|
|
+ followContent: [{ required: true, trigger: 'blur', message: '请输入本次跟进内容' }],
|
|
|
|
|
+ effect: [{ required: true, trigger: 'blur', message: '请输入达成效果' }],
|
|
|
|
|
+ issue: [{ required: true, trigger: 'blur', message: '请输入问题或困难' }],
|
|
|
|
|
+ furtherPlan: [{ required: true, trigger: 'blur', message: '请输入下一步跟进计划和目标' }],
|
|
|
targetId: [{ required: true, trigger: 'blur', message: '请选择跟进对象' }],
|
|
targetId: [{ required: true, trigger: 'blur', message: '请选择跟进对象' }],
|
|
|
targetName: [{ required: true, trigger: 'blur', message: '跟进对象不能为空' }],
|
|
targetName: [{ required: true, trigger: 'blur', message: '跟进对象不能为空' }],
|
|
|
targetType: [{ required: true, trigger: 'blur', message: '跟进对象类型不能为空' }],
|
|
targetType: [{ required: true, trigger: 'blur', message: '跟进对象类型不能为空' }],
|
|
@@ -181,28 +200,42 @@
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
handleSelectContact() {
|
|
handleSelectContact() {
|
|
|
- if (!this.queryContact.custId) {
|
|
|
|
|
- this.$message.warning('请先选择客户')
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ console.log(this.form.targetType)
|
|
|
|
|
+ if (this.form.targetType == '50') {
|
|
|
|
|
+ this.$refs.selectDistributor.open()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!this.queryContact.custId) {
|
|
|
|
|
+ this.$message.warning('请先选择客户')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.selectContact.open()
|
|
|
}
|
|
}
|
|
|
- this.$refs.selectContact.open()
|
|
|
|
|
},
|
|
},
|
|
|
selectContact(val) {
|
|
selectContact(val) {
|
|
|
if (val && val.length > 0) {
|
|
if (val && val.length > 0) {
|
|
|
|
|
+ if (this.form.targetType == '50') {
|
|
|
|
|
+ this.form.contactsName = val.map((item) => item.name).join()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.contactsName = val.map((item) => item.cuctName).join()
|
|
|
|
|
+ }
|
|
|
this.form.contactsId = val[0].id
|
|
this.form.contactsId = val[0].id
|
|
|
- this.form.contactsName = val.map((item) => item.cuctName).join()
|
|
|
|
|
}
|
|
}
|
|
|
console.log(this.form)
|
|
console.log(this.form)
|
|
|
},
|
|
},
|
|
|
- showEdit(row) {
|
|
|
|
|
|
|
+ showEdit(row, title = null) {
|
|
|
this.title = '添加跟进记录'
|
|
this.title = '添加跟进记录'
|
|
|
this.form = Object.assign(this.form, row)
|
|
this.form = Object.assign(this.form, row)
|
|
|
console.log(this.form)
|
|
console.log(this.form)
|
|
|
- this.queryContact.custId = this.form.custId
|
|
|
|
|
- this.customerInfo = {
|
|
|
|
|
- custId: this.form.custId,
|
|
|
|
|
- custName: this.form.custName,
|
|
|
|
|
|
|
+ if (this.form.targetType == '10' || this.form.targetType == '20' || this.form.targetType == '60') {
|
|
|
|
|
+ this.queryContact.custId = this.form.custId
|
|
|
|
|
+ this.customerInfo = {
|
|
|
|
|
+ custId: this.form.custId,
|
|
|
|
|
+ custName: this.form.custName,
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (this.form.targetType == '50') {
|
|
|
|
|
+ this.queryContact.distId = this.form.targetId
|
|
|
}
|
|
}
|
|
|
|
|
+ this.distrTitle = title
|
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
},
|
|
|
close() {
|
|
close() {
|