@ -44,8 +44,13 @@ export const deletePurchaseprice = async (id: number) => {
// 导出采购价格单 Excel
export const exportPurchaseprice = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchaseprice/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
@ -58,8 +58,13 @@ export const deleteSupplier = async (id: number) => {
// 导出供应商 Excel
export const exportSupplier = async (params) => {
return await request.downloadPost({ url: `/wms/supplier/export-excel-senior`, data })
return await request.download({ url: `/wms/supplier/export-excel`, params })
@ -53,8 +53,13 @@ export const deleteSupplieritem = async (id: number) => {
// 导出供应商物品 Excel
export const exportSupplieritem = async (params) => {
return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior`, data })
return await request.download({ url: `/wms/supplieritem/export-excel`, params })
@ -205,7 +205,7 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
const data = await PurchasepriceApi.exportPurchaseprice(setSearchParams)
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, '采购价格单.xls')
} catch {
} finally {
@ -192,7 +192,7 @@ const handleExport = async () => {
const data = await SupplierApi.exportSupplier(setSearchParams)
const data = await SupplierApi.exportSupplier(tableObject.params)
download.excel(data, '供应商.xls')
const data = await SupplieritemApi.exportSupplieritem(setSearchParams)
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, '供应商物品.xls')