import request from '@/config/axios' export interface DemandforecastingMainVO { supplierCode: string version: string publishTime: Date number: string businessType: string remark: string createTime: Date creator: string beginTime: Date endTime: Date status: string updateTime: Date updater: string available: string } // 查询要货预测主列表 export const getDemandforecastingMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/wms/demandforecasting-main/senior', data }) } else { return await request.get({ url: `/wms/demandforecasting-main/page`, params }) } } // 查询要货预测主详情 export const getDemandforecastingMain = async (id: number) => { return await request.get({ url: `/wms/demandforecasting-main/get?id=` + id }) } // 新增要货预测主 export const createDemandforecastingMain = async (data: DemandforecastingMainVO) => { return await request.post({ url: `/wms/demandforecasting-main/create`, data }) } // 修改要货预测主 export const updateDemandforecastingMain = async (data: DemandforecastingMainVO) => { return await request.put({ url: `/wms/demandforecasting-main/update`, data }) } // 删除要货预测主 export const deleteDemandforecastingMain = async (id: number) => { return await request.delete({ url: `/wms/demandforecasting-main/delete?id=` + id }) } // 关闭要货预测 export const closePurchaseMain = async (id: number) => { return await request.post({ url: `/wms/demandforecasting-main/close?id=` + id }) } // 打开要货预测 export const openPurchaseMain = async (id: number) => { return await request.post({ url: `/wms/demandforecasting-main/open?id=` + id }) } // 发布要货预测 export const publishPurchaseMain = async (id: number) => { return await request.post({ url: `/wms/demandforecasting-main/publish?id=` + id }) } // 下架要货预测 export const witPurchaseMain = async (id: number) => { return await request.post({ url: `/wms/demandforecasting-main/wit?id=` + id }) } // 导出要货预测主 Excel export const exportDemandforecastingMain = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/demandforecasting-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/demandforecasting-main/export-excel`, params }) } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/demandforecasting-main/get-import-template' }) } // 计划员 export const queryUserPlanerList = async () => { return await request.post({ url: `/wms/demandforecasting-main/queryUserPlanerList`,data:{} }) }