|
|
|
import request from '@/config/axios'
|
|
|
|
export interface PurchaseClaimRecordMainVO {
|
|
|
|
id: number
|
|
|
|
number: string
|
|
|
|
supplierCode: string
|
|
|
|
claimTime: Date
|
|
|
|
status: string
|
|
|
|
supplierinvoiceNumber: string
|
|
|
|
remark: string
|
|
|
|
available: string
|
|
|
|
siteId: string
|
|
|
|
concurrencyStamp: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询采购索赔主列表
|
|
|
|
export const getPurchaseClaimRecordMainPage = async (params) => {
|
|
|
|
if (params.isSearch) {
|
|
|
|
delete params.isSearch
|
|
|
|
const data = {...params}
|
|
|
|
return await request.post({ url: '/wms/purchaseClaim-record-main/senior', data })
|
|
|
|
} else {
|
|
|
|
return await request.get({ url: `/wms/purchaseClaim-record-main/page`, params })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询采购索赔主详情
|
|
|
|
export const getPurchaseClaimRecordMain = async (id: number) => {
|
|
|
|
return await request.get({ url: `/wms/purchaseClaim-record-main/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增采购索赔主
|
|
|
|
export const createPurchaseClaimRecordMain = async (data: PurchaseClaimRecordMainVO) => {
|
|
|
|
return await request.post({ url: `/wms/purchaseClaim-record-main/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改采购索赔主
|
|
|
|
export const updatePurchaseClaimRecordMain = async (data: PurchaseClaimRecordMainVO) => {
|
|
|
|
return await request.put({ url: `/wms/purchaseClaim-record-main/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除采购索赔主
|
|
|
|
export const deletePurchaseClaimRecordMain = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/purchaseClaim-record-main/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 提交审批采购索赔
|
|
|
|
export const subPurchaseClaimRecordMain = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/purchaseClaim-record-main/subPurchaseClaimRecordMain?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 审批通过采购索赔
|
|
|
|
export const agreePurchaseClaimRecordMain = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/purchaseClaim-record-main/agreePurchaseClaimRecordMain?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 审批驳回采购索赔
|
|
|
|
export const rejectPurchaseClaimRecordMain = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/purchaseClaim-record-main/rejectPurchaseClaimRecordMain?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出采购索赔主 Excel
|
|
|
|
export const exportPurchaseClaimRecordMain = async (params) => {
|
|
|
|
if (params.isSearch) {
|
|
|
|
const data = {...params}
|
|
|
|
return await request.downloadPost({ url: `/wms/purchaseClaim-record-main/export-excel-senior`, data })
|
|
|
|
}else{
|
|
|
|
return await request.download({ url: `/wms/purchaseClaim-record-main/export-excel`, params })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => {
|
|
|
|
return request.download({ url: '/wms/purchaseClaim-record-main/get-import-template' })
|
|
|
|
}
|