Browse Source

bug

master_hella_20240701
wangyufei 5 months ago
parent
commit
8561ad2740
  1. 41
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

41
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -58,21 +58,8 @@ const tableColumns = ref(DemandforecastingMain.allSchemas.tableColumns)
const updataTableColumns = (val) => {
orginTableColumns.value = val
}
const updateDateTableColumns = ()=>{
console.log('tableObjectHead',tableObjectHead)
let dateColumns = []
tableObjectHead.tableList.forEach(item=>{
dateColumns.push({
field: item,
label: item,
table:{
width: 120
}
})
})
tableColumns.value = [...orginTableColumns.value,...dateColumns]
console.log('tableColumns',tableColumns.value)
}
//
const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => {
@ -102,6 +89,24 @@ const { tableObject:tableObjectHead, tableMethods:tableMethodsHead } = useTable(
//
const { getList:getListHead, setSearchParams:setSearchParamsHead } = tableMethodsHead
watch(()=>tableObjectHead.tableList,()=>{
updateDateTableColumns()
},{deep:true})
const updateDateTableColumns = ()=>{
console.log('tableObjectHead',tableObjectHead)
let dateColumns = []
tableObjectHead.tableList.forEach(item=>{
dateColumns.push({
field: item,
label: item,
table:{
width: 120
}
})
})
tableColumns.value = [...orginTableColumns.value,...dateColumns]
console.log('tableColumns',tableColumns.value)
}
const { tableObject, tableMethods } = useTable({
getListApi: DemandforecastingDetailApi.getDemandforecastingDetailPage //
})
@ -128,7 +133,7 @@ const buttonBaseClick = async (val, item) => {
})
} else {
await getListHead()
updateDateTableColumns()
// updateDateTableColumns()
getList()
}
@ -143,7 +148,7 @@ const buttonBaseClick = async (val, item) => {
const searchClick = async (data)=>{
console.log('searchClick',data)
await setSearchParamsHead(data)
updateDateTableColumns()
// updateDateTableColumns()
setSearchParams(data)
}
/** 导出按钮操作 */
@ -181,7 +186,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
await getListHead()
updateDateTableColumns()
// updateDateTableColumns()
getList()
importTemplateData.templateUrl = await DemandforecastingMainApi.importTemplate()
})

Loading…
Cancel
Save