优化sql
This commit is contained in:
parent
832a26b398
commit
a70d6d9a03
@ -673,16 +673,36 @@ const handleSelectedProjectOrder = (arr: ProjectOrderVO[]) => {
|
|||||||
};
|
};
|
||||||
const parentMethod = async () => {
|
const parentMethod = async () => {
|
||||||
// 检查是否超过要求设计日期
|
// 检查是否超过要求设计日期
|
||||||
const isOverdue = dataList.value.projectOrderSubs.some(sub => {
|
|
||||||
|
let overdueTime = null; // 初始化变量
|
||||||
|
let projectName = null; // 初始化变量
|
||||||
|
const isOverdue = dataList.value.projectOrderSubs.some(sub => {
|
||||||
|
if (sub.changeEndTime) {
|
||||||
|
const isOverdueSub = sub.blankDate > sub.changeEndTime ||
|
||||||
|
sub.twoDimDate > sub.changeEndTime ||
|
||||||
|
sub.threeDimDate > sub.changeEndTime;
|
||||||
|
|
||||||
|
// 如果当前 sub 是超期的,将 sub.changeEndTime 赋值给 overdueTime
|
||||||
|
if (isOverdueSub) {
|
||||||
|
overdueTime = sub.changeEndTime;
|
||||||
|
projectName = sub.projectSubName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isOverdueSub;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
/* const isOverdue = dataList.value.projectOrderSubs.some(sub => {
|
||||||
if (sub.changeEndTime) {
|
if (sub.changeEndTime) {
|
||||||
return sub.blankDate > sub.changeEndTime ||
|
return sub.blankDate > sub.changeEndTime ||
|
||||||
sub.twoDimDate > sub.changeEndTime ||
|
sub.twoDimDate > sub.changeEndTime ||
|
||||||
sub.threeDimDate > sub.changeEndTime;
|
sub.threeDimDate > sub.changeEndTime;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
}); */
|
||||||
if (isOverdue) {
|
if (isOverdue) {
|
||||||
message.error("本次插活已经超过要求设计结束日期,无法插活");
|
message.error(projectName+",超过要求设计结束日期-"+formatDate(overdueTime,'YYYY-MM-DD')+",不允许插活");
|
||||||
return; // 如果超过日期,直接返回,不执行后续代码
|
return; // 如果超过日期,直接返回,不执行后续代码
|
||||||
}
|
}
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user