From c7ea2698b9187833a9442cb19c0844a03a1f62dc Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 9 Jul 2024 15:52:33 +0800 Subject: [PATCH] UI --- .../demandforecastingMain/index.vue | 19 +++++++++++++----- .../demandforecastingSupplierMain/index.vue | 20 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) 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) }