Commit f4278420 by chenwq

选择客户弹窗

1 parent a4e9755b
......@@ -15,7 +15,7 @@
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
<div class="selected-list">
<p class="list-title p-16">已选({{ selectedSum }})</p>
<p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
......@@ -37,7 +37,6 @@ export default {
url: url,
searchForm: {},
customerList: [],
selectedSum: 0,
heightBox: 200,
// 表格
getListApi: this.$apis.sop.getCustomerListApi,
......@@ -140,15 +139,6 @@ export default {
}
},
watch: {
selectedCustomerList: {
handler() {
this.selectedSum = this.selectedCustomerList.length
},
deep: true
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350
......@@ -158,21 +148,20 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
// labelStandInfoList: []
tagLists: []
}
this.selectedLabelList.length &&
this.selectedLabelList.forEach(item => {
item.labelList.forEach(subItem => {
// this.searchForm.labelStandInfoList.push({
this.searchForm.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
item.labelList.length &&
item.labelList.forEach(subItem => {
this.searchForm.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
})
this.getListApi = this.selectedLabelList.length ? this.$apis.sop.getCustomerByTagListApi : this.$apis.sop.getCustomerListApi
resolve()
......@@ -227,7 +216,7 @@ export default {
var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
this.selectedLabelList.push(item)
this.selectedCustomerList.push(item)
}
})
this.recoverySelected()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!