|
@ -15,6 +15,48 @@ export interface DemandforecastingDetailVO { |
|
|
available: string |
|
|
available: string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 要货预测-列表和头部请求参数
|
|
|
|
|
|
const getPageParams = (params)=>{ |
|
|
|
|
|
// 到货日期
|
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>0){ |
|
|
|
|
|
params.startDate = params.dueDate[0] |
|
|
|
|
|
} |
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>1){ |
|
|
|
|
|
params.endDate = params.dueDate[1] |
|
|
|
|
|
} |
|
|
|
|
|
params.dueDate = '' |
|
|
|
|
|
|
|
|
|
|
|
//计划员
|
|
|
|
|
|
if(params.planerId&¶ms.planerId.length>0){ |
|
|
|
|
|
params.planers = params.planerId.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.planerId = '' |
|
|
|
|
|
// 供应商代码
|
|
|
|
|
|
if(params.supplierCode&¶ms.supplierCode.length>0){ |
|
|
|
|
|
let keyValue = params.supplierCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.supplierCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.supplierCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 物料代码
|
|
|
|
|
|
if(params.itemCode&¶ms.itemCode.length>0){ |
|
|
|
|
|
let keyValue = params.itemCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.itemCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.itemCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 版本号
|
|
|
|
|
|
if(params.version&¶ms.version.length>0){ |
|
|
|
|
|
let keyValue = params.version.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.detailVersion = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.version = '' |
|
|
|
|
|
return params |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 查询要货预测子列表
|
|
|
// 查询要货预测子列表
|
|
|
export const getDemandforecastingDetailPage = async (params) => { |
|
|
export const getDemandforecastingDetailPage = async (params) => { |
|
|
if (params.isSearch) { |
|
|
if (params.isSearch) { |
|
@ -22,45 +64,8 @@ export const getDemandforecastingDetailPage = async (params) => { |
|
|
const data = {...params} |
|
|
const data = {...params} |
|
|
return await request.post({ url: '/wms/demandforecasting-detail/senior', data }) |
|
|
return await request.post({ url: '/wms/demandforecasting-detail/senior', data }) |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
params = getPageParams(params) |
|
|
console.log('params',params) |
|
|
console.log('params',params) |
|
|
// 到货日期
|
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>0){ |
|
|
|
|
|
params.startDate = params.dueDate[0] |
|
|
|
|
|
} |
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>1){ |
|
|
|
|
|
params.endDate = params.dueDate[1] |
|
|
|
|
|
} |
|
|
|
|
|
params.dueDate = '' |
|
|
|
|
|
|
|
|
|
|
|
//计划员
|
|
|
|
|
|
if(params.planerId&¶ms.planerId.length>0){ |
|
|
|
|
|
params.planers = params.planerId.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.planerId = '' |
|
|
|
|
|
// 供应商代码
|
|
|
|
|
|
if(params.supplierCode&¶ms.supplierCode.length>0){ |
|
|
|
|
|
let keyValue = params.supplierCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.supplierCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.supplierCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 物料代码
|
|
|
|
|
|
if(params.itemCode&¶ms.itemCode.length>0){ |
|
|
|
|
|
let keyValue = params.itemCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.itemCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.itemCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 版本号
|
|
|
|
|
|
if(params.version&¶ms.version.length>0){ |
|
|
|
|
|
let keyValue = params.version.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.detailVersion = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.version = '' |
|
|
|
|
|
|
|
|
|
|
|
return await request.get({ url: `/wms/demandforecasting-detail/page`, params }) |
|
|
return await request.get({ url: `/wms/demandforecasting-detail/page`, params }) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -92,45 +97,8 @@ export const exportDemandforecastingDetail = async (params) => { |
|
|
|
|
|
|
|
|
// 查询要货预测主列表
|
|
|
// 查询要货预测主列表
|
|
|
export const getPageTableHead = async (params) => { |
|
|
export const getPageTableHead = async (params) => { |
|
|
|
|
|
params = getPageParams(params) |
|
|
console.log('params',params) |
|
|
console.log('params',params) |
|
|
// 到货日期
|
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>0){ |
|
|
|
|
|
params.startDate = params.dueDate[0] |
|
|
|
|
|
} |
|
|
|
|
|
if(params.dueDate&¶ms.dueDate.length>1){ |
|
|
|
|
|
params.endDate = params.dueDate[1] |
|
|
|
|
|
} |
|
|
|
|
|
params.dueDate = '' |
|
|
|
|
|
|
|
|
|
|
|
//计划员
|
|
|
|
|
|
if(params.planerId&¶ms.planerId.length>0){ |
|
|
|
|
|
params.planers = params.planerId.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.planerId = '' |
|
|
|
|
|
// 供应商代码
|
|
|
|
|
|
if(params.supplierCode&¶ms.supplierCode.length>0){ |
|
|
|
|
|
let keyValue = params.supplierCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.supplierCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.supplierCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 物料代码
|
|
|
|
|
|
if(params.itemCode&¶ms.itemCode.length>0){ |
|
|
|
|
|
let keyValue = params.itemCode.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.itemCodes = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.itemCode = '' |
|
|
|
|
|
|
|
|
|
|
|
// 版本号
|
|
|
|
|
|
if(params.version&¶ms.version.length>0){ |
|
|
|
|
|
let keyValue = params.version.split(' ') |
|
|
|
|
|
keyValue.forEach(item=>{item = item.trim()}) |
|
|
|
|
|
params.detailVersion = keyValue.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
params.version = '' |
|
|
|
|
|
|
|
|
|
|
|
return await request.get({ url: `/wms/demandforecasting-detail/queryPageTableHead`, params }) |
|
|
return await request.get({ url: `/wms/demandforecasting-detail/queryPageTableHead`, params }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|