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;