You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
5.6 KiB
164 lines
5.6 KiB
import request from '@/config/axios'
|
|
|
|
export interface PurchasereceiptRecordMainVO {
|
|
requestNumber: string
|
|
jobNumber: string
|
|
asnNumber: string
|
|
ppNumber: string
|
|
supplierCode: string
|
|
toDockCode: string
|
|
carrierCode: string
|
|
transferMode: string
|
|
vehiclePlateNumber: string
|
|
fromWarehouseCode: string
|
|
toWarehouseCode: string
|
|
outTransaction: string
|
|
inTransaction: string
|
|
executeTime: Date
|
|
activeDate: Date
|
|
requestTime: Date
|
|
dueTime: Date
|
|
departmentCode: string
|
|
interfaceType: string
|
|
number: string
|
|
businessType: string
|
|
remark: string
|
|
createTime: Date
|
|
creator: string
|
|
code: string
|
|
fromAreaTypes: string
|
|
toAreaTypes: string
|
|
fromAreaCodes: string
|
|
toAreaCodes: string
|
|
available: string
|
|
putawayRequestFlag: boolean
|
|
putawayRequestNumber: string
|
|
inspectRequestFlag: boolean
|
|
inspectRequestNumber: string
|
|
}
|
|
|
|
// 查询采购收货记录主列表
|
|
export const getPurchasereceiptRecordMainPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/purchasereceipt-record-main/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/purchasereceipt-record-main/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询备件收货记录主列表
|
|
export const getPurchasereceiptRecordMainPageSpare = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/purchasereceipt-record-main/seniorSpare', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/purchasereceipt-record-main/pageSpare`, params })
|
|
}
|
|
}
|
|
|
|
// 查询采购收货记录主详情
|
|
export const getPurchasereceiptRecordMain = async (id: number) => {
|
|
return await request.get({ url: `/wms/purchasereceipt-record-main/get?id=` + id })
|
|
}
|
|
|
|
// 新增采购收货记录主
|
|
export const createPurchasereceiptRecordMain = async (data: PurchasereceiptRecordMainVO) => {
|
|
return await request.post({ url: `/wms/purchasereceipt-record-main/create`, data })
|
|
}
|
|
|
|
// 修改采购收货记录主
|
|
export const updatePurchasereceiptRecordMain = async (data: PurchasereceiptRecordMainVO) => {
|
|
return await request.put({ url: `/wms/purchasereceipt-record-main/update`, data })
|
|
}
|
|
|
|
// 删除采购收货记录主
|
|
export const deletePurchasereceiptRecordMain = async (id: number) => {
|
|
return await request.delete({ url: `/wms/purchasereceipt-record-main/delete?id=` + id })
|
|
}
|
|
|
|
// 导出采购收货记录主 Excel
|
|
export const exportPurchasereceiptRecordMain = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior`, data })
|
|
} else {
|
|
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params })
|
|
}
|
|
}
|
|
// 导出协定品收货记录主 Excel
|
|
export const exportToolPurchasereceiptRecordMain = async (params) => {
|
|
if (params.isSearch) {
|
|
params.source_type = "TOOL"
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior`, data })
|
|
} else {
|
|
params.sourceType = "TOOL"
|
|
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 导出号试品收货记录主 Excel
|
|
export const exportDevelopPurchasereceiptRecordMain = async (params) => {
|
|
if (params.isSearch) {
|
|
params.source_type = "Develop"
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior`, data })
|
|
} else {
|
|
params.sourceType = "Develop"
|
|
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 导出采购收货记录主 Excel
|
|
export const exportPurchasereceiptRecordRefuseMain = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior-refuse`, data })
|
|
} else {
|
|
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-refuse`, 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) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior-SCP`, data })
|
|
} else {
|
|
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-SCP`, params })
|
|
}
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/purchasereceipt-record-main/get-import-template' })
|
|
}
|
|
|
|
// 创建上架申请
|
|
export const createPutawayRequest = async (number:string) => {
|
|
return await request.post({ url: `/wms/purchasereceipt-record-main/createPutawayRequest?number=`+number })
|
|
}
|
|
|
|
// 创建检验申请
|
|
export const createInspectRequest = async (number:string) => {
|
|
return await request.post({ url: `/wms/purchasereceipt-record-main/createInspectRequest?number=`+number })
|
|
}
|
|
|
|
// 创建采购退货记录申请
|
|
export const createPurchasereturnRecord = async (number:string) => {
|
|
return await request.post({ url: `/wms/purchasereceipt-record-main/createPurchasereturnRecord?number=`+number })
|
|
}
|