开始时间应早与结束时间提示

master
hanbo 2021-12-03 18:00:47 +08:00
parent e79cc981a5
commit ebf1c962ea
2 changed files with 20 additions and 0 deletions

View File

@ -334,10 +334,20 @@
$(function () { $(function () {
calIncomeAndCost(); calIncomeAndCost();
$("#saveDraft").click(function () { $("#saveDraft").click(function () {
var startTime = $("#startDate").val();
var endTime = $("#endDate").val();
if (startTime > endTime) {
window.confirm('开始日期应早于结束日期');
}
$("#pmsForm").attr("action","${base}/project/estimateAddSave"); $("#pmsForm").attr("action","${base}/project/estimateAddSave");
$("#pmsForm").submit(); $("#pmsForm").submit();
}); });
$("#saveApprove").click(function () { $("#saveApprove").click(function () {
var startTime = $("#startDate").val();
var endTime = $("#endDate").val();
if (startTime > endTime) {
window.confirm('开始日期应早于结束日期');
}
$("#pmsForm").attr("action","${base}/project/estimateAddSaveAndApprove"); $("#pmsForm").attr("action","${base}/project/estimateAddSaveAndApprove");
$("#pmsForm").submit(); $("#pmsForm").submit();
}); });

View File

@ -341,10 +341,20 @@
$(function () { $(function () {
calIncomeAndCost(); calIncomeAndCost();
$("#saveDraft").click(function () { $("#saveDraft").click(function () {
var startTime = $("#startDate").val();
var endTime = $("#endDate").val();
if (startTime > endTime) {
window.confirm('开始日期应早于结束日期');
}
$("#pmsForm").attr("action","${base}/project/estimateEditSave"); $("#pmsForm").attr("action","${base}/project/estimateEditSave");
$("#pmsForm").submit(); $("#pmsForm").submit();
}); });
$("#saveApprove").click(function () { $("#saveApprove").click(function () {
var startTime = $("#startDate").val();
var endTime = $("#endDate").val();
if (startTime > endTime) {
window.confirm('开始日期应早于结束日期');
}
$("#pmsForm").attr("action","${base}/project/estimateEditSaveAndApprove"); $("#pmsForm").attr("action","${base}/project/estimateEditSaveAndApprove");
$("#pmsForm").submit(); $("#pmsForm").submit();
}); });