|
|
@ -181,8 +181,8 @@ |
|
|
|
<!-- <SearchTable width="905px" ref="searchTableRef" sureText="打印所选" @searchTableSuccess="searchTableSuccess1">--> |
|
|
|
<SearchTable width="905px" ref="searchTableRef" sureText="打印所选" @searchTableSuccess="handlePrintSelectExport"> |
|
|
|
<template #actionsOther> |
|
|
|
<el-button type="primary" @click="printAllClick">打印全部</el-button> |
|
|
|
<!-- <el-button type="primary" :loading="printAllLoading" @click="handlePrintAllExport">打印全部</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="printAllClick">打印全部</el-button>--> |
|
|
|
<el-button type="primary" :loading="printAllLoading" @click="handlePrintAllExport">打印全部</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
</SearchTable> |
|
|
@ -1271,7 +1271,7 @@ const printAllClick = async () => { |
|
|
|
/** 导出明细按钮操作 */ |
|
|
|
const printAllLoading = ref(false) // 导出的加载中 |
|
|
|
|
|
|
|
const doHandlePrintAllExport = async (asnNumber) => { |
|
|
|
const doHandlePrintAllExport = async (asnNumber, lbType) => { |
|
|
|
try { |
|
|
|
// 发起导出导出明细 |
|
|
|
printAllLoading.value = true |
|
|
@ -1279,6 +1279,7 @@ const doHandlePrintAllExport = async (asnNumber) => { |
|
|
|
pageNo: 1, |
|
|
|
relateNumber: asnNumber, |
|
|
|
pageSize: 99999999, |
|
|
|
lbType |
|
|
|
} |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await PackageApi.jasperExportAll(params) |
|
|
@ -1302,12 +1303,16 @@ const handlePrintAllExport = async () => { |
|
|
|
if(res.xdpLabel){ |
|
|
|
//协定品标签 |
|
|
|
asnNumber = res.xdpLabel; |
|
|
|
doHandlePrintAllExport(asnNumber, "xdp"); |
|
|
|
} |
|
|
|
if (res.cgLabel) { |
|
|
|
//采购标签 |
|
|
|
asnNumber = res.cgLabel; |
|
|
|
doHandlePrintAllExport(asnNumber, "cg"); |
|
|
|
} |
|
|
|
doHandlePrintAllExport(asnNumber); |
|
|
|
// 测试下载多个文件 |
|
|
|
// doHandlePrintAllExport(asnNumber, "xdp"); |
|
|
|
// doHandlePrintAllExport(asnNumber, "cg"); |
|
|
|
}).catch(err => { |
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
|
}) |
|
|
@ -1361,13 +1366,14 @@ const handlePrintSelectExport = async (formField, searchField, val, formRef, typ |
|
|
|
if(res.xdpLabel){ |
|
|
|
//协定品标签 |
|
|
|
asnNumber = res.xdpLabel; |
|
|
|
doHandlePrintAllExport(asnNumber, "xdp"); |
|
|
|
} |
|
|
|
if (res.cgLabel) { |
|
|
|
//采购标签 |
|
|
|
asnNumber = res.cgLabel; |
|
|
|
doHandlePrintAllExport(asnNumber, "cg"); |
|
|
|
} |
|
|
|
debugger; |
|
|
|
doHandlePrintAllExport(asnNumber); |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
|
}) |
|
|
|