From 7cbc3e9aadbd9ce156c8cea9e40e192abceabbe7 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 10 Jul 2024 19:37:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingDetail/index.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 = ''