diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl index 3cfbd2f..15157b9 100644 --- a/src/main/resources/templates/admin/project_estimate_add.ftl +++ b/src/main/resources/templates/admin/project_estimate_add.ftl @@ -334,10 +334,20 @@ $(function () { calIncomeAndCost(); $("#saveDraft").click(function () { + var startTime = $("#startDate").val(); + var endTime = $("#endDate").val(); + if (startTime > endTime) { + window.confirm('开始日期应早于结束日期'); + } $("#pmsForm").attr("action","${base}/project/estimateAddSave"); $("#pmsForm").submit(); }); $("#saveApprove").click(function () { + var startTime = $("#startDate").val(); + var endTime = $("#endDate").val(); + if (startTime > endTime) { + window.confirm('开始日期应早于结束日期'); + } $("#pmsForm").attr("action","${base}/project/estimateAddSaveAndApprove"); $("#pmsForm").submit(); }); diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl index 3322d8e..0ca82fa 100644 --- a/src/main/resources/templates/admin/project_estimate_edit.ftl +++ b/src/main/resources/templates/admin/project_estimate_edit.ftl @@ -341,10 +341,20 @@ $(function () { calIncomeAndCost(); $("#saveDraft").click(function () { + var startTime = $("#startDate").val(); + var endTime = $("#endDate").val(); + if (startTime > endTime) { + window.confirm('开始日期应早于结束日期'); + } $("#pmsForm").attr("action","${base}/project/estimateEditSave"); $("#pmsForm").submit(); }); $("#saveApprove").click(function () { + var startTime = $("#startDate").val(); + var endTime = $("#endDate").val(); + if (startTime > endTime) { + window.confirm('开始日期应早于结束日期'); + } $("#pmsForm").attr("action","${base}/project/estimateEditSaveAndApprove"); $("#pmsForm").submit(); });