Browse Source

备件收货导出

master_hella_20240701
zhaoyiran 5 months ago
parent
commit
97c724c4f1
  1. 10
      src/api/wms/purchasereceiptJobMain/index.ts
  2. 12
      src/api/wms/purchasereceiptRecordMain/index.ts
  3. 7
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue
  4. 7
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue

10
src/api/wms/purchasereceiptJobMain/index.ts

@ -100,6 +100,16 @@ export const exportPurchasereceiptJobMain = async (params) => {
}
}
// 导出备件收货任务
export const exportSparereceiptJobMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-job-main/export-excel-spare-senior`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel-spare`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-job-main/get-import-template' })

12
src/api/wms/purchasereceiptRecordMain/index.ts

@ -89,6 +89,16 @@ export const exportPurchasereceiptRecordMain = async (params) => {
}
}
// 导出备件收货记录
export const exportSparereceiptRecordMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-spare-senior`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-spare`, params })
}
}
// 导出采购收货记录主 Excel
export const exportPurchasereceiptRecordMainSCP = async (params) => {
if (params.isSearch) {
@ -112,4 +122,4 @@ export const createPutawayRequest = async (number:string) => {
// 创建检验申请
export const createInspectRequest = async (number:string) => {
return await request.post({ url: `/wms/purchasereceipt-record-main/createInspectRequest?number=`+number })
}
}

7
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue

@ -73,6 +73,7 @@ import * as PurchasereceiptJobMainApi from '@/api/wms/purchasereceiptJobMain'
import * as PurchasereceiptJobDetailApi from '@/api/wms/purchasereceiptJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {exportSparereceiptJobMain} from "@/api/wms/purchasereceiptJobMain";
//
defineOptions({ name: 'PurchasereceiptJobMain' })
@ -257,8 +258,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(tableObject.params)
download.excel(data, '采购收货任务主.xlsx')
const data = await PurchasereceiptJobMainApi.exportSparereceiptJobMain(tableObject.params)
download.excel(data, '备件收货任务.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -278,4 +279,4 @@ const searchFormClick = (searchData) => {
onMounted(async () => {
getList()
})
</script>
</script>

7
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue

@ -71,6 +71,7 @@ import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecord
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {exportSparereceiptRecordMain} from "@/api/wms/purchasereceiptRecordMain";
//
defineOptions({ name: 'PurchasereceiptRecordMain' })
@ -158,8 +159,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params)
download.excel(data, '采购收货记录主.xlsx')
const data = await PurchasereceiptRecordMainApi.exportSparereceiptRecordMain(tableObject.params)
download.excel(data, '备件收货记录.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -190,4 +191,4 @@ const changeTabs = (data) =>{
onMounted(async () => {
getList()
})
</script>
</script>

Loading…
Cancel
Save