From f7c0a76d415572ec89749e011965d7f441d02cdb Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Mon, 12 May 2025 13:16:06 +0800 Subject: [PATCH] =?UTF-8?q?YT-2394:=E4=BE=9B=E5=BA=94=E5=95=86=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E8=B4=B9=E7=94=A8=E4=B8=BB=E5=AF=BC=E5=87=BA=E4=B8=BB?= =?UTF-8?q?=E5=AD=90=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E9=A1=B5=E9=9D=A2=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=EF=BC=9B=E4=BE=9B=E5=BA=94=E5=95=86=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E8=B4=B9=E7=94=A8=E6=98=8E=E7=BB=86=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E9=A1=B5=E9=9D=A2=E5=AD=97=E6=AE=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierMoldCostMain/index.vue | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue index 2fa43c6a2..2f42c17d9 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue @@ -64,7 +64,18 @@ :detailButtonIsShowEdit="false" :detailButtonIsShowDelete="false" :buttondataTable="buttondataTable" - :otherHeadButttonData = "[]" + :otherHeadButttonData = "[ + { + label: t('ts.导出明细'), + name: 'export-detail', + hide: false, + type: 'primary', + // icon: 'ep:operation', + color: '', + float: 'left', + hasPermi: '' + } + ]" @buttonBaseClick="detailButtonBaseClick" @tableFormButton="tableFormButton" @@ -260,7 +271,7 @@ const buttonBaseClick = (val, item) => { } } - + const clicKRowId = ref() // 点击详情列表列按钮回调事件 const tableFormButton = async (val , row) => { if (val == 'close') { // 点击关闭 @@ -281,6 +292,7 @@ const buttonBaseClick = (val, item) => { value: row.number }] detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain') + clicKRowId.value = row.id; } @@ -369,8 +381,30 @@ const importSuccess = () => { if (val == 'export') { // 子表导出明细 handleExportDetail(detailTableObject) + } else if (val === 'export-detail') { + console.log('导出明细:', clicKRowId.value) + handleDetailExport(clicKRowId.value) + } + } + /** 导出明细按钮操作 */ +const exportLoadingDetail = ref(false) // 导出的加载中 +const handleDetailExport = async (masterId) => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出导出明细 + exportLoadingDetail.value = true + let params = { + masterId: masterId } + const excelTitle = ref(route.meta.title) + const data = await SuppliperMoldCostDetailApi.exportSupplierMoldCostDetail(params) + download.excel(data, `【${excelTitle.value}明细】【${formatDate(new Date())}】.xlsx`) + } catch { + } finally { + exportLoadingDetail.value = false } +} /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 // 子表导出明细