Commit b068cdbe by chenwq

fix(salesManagement): 修复客户管理页面搜索条件及表格显示问题

- 修正业务类型选项显示空格问题
- 调整组织架构页面表格列顺序及标签名称
- 修复客户管理页面品牌选择逻辑和搜索条件重置问题
- 优化多选标签样式及销售人员选项显示
- 修复城市选择联动逻辑问题
1 parent 5894ac3f
......@@ -5,19 +5,19 @@ export const busTypeOpt = [
},
{
confId: "2",
confLabel: "2.1权益升级"
confLabel: "2.1 权益升级"
},
{
confId: "3",
confLabel: "2.2续保积分"
confLabel: "2.2 续保积分"
},
{
confId: "4",
confLabel: "2.3延保升级"
confLabel: "2.3 延保升级"
},
{
confId: "5",
confLabel: "6.1二手车"
confLabel: "6.1 二手车"
}
]
......
......@@ -107,7 +107,7 @@ export default {
cityId: '',
businessTypeList: [],
cooperationMode: '',
mainBrandId: '',
subBrandId: '',
flowSituation: '',
salesPersonId: '',
signedDate: '',
......@@ -132,7 +132,8 @@ export default {
changeAttr: (value, targetItem) => {
this.searchForm.cityId = ""
this.baseData.cityList = []
this.getOptionsList()
const cityIdx = this.showFormData.findIndex((item) => item.name == 'cityId')
this.showFormData[cityIdx].optionList = []
if (value) {
const params = {
districtName: this.baseData.provinceInfoList.find(
......@@ -142,7 +143,7 @@ export default {
getDistrictDetail(params).then((res) => {
if (res && res.length) {
this.baseData.cityList = res[0].districts
this.getOptionsList()
this.getOptionsList('showFormData')
}
})
}
......@@ -162,11 +163,12 @@ export default {
name: 'businessTypeList',
type: 'select',
multiple: true,
// multipleLimit: 5,
collapseTags: true,
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'busTypeOpt'
optionsName: ''
}, {
label: '合作模式',
name: 'cooperationMode',
......@@ -177,7 +179,7 @@ export default {
optionsName: 'cooperModeOpt'
}, {
label: "主营品牌",
name: "mainBrandId",
name: "subBrandId",
type: "select",
collapseTags: true,
optionList: [],
......@@ -198,8 +200,8 @@ export default {
name: 'salesPersonId',
type: 'select',
optionList: [],
optionId: 'uuid',
optionLabel: 'staffName',
optionId: 'userId',
optionLabel: 'userName',
optionsName: 'salesPersonOpt'
}, {
label: '签约时间',
......@@ -242,10 +244,15 @@ export default {
width: '150px'
}, {
label: '分润规则',
prop: 'profitRule'
prop: 'profitRule',
width: '150px'
}, {
label: '关联商户',
prop: 'merchantName'
prop: 'merchantName',
width: '120px',
formatter: (cellValue) => {
return ((cellValue.merchantName || '') + (cellValue.merchantId ? ('(' + cellValue.merchantId + ')') : '')) || '-'
}
}, {
label: '业务类型',
prop: 'businessTypeList',
......@@ -276,6 +283,7 @@ export default {
}, {
label: '所在地区',
prop: '',
width: '150px',
formatter: (cellValue) => {
return (cellValue.provinceName || '') + (cellValue.city || '') + (cellValue.districtName || '') || '-'
}
......@@ -285,7 +293,10 @@ export default {
width: '152px'
}, {
label: '拜访次数',
prop: 'visitTimes'
prop: 'visitTimes',
formatter: (cellValue) => {
return cellValue.visitTimes
}
}, {
label: '状态',
prop: 'potentialCustomersStatus',
......@@ -409,6 +420,8 @@ export default {
this.getBrandList()
this.getregionUserList()
this.getOptionsList('showFormData')
const busIdx = this.findIdx('businessTypeList')
this.showFormData[busIdx].optionList = this.baseData.busTypeOpt
},
methods: {
......@@ -417,6 +430,9 @@ export default {
// close: 'd2admin/page/close'
// }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
findIdx(attr) {
return this.showFormData.findIndex(item => item.name == attr)
},
getParams() {
var params = deepClone(this.searchForm)
params.potentialCustomersStatus = this.activeName == '0' ? '' : this.activeName
......@@ -440,6 +456,9 @@ export default {
delete params[item.attr]
}
})
if (!params.businessTypeList || params.businessTypeList.length == 0) {
delete params.businessTypeList
}
return params
},
beforeSearchFn() {
......@@ -466,7 +485,7 @@ export default {
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
if (item.type === 'select' && item.optionsName && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
......@@ -559,7 +578,6 @@ export default {
getProvinceList() {
const params = { districtName: "中国" }
getDistrictDetail(params).then((res) => {
console.log(res)
if (res && res.length) {
this.baseData.provinceInfoList = res[0].districts
this.getOptionsList('showFormData')
......@@ -568,8 +586,15 @@ export default {
},
getBrandList() {
getBrandList({}).then((res) => {
this.baseData.brandList = res
getBrandList({ containsChildren: true }).then((res) => {
console.log(res, 'res---')
// 仅展示二级车型
let list = []
res.forEach((val) => {
list = list.concat(val?.children || [])
})
console.log(list, 'list---')
this.baseData.brandList = list
this.getOptionsList('showFormData')
})
},
......@@ -577,7 +602,7 @@ export default {
getregionUserList() {
regionUserList({}).then((res) => {
console.log(res)
this.baseData.salesPersonOpt = res.staffList
this.baseData.salesPersonOpt = res.selectedStaffList
this.getOptionsList('showFormData')
})
},
......@@ -607,12 +632,15 @@ export default {
cityId: '',
businessTypeList: [],
cooperationMode: '',
mainBrandId: '',
subBrandId: '',
flowSituation: '',
salesPersonId: '',
signedDate: '',
expectedDate: ''
}
this.baseData.cityList = []
const cityIdx = this.showFormData.findIndex((item) => item.name == 'cityId')
this.showFormData[cityIdx].optionList = []
this.$refs.customerTable.refreshTable(false, true)
},
// 编辑
......
<!-- 编辑 - 组织架构信息 -->
<template>
<d2-container class="edit-page edit-tmpl">
<div style="padding: 20px">
<div style="padding: 20px" v-loading="$store.state.d2admin.loading.value">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
</glsx-combi-form>
<div class="footer">
......@@ -41,7 +41,7 @@ export default {
maxlength: 100,
isDisabled: true
}, {
label: '区域运营',
label: '大区经理',
name: 'operateUserId',
type: 'select',
isClear: true,
......@@ -103,7 +103,7 @@ export default {
if (otherRegionSelectList.includes(item.uuid)) {
this.baseData.operateUserOpt[idx].isDisabled = true
} else {
// 本大区下,已选的销售人员,不能再选为区域运营
// 本大区下,已选的销售人员,不能再选为大区经理
this.baseData.operateUserOpt[idx].isDisabled = !!this.editData.salesList.includes(item.uuid)
}
})
......@@ -111,7 +111,7 @@ export default {
if (otherRegionSelectList.includes(item.uuid)) {
this.baseData.salesPersonOpt[idx].isDisabled = true
} else {
// 本大区下,已选的区域运营,不能再选为销售人员
// 本大区下,已选的大区经理,不能再选为销售人员
this.baseData.salesPersonOpt[idx].isDisabled = this.editData.operateUserId == item.uuid
}
})
......@@ -235,4 +235,22 @@ export default {
.footer {
text-align: center;
}
/* 仅在本页面定制多选已选标签样式(不影响其他页面) */
.edit-page.edit-tmpl ::v-deep .el-select__tags .el-tag {
background-color: #f8faff !important;
border: 1px solid #2a58ad !important; /* 设计稿蓝色描边 */
color: #2a58ad !important; /* 文本与描边一致的蓝色 */
border-radius: 4px;
height: 24px;
line-height: 22px;
padding: 0 8px;
// margin: 4px 8px 4px 0;
}
.edit-page.edit-tmpl ::v-deep .el-select__tags .el-tag .el-tag__close {
font-size: 16px;
font-weight: bold;
color: #2a58ad !important; /* 关闭按钮同蓝色 */
background-color: #f8faff !important;
}
</style>
......@@ -25,10 +25,6 @@ export default {
listName: 'list',
tableOption: true,
tableColumns: [{
label: '创建时间',
prop: 'createdDate',
width: '150px'
}, {
label: '大区名称',
prop: 'regionName'
}, {
......@@ -48,6 +44,10 @@ export default {
// 人员类型(1.大区经理,2.销售人员)
return (cellValue.userList && cellValue.userList.length) ? cellValue.userList.filter(item => item.userType == 2).map(item => item.userName).join(',') || '-' : '-'
}
}, {
label: '创建时间',
prop: 'createdDate',
width: '150px'
}]
},
baseData: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!