Commit 11453487 by chenwq

bug修复

1 parent 3c2f1993
...@@ -118,8 +118,8 @@ const getCrowdTreeListApi = params => { ...@@ -118,8 +118,8 @@ const getCrowdTreeListApi = params => {
} }
// 跟进员工类型 // 跟进员工类型
const getStaffTypeListApi = params => { const getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntBusinessType' params.method = 'entmicro.api.staff.listEntFollowerType'
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -128,4 +128,4 @@ const getStaffTypeListApi = params => { ...@@ -128,4 +128,4 @@ const getStaffTypeListApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffTypeListApi } export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<template v-else> <template v-else>
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(subIdx)"> <el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(subIdx)">
<!-- <i class="el-icon-user-solid"></i> --> <!-- <i class="el-icon-user-solid"></i> -->
<span>{{ subItem[item.listConf.confName] }}</span> <span>{{ subItem[item.listConf.confName] || subItem[item.listConf.otherConfName] }}</span>
</el-tag> </el-tag>
</template> </template>
</div> </div>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</div> </div>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd> <select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag> <select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :selectedCustomerList="JSON.parse(JSON.stringify(customerDataList[2].list))" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer> <select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :parentSelectedCustomerList="customerDataList[2].list" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer>
</div> </div>
</template> </template>
...@@ -171,7 +171,8 @@ export default { ...@@ -171,7 +171,8 @@ export default {
customerCount: '', customerCount: '',
listConf: { listConf: {
confId: 'id', confId: 'id',
confName: 'customerName' confName: 'customerName',
otherConfName: 'customerPhone'
}, },
list: [] list: []
} }
...@@ -185,7 +186,7 @@ export default { ...@@ -185,7 +186,7 @@ export default {
customerOptType: '', customerOptType: '',
customerInfoList: [], customerInfoList: [],
// customerIds: [], // customerIds: [],
customerOptUpdate: '2', customerOptUpdate: '1',
eventList: [] eventList: []
}, },
editRule: { editRule: {
...@@ -239,11 +240,11 @@ export default { ...@@ -239,11 +240,11 @@ export default {
isDisabled: false, isDisabled: false,
optionList: [ optionList: [
{ {
confId: '1', confId: '2',
confName: '自动更新' confName: '自动更新'
}, },
{ {
confId: '2', confId: '1',
confName: '从不更新' confName: '从不更新'
} }
] ]
......
...@@ -182,6 +182,7 @@ export default { ...@@ -182,6 +182,7 @@ export default {
} }
if (this.activeName == 2) { if (this.activeName == 2) {
params.discountTypes = [2, 3, 4] params.discountTypes = [2, 3, 4]
params.directionalFlag = 1
params.validType = 'valid' params.validType = 'valid'
} }
if (this.activeName == 5) { if (this.activeName == 5) {
......
...@@ -39,6 +39,7 @@ export default { ...@@ -39,6 +39,7 @@ export default {
url: url, url: url,
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
selectedCustomerList: [],
heightBox: 200, heightBox: 200,
maxCustNum: 200, maxCustNum: 200,
// 搜索 // 搜索
...@@ -143,11 +144,7 @@ export default { ...@@ -143,11 +144,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
selectedLabelList: { parentSelectedCustomerList: {
type: Array,
default: () => []
},
selectedCustomerList: {
type: Array, type: Array,
default: () => [] default: () => []
} }
...@@ -156,11 +153,12 @@ export default { ...@@ -156,11 +153,12 @@ export default {
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425 this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
}, },
methods: { methods: {
handleSearch() { handleSearch() {
this.$refs.customerRef.refreshTable() this.$refs.customerRef.refreshTable(true, false)
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -172,6 +170,12 @@ export default { ...@@ -172,6 +170,12 @@ export default {
recoverySelected() { recoverySelected() {
this.$nextTick(() => { this.$nextTick(() => {
this.selectedCustomerList.forEach(row => {
var idx = this.tableList.findIndex(k => k.id == row.id)
if (idx != -1) {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
}
})
if (this.selectedCustomerList.length >= this.maxCustNum) { if (this.selectedCustomerList.length >= this.maxCustNum) {
let selectIds = this.selectedCustomerList.map(item => item.id) let selectIds = this.selectedCustomerList.map(item => item.id)
this.tableList.forEach((row, idx) => { this.tableList.forEach((row, idx) => {
...@@ -191,16 +195,18 @@ export default { ...@@ -191,16 +195,18 @@ export default {
let tableIds = this.tableList.map(item => item.id) let tableIds = this.tableList.map(item => item.id)
var selectIds = currentList.map(item => item.id) var selectIds = currentList.map(item => item.id)
var selectedIds = val.map(item => item.id) var selectedIds = val.map(item => item.id)
var tempList = []
val.forEach(item => { val.forEach(item => {
if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) { if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
this.selectedCustomerList.push(item) this.selectedCustomerList.push(item)
} }
}) })
currentList.forEach((item, idx) => { this.selectedCustomerList.forEach(item => {
if (!selectedIds.includes(item.id)) { if (selectedIds.includes(item.id) || !tableIds.includes(item.id)) {
this.selectedCustomerList.splice(idx, 1) tempList.push(item)
} }
}) })
this.selectedCustomerList = tempList
this.recoverySelected() this.recoverySelected()
}, },
......
...@@ -360,7 +360,7 @@ export default { ...@@ -360,7 +360,7 @@ export default {
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'businessName', optionLabel: 'followName',
optionsName: 'staffTypeList' optionsName: 'staffTypeList'
}, },
{ {
...@@ -489,7 +489,7 @@ export default { ...@@ -489,7 +489,7 @@ export default {
}, },
getStaffTypeList() { getStaffTypeList() {
this.$apis.common.getStaffTypeListApi({ flag: 0 }).then(res => { this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId') this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!