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.

82 lines
2.3 KiB

import request from '@/config/axios'
export interface PurchaseMainVO {
supplierCode: string
number: string
type: string
status: string
orderDate: Date
dueDate: Date
version: string
taxRate: number
contactName: string
contactPhone: string
contactEmail: string
isConsignment: string
businessType: string
remark: string
createTime: Date
creator: string
updateTime: Date
updater: string
currentStage: number
available: string
}
// 查询采购订单主列表
export const getPurchaseMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchase-main/senior', data })
} else {
return await request.get({ url: `/wms/purchase-main/page`, params })
}
}
// 查询采购订单主详情
export const getPurchaseMain = async (id: number) => {
return await request.get({ url: `/wms/purchase-main/get?id=` + id })
}
// 新增采购订单主
export const createPurchaseMain = async (data: PurchaseMainVO) => {
return await request.post({ url: `/wms/purchase-main/create`, data })
}
// 修改采购订单主
export const updatePurchaseMain = async (data: PurchaseMainVO) => {
return await request.put({ url: `/wms/purchase-main/update`, data })
}
// 删除采购订单主
export const deletePurchaseMain = async (id: number) => {
return await request.delete({ url: `/wms/purchase-main/delete?id=` + id })
}
// 关闭采购订单主
export const closePurchaseMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-main/close?id=` + id })
}
// 打开采购订单主
export const openPurchaseMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-main/open?id=` + id })
}
// 发布采购订单主
export const publishPurchaseMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-main/publish?id=` + id })
}
// 下架采购订单主
export const witPurchaseMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-main/wit?id=` + id })
}
// 导出采购订单主 Excel
export const exportPurchaseMain = async (params) => {
return await request.download({ url: `/wms/purchase-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchase-main/get-import-template' })
}