From 685aecb9903279148e4e1d0568208fa5fa8d1c23 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Tue, 7 Jan 2025 18:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reportforms/OrderAllTime.vue | 38 +++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/views/reportforms/OrderAllTime.vue b/src/views/reportforms/OrderAllTime.vue index 1b9c5e20..2709458e 100644 --- a/src/views/reportforms/OrderAllTime.vue +++ b/src/views/reportforms/OrderAllTime.vue @@ -4,7 +4,7 @@
- + - + + + + + { const end = new Date(submitData.endTimeStr).getTime(); if (end - start + 1000 * 60 * 60 * 24 > 1000 * 60 * 60 * 24 * 31) - return ElMessage.warning('时间不能大于31天'); + return ElMessage.warning('工厂推送时间不能大于31天'); + } + + // 开单时间 + // if ()openTime + if (getObjType(submitData.openTime) === 'array' && submitData.openTime.length > 0) { + submitData.openTimeStartStr = submitData.openTime[0]; + submitData.openTimeEndStr = submitData.openTime[1]; + + const start = new Date(submitData.openTimeStartStr).getTime(); + const end = new Date(submitData.openTimeEndStr).getTime(); + + if (end - start + 1000 * 60 * 60 * 24 > 1000 * 60 * 60 * 24 * 31) + return ElMessage.warning('开单时间不能大于31天'); } if (getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) { details.data = []; - return ElMessage.warning('请选择时间'); + return ElMessage.warning('请选择工厂推送时间'); } delete submitData.timeArr; + delete submitData.openTime; delete submitData.total; + if (submitData.waybillNo) { + submitData.waybillCode = submitData.waybillNo; + delete submitData.waybillNo; + } + const res = await postOrderAllTimePage(submitData); const { code, data } = res.data; if (code !== 200) return;