diff --git a/src/api/wms/demandforecastingDetail/index.ts b/src/api/wms/demandforecastingDetail/index.ts index 7940f5cdc..059cc4ce2 100644 --- a/src/api/wms/demandforecastingDetail/index.ts +++ b/src/api/wms/demandforecastingDetail/index.ts @@ -1,4 +1,6 @@ import request from '@/config/axios' +import { isString } from '@/utils/is' +import dayjs from 'dayjs' export interface DemandforecastingDetailVO { predictTimeType: string @@ -19,10 +21,19 @@ export interface DemandforecastingDetailVO { const getPageParams = (params)=>{ // 到货日期 if(params.dueDate&¶ms.dueDate.length>0){ - params.startDate = params.dueDate[0] + if(isString(params.dueDate[0])){ + params.startDate = params.dueDate[0] + }else{ + params.startDate = params.dueDate[0].format('YYYY-MM-DD') + } + } if(params.dueDate&¶ms.dueDate.length>1){ - params.endDate = params.dueDate[1] + if(isString(params.dueDate[1])){ + params.endDate = params.dueDate[1] + }else{ + params.endDate = params.dueDate[1].format('YYYY-MM-DD') + } } params.dueDate = ''