|
|
|
@ -323,10 +323,8 @@ const onLoad = async (params = {}) => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
getObjType(submitData.timeArr) !== 'array' || |
|
|
|
|
submitData.timeArr.length === 0 || |
|
|
|
|
getObjType(submitData.openTime) !== 'array' || |
|
|
|
|
submitData.openTime.length === 0 |
|
|
|
|
(getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) && |
|
|
|
|
(getObjType(submitData.openTime) !== 'array' || submitData.openTime.length === 0) |
|
|
|
|
) { |
|
|
|
|
details.data = []; |
|
|
|
|
return ElMessage.warning('请选择时间'); |
|
|
|
@ -511,7 +509,28 @@ const ExportData = async () => {
|
|
|
|
|
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) && |
|
|
|
|
(getObjType(submitData.openTime) !== 'array' || submitData.openTime.length === 0) |
|
|
|
|
) { |
|
|
|
|
details.data = []; |
|
|
|
|
return ElMessage.warning('请选择时间'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
delete submitData.timeArr; |
|
|
|
|