Browse Source

YT-2592:SCP《待开票数据查询-财务》增加【导出对账单】按钮

intex_online20250509
songguoqiang 4 weeks ago
parent
commit
666e5b8508
  1. 5
      src/api/wms/supplierinvoiceInvoiced/index.ts
  2. 1
      src/locales/en-US.ts
  3. 3
      src/locales/zh-CN.ts
  4. 13
      src/utils/disposition/defaultButtons.ts
  5. 27
      src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue

5
src/api/wms/supplierinvoiceInvoiced/index.ts

@ -58,6 +58,11 @@ export const deleteSupplierinvoiceInvoiced = async (id: number) => {
export const exportSupplierinvoiceInvoiced = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel`, params })
}
// 导出对账单财务 Excel
export const exportExcelSheetStatement = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel—sheet-statement`, params })
}
// 导出待开票 Excel
export const exportSupplierinvoiceInvoicedWork = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel-work`, params })

1
src/locales/en-US.ts

@ -1333,5 +1333,6 @@ export default {
:'More',
:'Batch retry',
:'All retry',
:'Export the statement of account',
},
}

3
src/locales/zh-CN.ts

@ -1331,7 +1331,8 @@ export default {
:'新增班次',
:'更多',
:'批量重试',
:'全部重试'
:'全部重试',
:'导出对账单',
},
}

13
src/utils/disposition/defaultButtons.ts

@ -1558,6 +1558,19 @@ export function mainLisSelectiontTrialResultBtn(option: any) {
hasPermi: ''
})
}
//待开票导出对账单按钮
export function invoicedExportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出对账单`).replace('ts.', ''),
name: 'exportStatement',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option: any, specific: any) {
return {

27
src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue

@ -121,6 +121,7 @@ if(routeName.value == 'SupplierinvoiceInvoiced'){
HeadButttondata.value = [
defaultButtons.defaultExportBtn(null), //
defaultButtons.mainListSelectionOrderPassBtn({hasPermi:'wms:supplierinvoice-invoiced:batchPass'}), //
defaultButtons.invoicedExportBtn({hasPermi:'wms:supplierinvoice-invoiced:exportStatement'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -146,6 +147,8 @@ const buttonBaseClick = (val, item) => {
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'exportStatement') { //
handleExportStatement()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
@ -310,6 +313,30 @@ const handleExport = async () => {
loadDone()
}
}
//
const handleExportStatement = async () => {
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
if (routeName.value == 'SupplierinvoiceInvoiced') {
// -
const data = await SupplierinvoiceInvoicedApi.exportExcelSheetStatement(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
// else if (routeName.value == 'SupplierinvoiceInvoicedWork') {
// // -
// const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoicedWork(tableObject.params)
// download.excel(data, `${excelTitle.value}${formatDate(new Date())}.xlsx`)
// }
} catch {
} finally {
loadDone()
}
}
/** 导入 */
const importFormRef = ref()

Loading…
Cancel
Save