diff --git a/src/components/LowDesign/src/LowReport/index.vue b/src/components/LowDesign/src/LowReport/index.vue index faa153b..f2fb1df 100644 --- a/src/components/LowDesign/src/LowReport/index.vue +++ b/src/components/LowDesign/src/LowReport/index.vue @@ -301,14 +301,13 @@ const getSaleInfo=async ()=>{ }) tableSaleOption.value.height='calc(100vh - 160px)' 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={ prop:item.fieldCode, label:item.fieldName, width:item.width?item.width+'px':item.fieldName=='产品名称'?'200px':undefined, align:'center', } - tableSaleOption.value.column[item.fieldCode]=config } }) diff --git a/src/components/LowDesign/src/LowTable/index.vue b/src/components/LowDesign/src/LowTable/index.vue index ebf64e4..33d856d 100644 --- a/src/components/LowDesign/src/LowTable/index.vue +++ b/src/components/LowDesign/src/LowTable/index.vue @@ -471,7 +471,7 @@ const subTabsValue = ref({}) const subFormRef = ref({}) const subTableRef = ref({}) const subTabsRef = ref() - +const searchDefaultValue = ref({}) const erpTabsOption = ref({}) const menuLeftShow = ref(true) const erpTableRef = ref({}) @@ -710,6 +710,8 @@ const initTable = async () => { } try { if (jsEnhanceObj.value.initOption) jsEnhanceObj.value.initOption() + searchDefaultValue.value =JSON.parse(JSON.stringify(tableSearch.value)) + } catch (error) { enhanceErrorTip('js增强【initOption】方法执行异常,请检查', error) } @@ -1466,7 +1468,7 @@ const searchChange = (params, done) => { } const resetChange = () => { return new Promise(async (resolve) => { - tableSearch.value = {} + tableSearch.value = {...searchDefaultValue.value} if (tableInfo.value.tableType == 'treeAround' && tableCurrType.value != 'add') { treeRef.value.setCurrentKey(null) treeAroundRow.value = {}