|
@@ -273,7 +273,7 @@
|
|
|
key="consigneeName"
|
|
|
show-overflow-tooltip
|
|
|
v-if="!columnNoRoutList.includes('客户')"
|
|
|
- :render-header="renderHeaderConsignee"
|
|
|
+ :render-header="renderHeader"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -309,17 +309,15 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- className="xxxx_capacityNo"
|
|
|
prop="capacityNo"
|
|
|
column-key="capacityNo"
|
|
|
key="capacityNo"
|
|
|
label="车牌号"
|
|
|
align="center"
|
|
|
width="90px"
|
|
|
- sortable
|
|
|
show-overflow-tooltip
|
|
|
- :filters="filterCapacityList"
|
|
|
v-if="!columnNoRoutList.includes('车牌号')"
|
|
|
+ :render-header="renderHeader"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -370,12 +368,11 @@
|
|
|
prop="addressPlace"
|
|
|
label="收货地址"
|
|
|
width="250px"
|
|
|
- sortable
|
|
|
column-key="addressPlace"
|
|
|
key="addressPlace"
|
|
|
- :filters="filteraddressPlace"
|
|
|
show-overflow-tooltip
|
|
|
v-if="!columnNoRoutList.includes('收货地址')"
|
|
|
+ :render-header="renderHeader"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
@@ -396,9 +393,9 @@
|
|
|
label="摘要"
|
|
|
width="150px"
|
|
|
align="center"
|
|
|
- :filters="filterSaleRemark"
|
|
|
show-overflow-tooltip
|
|
|
v-if="!columnNoRoutList.includes('摘要')"
|
|
|
+ :render-header="renderHeader"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -408,7 +405,7 @@
|
|
|
label="备注"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
- :filters="filterTruckRemark"
|
|
|
+ :render-header="renderHeader"
|
|
|
show-overflow-tooltip
|
|
|
v-if="!columnNoRoutList.includes('备注')"
|
|
|
>
|
|
@@ -2094,7 +2091,8 @@ export default {
|
|
|
headColumnList: [],
|
|
|
columnAllData: [],
|
|
|
columnHiddenData: [],
|
|
|
- consigneeCheckList: []
|
|
|
+ consigneeCheckList: [],
|
|
|
+ showPopover: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -2280,19 +2278,37 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- renderHeaderConsignee(h, { column }) {
|
|
|
+ renderHeader(h, { column }) {
|
|
|
let arr = []
|
|
|
+ let renderColumnFilterList = []
|
|
|
+ let filterVal = ''
|
|
|
if (column.label === '客户') {
|
|
|
+ filterVal = 'consigneeNameList'
|
|
|
+ renderColumnFilterList = this.filterConsigneeList
|
|
|
+ } else if (column.label === '车牌号') {
|
|
|
+ filterVal = 'capacityList'
|
|
|
+ renderColumnFilterList = this.filterCapacityList
|
|
|
+ } else if (column.label === '收货地址') {
|
|
|
+ filterVal = 'addressPlaceList'
|
|
|
+ renderColumnFilterList = this.filteraddressPlace
|
|
|
+ } else if (column.label === '摘要') {
|
|
|
+ filterVal = 'saleRemarkList'
|
|
|
+ renderColumnFilterList = this.filterSaleRemark
|
|
|
+ } else if (column.label === '备注') {
|
|
|
+ filterVal = 'truckRemarkList'
|
|
|
+ renderColumnFilterList = this.filterTruckRemark
|
|
|
+ }
|
|
|
+ if (filterVal == '') {
|
|
|
+ return h('div', column.label, {})
|
|
|
}
|
|
|
return h(
|
|
|
'div',
|
|
|
{
|
|
|
style: {
|
|
|
height: 'auto',
|
|
|
- color:
|
|
|
- this.filterMap.consigneeNameList.length > 0 ? '#409EFF' : '#ffff',
|
|
|
- fontWeight: '700',
|
|
|
- fontSize: '15px'
|
|
|
+ color: this.filterMap[filterVal].length > 0 ? '#409EFF' : '#ffff',
|
|
|
+ fontWeight: this.filterMap[filterVal].length > 0 ? '700' : '400',
|
|
|
+ fontSize: '12px'
|
|
|
}
|
|
|
},
|
|
|
[
|
|
@@ -2300,12 +2316,19 @@ export default {
|
|
|
'el-popover',
|
|
|
{
|
|
|
props: {
|
|
|
- placement: 'bottom-start',
|
|
|
-
|
|
|
- trigger: 'click'
|
|
|
+ placement: 'bottom',
|
|
|
+ trigger: 'click',
|
|
|
+ value: this.showPopover
|
|
|
},
|
|
|
style: {
|
|
|
width: 'auto'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ show: _ => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.filterSelectRef.focus()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
[
|
|
@@ -2317,9 +2340,10 @@ export default {
|
|
|
column.label + ' ' + '<i class="el-icon-search""/>'
|
|
|
}
|
|
|
}),
|
|
|
- h(
|
|
|
+ this.$createElement(
|
|
|
'el-select',
|
|
|
{
|
|
|
+ ref: 'filterSelectRef',
|
|
|
style: {
|
|
|
'margin-bottom': '10px',
|
|
|
'border-bottom': '1px solid #efefef',
|
|
@@ -2328,28 +2352,29 @@ export default {
|
|
|
},
|
|
|
props: {
|
|
|
placeholder: '请输入客户名称查询',
|
|
|
+ reserveKeyword: true,
|
|
|
filterable: true,
|
|
|
multiple: true,
|
|
|
collapseTags: true,
|
|
|
- value: this.filterMap.consigneeNameList
|
|
|
+ value: this.filterMap[filterVal]
|
|
|
},
|
|
|
on: {
|
|
|
change: val => {
|
|
|
console.log(val)
|
|
|
if (val) {
|
|
|
// this.consigneeCheckList.push(val)
|
|
|
- this.filterMap.consigneeNameList = [...new Set(val)]
|
|
|
+ this.filterMap[filterVal] = [...new Set(val)]
|
|
|
} else {
|
|
|
- let i = this.filterMap.consigneeNameList.findIndex(
|
|
|
+ let i = this.filterMap[filterVal].findIndex(
|
|
|
row => row == val
|
|
|
)
|
|
|
- this.filterMap.consigneeNameList.splice(i, 1)
|
|
|
+ this.filterMap[filterVal].splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
[
|
|
|
- this.filterConsigneeList.map((item, index) => {
|
|
|
+ renderColumnFilterList.map((item, index) => {
|
|
|
return h('el-option', {
|
|
|
props: {
|
|
|
label: item.text,
|
|
@@ -2365,8 +2390,8 @@ export default {
|
|
|
size: 'mini'
|
|
|
},
|
|
|
on: {
|
|
|
- click: _ => {
|
|
|
- this.filterMap.consigneeNameList = []
|
|
|
+ click: e => {
|
|
|
+ this.filterMap[filterVal] = []
|
|
|
this.onclick(this.filterMap)
|
|
|
}
|
|
|
},
|
|
@@ -4669,6 +4694,7 @@ export default {
|
|
|
onclick(obj) {
|
|
|
this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
|
|
|
this.isRowClick = 0
|
|
|
+ this.showPopover = false
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '正在获取数据',
|
|
@@ -4811,38 +4837,49 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
filterRefreshCtrl(data, obj) {
|
|
|
- debugger
|
|
|
- if (!obj.truckRemarkList) {
|
|
|
+ if (!obj.truckRemarkList || obj.truckRemarkList.length === 0) {
|
|
|
this.filterTruckRemark = data[0].filterTruckRemark
|
|
|
}
|
|
|
- if (!obj.saleRemarkList) {
|
|
|
+ if (!obj.saleRemarkList || obj.saleRemarkList.length === 0) {
|
|
|
this.filterSaleRemark = data[0].filterSaleRemark
|
|
|
}
|
|
|
- if (!obj.consigneeNameList) {
|
|
|
+ if (!obj.consigneeNameList || obj.consigneeNameList.length === 0) {
|
|
|
this.filterConsigneeList = data[0].filterConsigneeList
|
|
|
}
|
|
|
- if (!obj.addressPlaceList) {
|
|
|
+ if (!obj.addressPlaceList || obj.addressPlaceList.length === 0) {
|
|
|
this.filteraddressPlace = data[0].filteraddressPlace
|
|
|
}
|
|
|
- if (!obj.materialSpeList) {
|
|
|
+ if (!obj.materialSpeList || obj.materialSpeList.length === 0) {
|
|
|
this.filtermaterialSpe = data[0].filtermaterialSpe
|
|
|
}
|
|
|
- if (!obj.capacityList) {
|
|
|
+ if (!obj.capacityList || obj.capacityList.length === 0) {
|
|
|
this.filterCapacityList = data[0].filterCapacityList
|
|
|
}
|
|
|
- if (!obj.materialNameList) {
|
|
|
+ if (!obj.materialNameList || obj.materialNameList.length === 0) {
|
|
|
this.filtermaterialNameList = data[0].filtermaterialNameList
|
|
|
}
|
|
|
- if (!obj.carrierList) {
|
|
|
+ if (!obj.carrierList || obj.carrierList.length === 0) {
|
|
|
this.filterCarrierList = data[0].filterCarrierList
|
|
|
}
|
|
|
- if (!obj.orderStatusList) {
|
|
|
+ if (!obj.orderStatusList || obj.orderStatusList === 0) {
|
|
|
this.filterorderStatus = data[0].filterorderStatus
|
|
|
}
|
|
|
},
|
|
|
//重新获取表格数据
|
|
|
refresh() {
|
|
|
- this.filterMap = {}
|
|
|
+ this.filterMap = {
|
|
|
+ consigneeNameList: [],
|
|
|
+ truckRemarkList: [],
|
|
|
+ saleRemarkList: [],
|
|
|
+ saleOrderStatusList: [],
|
|
|
+ materialSpeList: [],
|
|
|
+ addressPlaceList: [],
|
|
|
+ orderStatusList: [],
|
|
|
+ saleAreaList: [],
|
|
|
+ materialNameList: [],
|
|
|
+ carrierList: [],
|
|
|
+ capacityList: []
|
|
|
+ }
|
|
|
this.visibleList = []
|
|
|
this.getSteelReport()
|
|
|
},
|