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.

97 lines
3.1 KiB

import request from '@/config/axios'
export interface PurchasePlanMainVO {
supplierCode: string
timeWindow: string
warehouseCode: string
dockCode: string
number: string
businessType: string
remark: string
createTime: Date
creator: string
beginTime: Date
endTime: Date
status: string
updateTime: Date
updater: string
available: string
}
// 查询要货计划主列表
export const getPurchasePlanMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchase-plan-main/senior', data })
} else {
return await request.get({ url: `/wms/purchase-plan-main/page`, params })
}
}
// 查询要货计划主详情
export const getPurchasePlanMain = async (id: number) => {
return await request.get({ url: `/wms/purchase-plan-main/get?id=` + id })
}
// 新增要货计划主
export const createPurchasePlanMain = async (data: PurchasePlanMainVO) => {
return await request.post({ url: `/wms/purchase-plan-main/create`, data })
}
// 修改要货计划主
export const updatePurchasePlanMain = async (data: PurchasePlanMainVO) => {
return await request.put({ url: `/wms/purchase-plan-main/update`, data })
}
// 删除要货计划主
export const deletePurchasePlanMain = async (id: number) => {
return await request.delete({ url: `/wms/purchase-plan-main/delete?id=` + id })
}
// 关闭要货计划主
export const closePurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/close?id=` + id })
}
// 打开要货计划主
export const openPurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/open?id=` + id })
}
// 发布要货计划主
export const publishPurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/publish?id=` + id })
}
// 下架要货计划主
export const witPurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/wit?id=` + id })
}
// 接受要货计划主
export const accPurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/acc?id=` + id })
}
// 驳回要货计划主
export const rejPurchasePlanMain = async (id: number) => {
return await request.post({ url: `/wms/purchase-plan-main/rej?id=` + id })
}
// 导出要货计划主 Excel
export const exportPurchasePlanMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchase-plan-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchase-plan-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchase-plan-main/get-import-template' })
}
// 查询要货计划策略根据供应商
export const queryPurchasePlan = async (supplierCode: string) => {
return await request.get({ url: `/wms/purchase-plan-main/queryPurchasePlan?supplierCode=` + supplierCode })
}