综合销售表下钻详情页面列表字段为null则隐藏对应列,自定义表单在initOption内配置的默认搜索,新增或者重置搜索后也要保留
This commit is contained in:
@@ -301,14 +301,13 @@ const getSaleInfo=async ()=>{
|
|||||||
})
|
})
|
||||||
tableSaleOption.value.height='calc(100vh - 160px)'
|
tableSaleOption.value.height='calc(100vh - 160px)'
|
||||||
fieldList.value.forEach(item=>{
|
fieldList.value.forEach(item=>{
|
||||||
if(Object.keys(res.records[0]).includes(item.fieldCode)){
|
if(res.records[0]&&(res.records[0][item.fieldCode]||res.records[0][item.fieldCode]==0)){
|
||||||
let config={
|
let config={
|
||||||
prop:item.fieldCode,
|
prop:item.fieldCode,
|
||||||
label:item.fieldName,
|
label:item.fieldName,
|
||||||
width:item.width?item.width+'px':item.fieldName=='产品名称'?'200px':undefined,
|
width:item.width?item.width+'px':item.fieldName=='产品名称'?'200px':undefined,
|
||||||
align:'center',
|
align:'center',
|
||||||
}
|
}
|
||||||
|
|
||||||
tableSaleOption.value.column[item.fieldCode]=config
|
tableSaleOption.value.column[item.fieldCode]=config
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ const subTabsValue = ref<any>({})
|
|||||||
const subFormRef = ref({})
|
const subFormRef = ref({})
|
||||||
const subTableRef = ref({})
|
const subTableRef = ref({})
|
||||||
const subTabsRef = ref()
|
const subTabsRef = ref()
|
||||||
|
const searchDefaultValue = ref<any>({})
|
||||||
const erpTabsOption = ref<any>({})
|
const erpTabsOption = ref<any>({})
|
||||||
const menuLeftShow = ref(true)
|
const menuLeftShow = ref(true)
|
||||||
const erpTableRef = ref({})
|
const erpTableRef = ref({})
|
||||||
@@ -710,6 +710,8 @@ const initTable = async () => {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (jsEnhanceObj.value.initOption) jsEnhanceObj.value.initOption()
|
if (jsEnhanceObj.value.initOption) jsEnhanceObj.value.initOption()
|
||||||
|
searchDefaultValue.value =JSON.parse(JSON.stringify(tableSearch.value))
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
enhanceErrorTip('js增强【initOption】方法执行异常,请检查', error)
|
enhanceErrorTip('js增强【initOption】方法执行异常,请检查', error)
|
||||||
}
|
}
|
||||||
@@ -1466,7 +1468,7 @@ const searchChange = (params, done) => {
|
|||||||
}
|
}
|
||||||
const resetChange = () => {
|
const resetChange = () => {
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
tableSearch.value = {}
|
tableSearch.value = {...searchDefaultValue.value}
|
||||||
if (tableInfo.value.tableType == 'treeAround' && tableCurrType.value != 'add') {
|
if (tableInfo.value.tableType == 'treeAround' && tableCurrType.value != 'add') {
|
||||||
treeRef.value.setCurrentKey(null)
|
treeRef.value.setCurrentKey(null)
|
||||||
treeAroundRow.value = {}
|
treeAroundRow.value = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user