Browse Source

YT-2394:供应商模具费用主导出主子明细数据,按照页面字段显示导出;供应商模具费用明细添加导出功能,按照明细页面字段显示导出

intex_online20250509
songguoqiang 1 month ago
parent
commit
f7c0a76d41
  1. 38
      src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue

38
src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue

@ -64,7 +64,18 @@
:detailButtonIsShowEdit="false" :detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false" :detailButtonIsShowDelete="false"
:buttondataTable="buttondataTable" :buttondataTable="buttondataTable"
:otherHeadButttonData = "[]" :otherHeadButttonData = "[
{
label: t('ts.导出明细'),
name: 'export-detail',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float: 'left',
hasPermi: ''
}
]"
@buttonBaseClick="detailButtonBaseClick" @buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
@ -260,7 +271,7 @@ const buttonBaseClick = (val, item) => {
} }
} }
const clicKRowId = ref()
// //
const tableFormButton = async (val , row) => { const tableFormButton = async (val , row) => {
if (val == 'close') { // if (val == 'close') { //
@ -281,6 +292,7 @@ const buttonBaseClick = (val, item) => {
value: row.number value: row.number
}] }]
detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain')
clicKRowId.value = row.id;
} }
@ -369,8 +381,30 @@ const importSuccess = () => {
if (val == 'export') { if (val == 'export') {
// //
handleExportDetail(detailTableObject) 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) // const exportLoading = ref(false) //
// //

Loading…
Cancel
Save