优化sql

This commit is contained in:
think 2025-02-28 15:09:12 +08:00
parent 832a26b398
commit a70d6d9a03

View File

@ -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;