diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 615661842..83c4eb7d5 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -95,13 +95,22 @@ watch(()=>tableObjectHead.tableList,()=>{ const updateDateTableColumns = ()=>{ console.log('tableObjectHead',tableObjectHead) let dateColumns = [] - tableObjectHead.tableList.forEach(item=>{ + if(tableObjectHead.tableList.length>10){ + tableObjectHead.tableList.forEach(item=>{ dateColumns.push({ - width:120, - field: item, - label: item + width:120, + field: item, + label: item + }) }) - }) + }else{ + tableObjectHead.tableList.forEach(item=>{ + dateColumns.push({ + field: item, + label: item + }) + }) + } tableColumns.value = [...orginTableColumns.value,...dateColumns] console.log('tableColumns',tableColumns.value) } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index 9ce425e76..556415855 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -102,13 +102,23 @@ watch(()=>tableObjectHead.tableList,()=>{ const updateDateTableColumns = ()=>{ console.log('tableObjectHead',tableObjectHead) let dateColumns = [] - tableObjectHead.tableList.forEach(item=>{ + if(tableObjectHead.tableList.length>10){ + tableObjectHead.tableList.forEach(item=>{ dateColumns.push({ - width:120, - field: item, - label: item + width:120, + field: item, + label: item + }) }) - }) + }else{ + tableObjectHead.tableList.forEach(item=>{ + dateColumns.push({ + field: item, + label: item + }) + }) + } + tableColumns.value = [...orginTableColumns.value,...dateColumns] console.log('tableColumns',tableColumns.value) }