多选(in) multiple和月份表头按data是否返回字段过滤
This commit is contained in:
@@ -296,7 +296,7 @@ const initTable = async () => {
|
||||
config.dicData=[{label:'1月',value:'1'},{label:'2月',value:'2'},{label:'3月',value:'3'},{label:'4月',value:'4'},{label:'5月',value:'5'},{label:'6月',value:'6'},{label:'7月',value:'7'},{label:'8月',value:'8'},{label:'9月',value:'9'},{label:'10月',value:'10'},{label:'11月',value:'11'},{label:'12月',value:'12'}]
|
||||
}
|
||||
}
|
||||
if(['货品名称','货品名称','剂型','剂型名称','客户名称','客户','业务员'].includes(item.fieldName)&&config.search){
|
||||
if(['货品名称','货品','剂型','产品','产品名称','剂型名称','客户名称','客户','业务员'].includes(item.fieldName)&&config.search){
|
||||
config.dataType= 'string'
|
||||
config.dictType= 'defaultTable'
|
||||
config.dicUrl= `/lideeyunji/report-data/list/${item.fieldName.includes('客户') ?'khxx':(item.fieldName.includes('业务员')?'ywyxx': 'hpmx')}`
|
||||
@@ -306,7 +306,7 @@ const initTable = async () => {
|
||||
pageNo:1
|
||||
}
|
||||
config.filterable= true
|
||||
config.multiple= true
|
||||
|
||||
config.collapseTags=true
|
||||
config.dicFormatter= (res) => { //请求数据格式化
|
||||
const arr=[...new Set(res.records.map(item=>item[config.prop]))]
|
||||
@@ -314,6 +314,10 @@ const initTable = async () => {
|
||||
}
|
||||
config.searchType='select'
|
||||
}
|
||||
|
||||
const moreIn="MORE_IN".includes(item.queryMode)
|
||||
config.searchType=moreIn?'select':config.searchType
|
||||
config.multiple=moreIn
|
||||
|
||||
if(!!item.isAmount){
|
||||
index==0?amountFieds.value.fistField=config.prop:''
|
||||
@@ -598,21 +602,12 @@ const getTableData = async (isLoading = true) => {
|
||||
})
|
||||
}
|
||||
|
||||
tableData.value = processedData
|
||||
// amountFieds.value={
|
||||
// 'thissaqty_s':{
|
||||
// prop:'thissaqty',
|
||||
// },
|
||||
// "monthsaqty_s":{
|
||||
// prop:'monthsaqty',
|
||||
//},
|
||||
//'lastsaqty_s':{
|
||||
// prop:'lastsaqty'
|
||||
//}
|
||||
//}
|
||||
//tableData.value[0]['thissaqty_s']=6083195687
|
||||
// tableData.value[0]['monthsaqty_s']=972705058
|
||||
// tableData.value[0]['lastsaqty_s']=6075936725
|
||||
tableData.value = processedData
|
||||
Object.values(tableOption.value.column).forEach( item=>{
|
||||
item.hide=item.children?.every(child=>tableData.value[0]&&(tableData.value[0][child.prop]===undefined))
|
||||
item.hide? hideColumns.value.push(item.prop):''
|
||||
})
|
||||
|
||||
|
||||
let keys=Object.keys(amountFieds.value)
|
||||
if(!!keys.length&&!!tableData.value.length){
|
||||
|
||||
Reference in New Issue
Block a user