From e90455f0ae055d1eb6c29e205cb040bc5a2840bd Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 6 Dec 2024 17:16:23 +0800 Subject: [PATCH] =?UTF-8?q?YT-1435pc=E5=92=8Cpda=E7=AB=AF=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=82=B9=E5=87=BB=E9=83=BD=E9=9C=80=E8=A6=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandforecastingMain/index.vue | 75 ++++++++++--------- .../supplierdeliverRequestMain/index.vue | 2 +- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 46fa01fc7..5d8cd7971 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -39,29 +39,28 @@ - - - + +
+
+
+ + +
+ @@ -94,7 +93,7 @@ const updataTableColumns = (val) => { orginTableColumns.value = val } - +const formLoadingPlan = ref(false) // 查询页面返回 const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => { @@ -292,17 +291,23 @@ const handlePreviewPlan = async ()=>{ const buttonBaseClickPlan = async (val)=>{ if (val == 'save') { // 保存 - dialogVisiblePlan.value = false - let rows: any = [] - selectionPlanRows.value.forEach((item) => { - rows = [...rows, ...item.selectionRows.map((item1) => item1.id)] - }) - console.log('预览要货计划', selectionPlanRows.value) - console.log('预览要货计划', rows.join(',')) - let res = await DemandforecastingDetailApi.generateOrderPlan(rows) - message.success(t('common.submitSuccess')) - buttonBaseClick('refresh', null) - console.log('保存',res) + formLoadingPlan.value =true + try { + let rows: any = [] + selectionPlanRows.value.forEach((item) => { + rows = [...rows, ...item.selectionRows.map((item1) => item1.id)] + }) + console.log('预览要货计划', selectionPlanRows.value) + console.log('预览要货计划', rows.join(',')) + let res = await DemandforecastingDetailApi.generateOrderPlan(rows) + message.success(t('common.submitSuccess')) + buttonBaseClick('refresh', null) + dialogVisiblePlan.value = false + console.log('保存',res) + } finally { + formLoadingPlan.value =false + } + } // 关闭 else if (val == 'close') { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 262e565a1..c9a88b9c4 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -1201,7 +1201,7 @@ const labelPrint = async (row) => { // 获得表格的各种操作 const { getList: getListPrint } = tableMethods - getListPrint() + await getListPrint() tableObject.loading = false const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns tableColumns.forEach((item) => {