|
|
@@ -392,6 +392,28 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="业务来源" prop="srcType"
|
|
|
+ :rules="[{ required: true, message: '', trigger: 'blur' }]">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="10">
|
|
|
+ <search-query :datalist="sourceTypeData" :selectValue="assemblyForm.srcType"
|
|
|
+ :disabled="detailData.seeDisabled || assemblyForm.feeCenterListD.filter(item => item.auditStatus > 0).length || assemblyForm.feeCenterListC.filter(item => item.auditStatus > 0).length"
|
|
|
+ :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
|
|
|
+ placeholder="请选择业务来源" @corpChange="sourceCorp($event, 'srcType')">
|
|
|
+ </search-query>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="13">
|
|
|
+ <search-query :datalist="srcData" :selectValue="assemblyForm.srcCnName"
|
|
|
+ :filterable="true" :clearable="true" :remote="true"
|
|
|
+ :disabled="!assemblyForm.srcType || detailData.seeDisabled || assemblyForm.feeCenterListD.filter(item => item.auditStatus > 0).length || assemblyForm.feeCenterListC.filter(item => item.auditStatus > 0).length"
|
|
|
+ :buttonIf="false" :forParameter="sourceforParameter" placeholder="请选择来源明细"
|
|
|
+ @remoteMethod="sourceRemote($event, 'srcCnName')"
|
|
|
+ @corpChange="sourceCorp($event, 'srcCnName')"
|
|
|
+ @corpFocus="sourceRemote($event, 'srcCnName')">
|
|
|
+ </search-query>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -648,8 +670,9 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="13">
|
|
|
- <el-form-item label="OP" prop="operatorName" label-width="80px">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="OP" prop="operatorName" label-width="80px"
|
|
|
+ :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
|
|
|
<span slot="label">
|
|
|
<span style="color: #1e9fff">OP</span>
|
|
|
</span>
|
|
|
@@ -661,8 +684,9 @@
|
|
|
:disabled="detailData.seeDisabled || assemblyForm.feeCenterListD.filter(item => item.auditStatus > 0).length || assemblyForm.feeCenterListC.filter(item => item.auditStatus > 0).length"></dic-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="11">
|
|
|
- <el-form-item label="客服" prop="customerServiceName" label-width="40px">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="客服" prop="customerServiceName" label-width="50px"
|
|
|
+ :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
|
|
|
<span slot="label">
|
|
|
<span style="color: #1e9fff">客服</span>
|
|
|
</span>
|
|
|
@@ -1208,6 +1232,7 @@ import { synchronizationExchangeRate } from "@/api/iosBasicData/rateManagement";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
|
|
|
import { getBservicetermsList } from "@/api/iosBasicData/bserviceterms";
|
|
|
+import { selectListLos } from "@/api/approval/processConfig";
|
|
|
import _ from "lodash";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
|
|
|
@@ -1237,7 +1262,21 @@ export default {
|
|
|
components: { TreeSelect, bcorps, SearchQuery, precontainers, bcorpstypedefine, dicSelect },
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ sourceTypeData: [
|
|
|
+ {
|
|
|
+ label: '公司',
|
|
|
+ value: 'OWN'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '代理',
|
|
|
+ value: 'AGENT'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业务员',
|
|
|
+ value: 'SALES'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ srcData: [],
|
|
|
roleName: localStorage.getItem("roleName"),
|
|
|
dicTree: [],
|
|
|
textareaNumber: 5,
|
|
|
@@ -1375,6 +1414,94 @@ export default {
|
|
|
// this.getDicTree()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 业务来源下拉
|
|
|
+ sourceCorp(value, name) {
|
|
|
+ if (name == 'srcCnName') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm, 'srcId', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', '')
|
|
|
+ }
|
|
|
+ for (let item of this.srcData) {
|
|
|
+ if (item[this.sourceforParameter.value] == value) {
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ // 国家
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.title)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.title)
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ // 代理
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.cnName)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.cnName)
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ // 业务员
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.name)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.name)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (name == 'srcType') {
|
|
|
+ this.$set(this.assemblyForm, 'srcType', value)
|
|
|
+ this.$set(this.assemblyForm, 'srcId', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', '')
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
|
|
|
+ this.ownDeptLazyTreefun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
|
|
|
+ this.agentBcorpsListfun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
|
|
|
+ this.salesUserGetListfun()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 业务来源接口
|
|
|
+ sourceRemote(value, name) {
|
|
|
+ if (name == 'srcCnName') {
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
|
|
|
+ this.ownDeptLazyTreefun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
|
|
|
+ this.agentBcorpsListfun(value)
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
|
|
|
+ this.salesUserGetListfun(value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取业务来源代理数据
|
|
|
+ agentBcorpsListfun(cnName) {
|
|
|
+ let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理,代理客户'
|
|
|
+ getBcorpslistByType(1, 10, { cnName, corpTypeName }).then(res => {
|
|
|
+ this.srcData = res.data.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取业务来源业务员数据
|
|
|
+ salesUserGetListfun(account) {
|
|
|
+ selectListLos('业务员').then(res => {
|
|
|
+ this.srcData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取公司名称 用户管理左侧
|
|
|
+ ownDeptLazyTreefun() {
|
|
|
+ getDeptLazyTree(0).then(res => {
|
|
|
+ this.srcData = res.data.data
|
|
|
+ // 来源 内容 默认登录人所属公司
|
|
|
+ for (let item of this.srcData) {
|
|
|
+ if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.title)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.title)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取服务方式数据
|
|
|
serviceTermsWorkDicts() {
|
|
|
// getWorkDicts('service_terms').then(res=>{
|