Browse Source

日期类型

master_hella_20240701
wangyufei 4 months ago
parent
commit
7cbc3e9aad
  1. 15
      src/api/wms/demandforecastingDetail/index.ts

15
src/api/wms/demandforecastingDetail/index.ts

@ -1,4 +1,6 @@
import request from '@/config/axios' import request from '@/config/axios'
import { isString } from '@/utils/is'
import dayjs from 'dayjs'
export interface DemandforecastingDetailVO { export interface DemandforecastingDetailVO {
predictTimeType: string predictTimeType: string
@ -19,10 +21,19 @@ export interface DemandforecastingDetailVO {
const getPageParams = (params)=>{ const getPageParams = (params)=>{
// 到货日期 // 到货日期
if(params.dueDate&&params.dueDate.length>0){ if(params.dueDate&&params.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&&params.dueDate.length>1){ if(params.dueDate&&params.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 = '' params.dueDate = ''

Loading…
Cancel
Save