From ebf1c962ea98c7d7a2d56886ef8ae011f40958cb Mon Sep 17 00:00:00 2001 From: hanbo <2608504783@qq.com> Date: Fri, 3 Dec 2021 18:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=E5=BA=94?= =?UTF-8?q?=E6=97=A9=E4=B8=8E=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/admin/project_estimate_add.ftl | 10 ++++++++++ .../templates/admin/project_estimate_edit.ftl | 10 ++++++++++ 2 files changed, 20 insertions(+) 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(); });