Przeglądaj źródła

送审当天日期>=工作开始日期 && 送审当天日期<= 工作结束日期
修改

user5 2 lat temu
rodzic
commit
4d678670f0

+ 10 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -4329,7 +4329,16 @@ public class WorkProjectNotifyController extends BaseController {
 							User bzshbUser=userService.get(projectReportData.getBzshbUserId());
 							bzshbConsultant.setZixunyuanName(bzshbUser.getName());
 							bzshbConsultant.setZixunyuan(bzshbUser.getId());
-							consultants.add(bzshbConsultant);
+							if(null != consultants){
+								List<String> bzshbIdList= Lists.newArrayList();
+								for (RuralReportConsultant consultant: consultants) {
+									bzshbIdList.add(consultant.getZixunyuan());
+								}
+								String bzshbId = String.join(",", bzshbIdList);
+								if(!bzshbId.contains(bzshbConsultant.getZixunyuan())){
+									consultants.add(bzshbConsultant);
+								}
+							}
 						}
 						Iterator<RuralReportConsultant> itView = consultants.iterator();
 						while(itView.hasNext()){

+ 118 - 158
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -38,6 +38,23 @@
 				var boolFlag = true;
 				if(boolFlag){
 					if(obj == 1){
+						var info = false;
+						if(dataList == undefined){
+							dataList = ${fns:toJson(workReviewAudits)}
+						}
+						if (null != dataList){
+							for (var i=0; i<dataList.length; i++){
+								console.log($("#audit"+dataList[i].id).val())
+								if($("#audit"+dataList[i].id).val() == 0){
+									info = true;
+								}
+							}
+							if (info){
+								parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+								return false;
+							}
+						}
+
 						var leng = $("#file_attachment tr").length;
 						var leng1 = $("#reportedConsultantList tr").length;
 						var startDate = new Date($("#startDate").val());
@@ -53,182 +70,125 @@
 							parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
 							return false;
 						}
-						var newDate =  new Date()
-						if(startDate.getTime() > newDate.getTime()){
-							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(endingDate.getTime() < newDate.getTime()){
-							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-							return false;
-						}
 
-
-
-
-						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-							if(startDate.getTime() > projectStartDate.getTime()){
-								parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
-								return false;
-							}
-						}
-						if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-							if(endingDate.getTime() < projectEndDate.getTime()){
-								parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-								return false;
-							}
-						}
-						var ziXunShouRu = $("#ziXunShouRu").val();
-						if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
-							top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
-							return false;
-						}
-						for(var i=0; i<leng; i++) {
-							var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-							if(second == 1){
-								if(numberStr != undefined && numberStr !=null && numberStr !=''){
-									if (fileFlag==1){
-
-									}else{
-										top.layer.msg("请上传成果文件!", {icon: 0});
-										return false;
-									}
-									<%--$.ajax({--%>
-									<%--	type: 'post',--%>
-									<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-									<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-									<%--	dataType: "json",--%>
-									<%--	async: false--%>
-									<%--}).success(function (result) {--%>
-									<%--	if(result == 0){--%>
-									<%--		boolFlag = false;--%>
-									<%--		top.layer.msg("请上传成果文件!", {icon: 0});--%>
-									<%--		return false;--%>
-									<%--	}--%>
-									<%--}).error(function () {--%>
-									<%--	top.layer.msg("文件载入失败!");--%>
-									<%--});--%>
+						var newDate =  new Date()
+						if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
+
+							top.layer.open({
+								content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+								,btn: ['是', '否']
+								,yes: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									return false;
 								}
-							}
-						}
-						var projectGrade = '${projectGrade}';
-						if (leng1<=1 ){
-							top.layer.msg("请添加咨询员信息!", {icon: 0});
-							return false;
-						}else if(projectGrade == 1 && leng1<=2){
-							top.layer.msg("请添加咨询员信息!", {icon: 0});
-							return false;
-						}
-						if(boolFlag){
-							var gistdata = $("#file_gistdata tr").length;
-							for(var i=0; i<gistdata; i++) {
-								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传依据性文件!", {icon: 0});
+								,btn2: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+										if(startDate.getTime() > projectStartDate.getTime()){
+											parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
 											return false;
 										}
-										<%--$.ajax({--%>
-										<%--	type: 'post',--%>
-										<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-										<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-										<%--	dataType: "json",--%>
-										<%--	async: false--%>
-										<%--}).success(function (result) {--%>
-										<%--	if(result == 0){--%>
-										<%--		boolFlag = false;--%>
-										<%--		top.layer.msg("请上传依据性文件!", {icon: 0});--%>
-										<%--		return false;--%>
-										<%--	}--%>
-										<%--}).error(function () {--%>
-										<%--	top.layer.msg("文件载入失败!");--%>
-										<%--});--%>
 									}
-								}
-							}
-						}
-						if(boolFlag){
-							var other = $("#file_other tr").length;
-							for(var i=0; i<other; i++) {
-								var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
-
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传其它文件!", {icon: 0});
+									if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+										if(endingDate.getTime() < projectEndDate.getTime()){
+											parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
 											return false;
 										}
-										<%--$.ajax({--%>
-										<%--	type: 'post',--%>
-										<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-										<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-										<%--	dataType: "json",--%>
-										<%--	async: false--%>
-										<%--}).success(function (result) {--%>
-										<%--	if(result == 0){--%>
-										<%--		boolFlag = false;--%>
-										<%--		top.layer.msg("请上传其他文件!", {icon: 0});--%>
-										<%--		return false;--%>
-										<%--	}--%>
-										<%--}).error(function () {--%>
-										<%--	top.layer.msg("文件载入失败!");--%>
-										<%--});--%>
 									}
-								}
-							}
-						}
+									var ziXunShouRu = $("#ziXunShouRu").val();
+									if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
+										top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
+										return false;
+									}
+									for(var i=0; i<leng; i++) {
+										var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
+										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										if(second == 1){
+											if(numberStr != undefined && numberStr !=null && numberStr !=''){
+												if (fileFlag==1){
+
+												}else{
+													top.layer.msg("请上传成果文件!", {icon: 0});
+													return false;
+												}
+											}
+										}
+									}
+									var projectGrade = '${projectGrade}';
+									if (leng1<=1 ){
+										top.layer.msg("请添加咨询员信息!", {icon: 0});
+										return false;
+									}else if(projectGrade == 1 && leng1<=2){
+										top.layer.msg("请添加咨询员信息!", {icon: 0});
+										return false;
+									}
+									if(boolFlag){
+										var gistdata = $("#file_gistdata tr").length;
+										for(var i=0; i<gistdata; i++) {
+											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
+											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传依据性文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
+									if(boolFlag){
+										var other = $("#file_other tr").length;
+										for(var i=0; i<other; i++) {
+											var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
+											var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传其它文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
 
-						/*var attachmentProjectSort = ${projectRecords.attachmentProjectSort};
-						if(8 == attachmentProjectSort){
-							var length = $("#file_attachment_judgement").find("tr").length ;
-							if(length<1){
-								parent.layer.msg("审定(内)项目请上传审定单文件!", {icon: 2});
-								return false;
-							}
-						}*/
 
 
-						var info = false;
-						if(dataList == undefined){
-							dataList = ${fns:toJson(workReviewAudits)}
-						}
-						if (null != dataList){
-							for (var i=0; i<dataList.length; i++){
-								console.log($("#audit"+dataList[i].id).val())
-								if($("#audit"+dataList[i].id).val() == 0){
-									info = true;
+									var flags=judgment();
+									if (flags){
+										$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/saveReport");
+										$("#inputForm").submit();
+										top.layer.closeAll();//关闭对话框。
+										return true;
+									}else{
+										return flags;
+									}
 								}
-							}
-							if (info){
-								parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-								return false;
-							}
-						}
-						var flags=judgment();
-						if (flags){
-							$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/saveReport");
-						}else{
-							return flags;
+							});
+
 						}
+
+
+
+
+
 						<%--$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/saveReport");--%>
 					}else{
 						//$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectcontentinfo/save?view=report");
 						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/holdSaveReport");
+						$("#inputForm").submit();
+						return true;
 					}
-					$("#inputForm").submit();
-					return true;
 				}
             }else{
 				parent.layer.msg("请填写重要信息!", {icon: 5});

+ 152 - 142
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportModify.jsp

@@ -33,6 +33,26 @@
         var dataList;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+
+				var info = false;
+				if(dataList == undefined){
+					dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
+				}
+				if (null!==dataList){
+					if (null != dataList){
+						for (var i=0; i<dataList.length; i++){
+							console.log($("#audit"+dataList[i].id).val())
+							if($("#audit"+dataList[i].id).val() == 0){
+								info = true;
+							}
+						}
+						if (info){
+							parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+							return false;
+						}
+					}
+				}
+
 				var projectId = '${projectId}';
 				var leng = $("#file_attachment tr").length;
 				var leng1 = $("#reportedConsultantList tr").length;
@@ -47,158 +67,148 @@
 					return false;
 				}
 				var newDate =  new Date()
-				if(startDate.getTime() > newDate.getTime()){
-					parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-					return false;
-				}
-				if(endingDate.getTime() < newDate.getTime()){
-					parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-					return false;
-				}
-				if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-					if(startDate.getTime() > projectStartDate.getTime()){
-						parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
-						return false;
-					}
-				}
-				if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-					if(endingDate.getTime() < projectEndDate.getTime()){
-						parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-						return false;
-					}
-				}
-				var ziXunShouRu = $("#ziXunShouRu").val();
-				if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
-					top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
-					return false;
-				}
-				if (leng1<=1){
-					top.layer.msg("请添加咨询员信息!", {icon: 0});
-					return false;
-				}
-				for(var i=0; i<leng; i++) {
-					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-					var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-					if(second == 1){
-						if(numberStr != undefined && numberStr !=null && numberStr !=''){
-							if (fileFlag==1){
-
-							}else{
-								top.layer.msg("请上传成果文件!", {icon: 0});
-								return false;
-							}
-							<%--$.ajax({--%>
-							<%--	type: 'post',--%>
-							<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-							<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-							<%--	dataType: "json",--%>
-							<%--	async: false--%>
-							<%--}).success(function (result) {--%>
-							<%--	if(result == 0){--%>
-							<%--		boolFlag = false;--%>
-							<%--		top.layer.msg("请上传成果文件!", {icon: 0});--%>
-							<%--		return false;--%>
-							<%--	}--%>
-							<%--}).error(function () {--%>
-							<%--	top.layer.msg("文件载入失败!");--%>
-							<%--});--%>
-						}
-					}
-				}
-				if(boolFlag){
-					var gistdata = $("#file_gistdata tr").length;
-					for(var i=0; i<gistdata; i++) {
-						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-						if(second == 1){
-							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								if (fileFlag==1){
+				if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
 
-								}else{
-									top.layer.msg("请上传依据性文件!", {icon: 0});
+					top.layer.open({
+						content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+						,btn: ['是', '否']
+						,yes: function(index, layero){
+							top.layer.close(index);//关闭对话框。
+							return false;
+						}
+						,btn2: function(index, layero){
+							top.layer.close(index);//关闭对话框。
+							if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+								if(startDate.getTime() > projectStartDate.getTime()){
+									parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
 									return false;
 								}
-								<%--$.ajax({--%>
-								<%--	type: 'post',--%>
-								<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-								<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-								<%--	dataType: "json",--%>
-								<%--	async: false--%>
-								<%--}).success(function (result) {--%>
-								<%--	if(result == 0){--%>
-								<%--		boolFlag = false;--%>
-								<%--		top.layer.msg("请上传依据性文件!", {icon: 0});--%>
-								<%--		return false;--%>
-								<%--	}--%>
-								<%--}).error(function () {--%>
-								<%--	top.layer.msg("文件载入失败!");--%>
-								<%--});--%>
 							}
-						}
-					}
-				}
-				if(boolFlag){
-					var other = $("#file_other tr").length;
-					for(var i=0; i<other; i++) {
-						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-						var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
-						if(second == 1){
-							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								if (fileFlag==1){
-
-								}else{
-									top.layer.msg("请上传其它文件!", {icon: 0});
+							if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+								if(endingDate.getTime() < projectEndDate.getTime()){
+									parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
 									return false;
 								}
-								<%--$.ajax({--%>
-								<%--	type: 'post',--%>
-								<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-								<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-								<%--	dataType: "json",--%>
-								<%--	async: false--%>
-								<%--}).success(function (result) {--%>
-								<%--	if(result == 0){--%>
-								<%--		boolFlag = false;--%>
-								<%--		top.layer.msg("请上传其他文件!", {icon: 0});--%>
-								<%--		return false;--%>
-								<%--	}--%>
-								<%--}).error(function () {--%>
-								<%--	top.layer.msg("文件载入失败!");--%>
-								<%--});--%>
 							}
-						}
-					}
-				}
-				var info = false;
-				if(dataList == undefined){
-					dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
-				}
-				if (null!==dataList){
-					if (null != dataList){
-						for (var i=0; i<dataList.length; i++){
-							console.log($("#audit"+dataList[i].id).val())
-							if($("#audit"+dataList[i].id).val() == 0){
-								info = true;
+							var ziXunShouRu = $("#ziXunShouRu").val();
+							if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
+								top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
+								return false;
+							}
+							if (leng1<=1){
+								top.layer.msg("请添加咨询员信息!", {icon: 0});
+								return false;
+							}
+							for(var i=0; i<leng; i++) {
+								var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+								var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传成果文件!", {icon: 0});
+											return false;
+										}
+										<%--$.ajax({--%>
+										<%--	type: 'post',--%>
+										<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
+										<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
+										<%--	dataType: "json",--%>
+										<%--	async: false--%>
+										<%--}).success(function (result) {--%>
+										<%--	if(result == 0){--%>
+										<%--		boolFlag = false;--%>
+										<%--		top.layer.msg("请上传成果文件!", {icon: 0});--%>
+										<%--		return false;--%>
+										<%--	}--%>
+										<%--}).error(function () {--%>
+										<%--	top.layer.msg("文件载入失败!");--%>
+										<%--});--%>
+									}
+								}
+							}
+							if(boolFlag){
+								var gistdata = $("#file_gistdata tr").length;
+								for(var i=0; i<gistdata; i++) {
+									var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+									var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+									var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+									if(second == 1){
+										if(numberStr != undefined && numberStr !=null && numberStr !=''){
+											if (fileFlag==1){
+
+											}else{
+												top.layer.msg("请上传依据性文件!", {icon: 0});
+												return false;
+											}
+											<%--$.ajax({--%>
+											<%--	type: 'post',--%>
+											<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
+											<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
+											<%--	dataType: "json",--%>
+											<%--	async: false--%>
+											<%--}).success(function (result) {--%>
+											<%--	if(result == 0){--%>
+											<%--		boolFlag = false;--%>
+											<%--		top.layer.msg("请上传依据性文件!", {icon: 0});--%>
+											<%--		return false;--%>
+											<%--	}--%>
+											<%--}).error(function () {--%>
+											<%--	top.layer.msg("文件载入失败!");--%>
+											<%--});--%>
+										}
+									}
+								}
+							}
+							if(boolFlag){
+								var other = $("#file_other tr").length;
+								for(var i=0; i<other; i++) {
+									var numberStr = $("#file_other tr").eq(i).find("td:first").html();
+									var second = $("#file_other tr").eq(i).find("td:eq(1)").html();						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+									var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+									if(second == 1){
+										if(numberStr != undefined && numberStr !=null && numberStr !=''){
+											if (fileFlag==1){
+
+											}else{
+												top.layer.msg("请上传其它文件!", {icon: 0});
+												return false;
+											}
+											<%--$.ajax({--%>
+											<%--	type: 'post',--%>
+											<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
+											<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
+											<%--	dataType: "json",--%>
+											<%--	async: false--%>
+											<%--}).success(function (result) {--%>
+											<%--	if(result == 0){--%>
+											<%--		boolFlag = false;--%>
+											<%--		top.layer.msg("请上传其他文件!", {icon: 0});--%>
+											<%--		return false;--%>
+											<%--	}--%>
+											<%--}).error(function () {--%>
+											<%--	top.layer.msg("文件载入失败!");--%>
+											<%--});--%>
+										}
+									}
+								}
+							}
+
+							if(boolFlag){
+								if(obj == 1){
+									$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/reportAudit");
+								}else{
+									$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/reportAudit");
+								}
+								$("#inputForm").submit();
+								top.layer.closeAll();//关闭对话框。
+								return true;
 							}
 						}
-						if (info){
-							parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-							return false;
-						}
-					}
-				}
+					});
 
-				if(boolFlag){
-					if(obj == 1){
-						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/reportAudit");
-					}else{
-						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/reportAudit");
-					}
-					$("#inputForm").submit();
-					return true;
 				}
             }
 

+ 110 - 107
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -38,6 +38,23 @@
 				var boolFlag = true;
 				if(boolFlag){
 					if(obj == 1){
+
+						var info = false;
+						if(dataList == undefined){
+							dataList = ${fns:toJson(workReviewAudits)}
+						}
+						if (null != dataList){
+							for (var i=0; i<dataList.length; i++){
+								console.log($("#audit"+dataList[i].id).val())
+								if($("#audit"+dataList[i].id).val() == 0){
+									info = true;
+								}
+							}
+							if (info){
+								parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+								return false;
+							}
+						}
 						var leng = $("#file_attachment tr").length;
 						var leng1 = $("#reportedConsultantList tr").length;
 						var startDate = new Date($("#startDate").val());
@@ -55,99 +72,93 @@
 						}
 
 						var newDate =  new Date()
-						if(startDate.getTime() > newDate.getTime()){
-							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(endingDate.getTime() < newDate.getTime()){
-							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-							return false;
-						}
-						var newDate =  new Date()
-						if(startDate.getTime() > newDate.getTime()){
-							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(endingDate.getTime() < newDate.getTime()){
-							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-							if(startDate.getTime() > projectStartDate.getTime()){
-								parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
-								return false;
-							}
-						}
-						if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-							if(endingDate.getTime() < projectEndDate.getTime()){
-								parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-								return false;
-							}
-						}
-						var ziXunShouRu = $("#ziXunShouRu").val();
-						if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
-							top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
-							return false;
-						}
-						for(var i=0; i<leng; i++) {
-							var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-							if(second == 1){
-								if(numberStr != undefined && numberStr !=null && numberStr !=''){
-									if (fileFlag==1){
-
-									}else{
-										top.layer.msg("请上传成果文件!", {icon: 0});
-										return false;
-									}
+						if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
+
+							top.layer.open({
+								content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+								,btn: ['是', '否']
+								,yes: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									return false;
 								}
-							}
-						}
-						if (leng1<=2){
-							top.layer.msg("请添加咨询员信息!", {icon: 0});
-							return false;
-						}
-						if(boolFlag){
-							var gistdata = $("#file_gistdata tr").length;
-							for(var i=0; i<gistdata; i++) {
-								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传依据性文件!", {icon: 0});
+								,btn2: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+										if(startDate.getTime() > projectStartDate.getTime()){
+											parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
 											return false;
 										}
 									}
-								}
-							}
-						}
-						if(boolFlag){
-							var other = $("#file_other tr").length;
-							for(var i=0; i<other; i++) {
-								var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
-
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传其它文件!", {icon: 0});
+									if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+										if(endingDate.getTime() < projectEndDate.getTime()){
+											parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
 											return false;
 										}
 									}
-								}
-							}
-						}
+									var ziXunShouRu = $("#ziXunShouRu").val();
+									if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
+										top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
+										return false;
+									}
+									for(var i=0; i<leng; i++) {
+										var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
+										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										if(second == 1){
+											if(numberStr != undefined && numberStr !=null && numberStr !=''){
+												if (fileFlag==1){
+
+												}else{
+													top.layer.msg("请上传成果文件!", {icon: 0});
+													return false;
+												}
+											}
+										}
+									}
+									if (leng1<=2){
+										top.layer.msg("请添加咨询员信息!", {icon: 0});
+										return false;
+									}
+									if(boolFlag){
+										var gistdata = $("#file_gistdata tr").length;
+										for(var i=0; i<gistdata; i++) {
+											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
+											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传依据性文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
+									if(boolFlag){
+										var other = $("#file_other tr").length;
+										for(var i=0; i<other; i++) {
+											var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
+											var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传其它文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
 
-						/*var attachmentProjectSort = ${projectRecords.attachmentProjectSort};
+									/*var attachmentProjectSort = ${projectRecords.attachmentProjectSort};
 						if(8 == attachmentProjectSort){
 							var length = $("#file_attachment_judgement").find("tr").length ;
 							if(length<1){
@@ -157,33 +168,25 @@
 						}*/
 
 
-						var info = false;
-						if(dataList == undefined){
-							dataList = ${fns:toJson(workReviewAudits)}
-						}
-						if (null != dataList){
-							for (var i=0; i<dataList.length; i++){
-								console.log($("#audit"+dataList[i].id).val())
-								if($("#audit"+dataList[i].id).val() == 0){
-									info = true;
+									var flags=judgment();
+									if (flags){
+										$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/saveReport");
+										$("#inputForm").submit();
+										top.layer.closeAll();//关闭对话框。
+										return true;
+									}else{
+										return flags;
+									}
 								}
-							}
-							if (info){
-								parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-								return false;
-							}
-						}
-						var flags=judgment();
-						if (flags){
-							$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/saveReport");
-						}else{
-							return flags;
+							});
+
 						}
+
 					}else{
 						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/holdSaveReport");
+						$("#inputForm").submit();
+						return true;
 					}
-					$("#inputForm").submit();
-					return true;
 				}
             }else{
 				parent.layer.msg("请填写重要信息!", {icon: 5});

+ 115 - 105
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp

@@ -26,6 +26,23 @@
         var dataList;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+
+                var info = false;
+                if(dataList == undefined){
+                    dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
+                }
+                if (null!==dataList){
+                    for (var i=0; i<dataList.length; i++){
+                        console.log($("#audit"+dataList[i].id).val())
+                        if($("#audit"+dataList[i].id).val() == 0){
+                            info = true;
+                        }
+                    }
+                    if (info){
+                        parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+                        return false;
+                    }
+                }
                 var projectId = '${projectcontentinfo.project.id}';
                 var leng1 = $("#reportedConsultantList tr").length;
                 var leng = $("#file_attachment tr").length;
@@ -40,92 +57,95 @@
                     return false;
                 }
                 var newDate =  new Date()
-                if(startDate.getTime() > newDate.getTime()){
-                    parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-                    return false;
-                }
-                if(endingDate.getTime() < newDate.getTime()){
-                    parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-                    return false;
-                }
-                if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-                    if(startDate.getTime() > projectStartDate.getTime()){
-                        parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
-                        return false;
-                    }
-                }
-                if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-                    if(endingDate.getTime() < projectEndDate.getTime()){
-                        parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-                        return false;
-                    }
-                }
-                var ziXunShouRu = $("#ziXunShouRu").val();
-                if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
-                    top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
-                    return false;
-                }
-                if (leng1<=1){
-                    top.layer.msg("请添加咨询员信息!", {icon: 0});
-                    return false;
-                }
-                for(var i=0; i<leng; i++) {
-                    var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-                    var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-                    var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-                    var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-
-                    if(second == 1){
-                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                            if (fileFlag==1){
-
-                            }else{
-                                top.layer.msg("请上传成果文件!", {icon: 0});
-                                return false;
-                            }
+                if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
+
+                    top.layer.open({
+                        content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+                        ,btn: ['是', '否']
+                        ,yes: function(index, layero){
+                            top.layer.close(index);//关闭对话框。
+                            return false;
                         }
-                    }
-                }
-                if(boolFlag){
-                    var gistdata = $("#file_gistdata tr").length;
-                    for(var i=0; i<gistdata; i++) {
-                        var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-                        var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-                        var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-
-                        if(second == 1){
-                            if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                                if (fileFlag==1){
-
-                                }else{
-                                    top.layer.msg("请上传依据性文件!", {icon: 0});
+                        ,btn2: function(index, layero){
+                            top.layer.close(index);//关闭对话框。
+                            if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+                                if(startDate.getTime() > projectStartDate.getTime()){
+                                    parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
                                     return false;
                                 }
                             }
-                        }
-                    }
-                }
-                if(boolFlag){
-                    var other = $("#file_other tr").length;
-                    for(var i=0; i<other; i++) {
-                        var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-                        var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-                        var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
-
-                        if(second == 1){
-                            if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                                if (fileFlag==1){
-
-                                }else{
-                                    top.layer.msg("请上传其它文件!", {icon: 0});
+                            if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+                                if(endingDate.getTime() < projectEndDate.getTime()){
+                                    parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
                                     return false;
                                 }
                             }
-                        }
-                    }
-                }
+                            var ziXunShouRu = $("#ziXunShouRu").val();
+                            if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
+                                top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
+                                return false;
+                            }
+                            if (leng1<=1){
+                                top.layer.msg("请添加咨询员信息!", {icon: 0});
+                                return false;
+                            }
+                            for(var i=0; i<leng; i++) {
+                                var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
+                                var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+                                var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+                                var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+
+                                if(second == 1){
+                                    if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                        if (fileFlag==1){
+
+                                        }else{
+                                            top.layer.msg("请上传成果文件!", {icon: 0});
+                                            return false;
+                                        }
+                                    }
+                                }
+                            }
+                            if(boolFlag){
+                                var gistdata = $("#file_gistdata tr").length;
+                                for(var i=0; i<gistdata; i++) {
+                                    var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
+                                    var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+                                    var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+
+                                    if(second == 1){
+                                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                            if (fileFlag==1){
+
+                                            }else{
+                                                top.layer.msg("请上传依据性文件!", {icon: 0});
+                                                return false;
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            if(boolFlag){
+                                var other = $("#file_other tr").length;
+                                for(var i=0; i<other; i++) {
+                                    var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
+                                    var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+                                    var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+                                    if(second == 1){
+                                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                            if (fileFlag==1){
+
+                                            }else{
+                                                top.layer.msg("请上传其它文件!", {icon: 0});
+                                                return false;
+                                            }
+                                        }
+                                    }
+                                }
+                            }
 
-                /*var attachmentProjectSort = ${attachmentProjectSort};
+                            /*var attachmentProjectSort = ${attachmentProjectSort};
                 if(8 == attachmentProjectSort){
                     var length = $("#file_attachment_judgement").find("tr").length ;
                     if(length<1){
@@ -134,36 +154,26 @@
                     }
                 }*/
 
-                var info = false;
-                if(dataList == undefined){
-                    dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
-                }
-                if (null!==dataList){
-                    for (var i=0; i<dataList.length; i++){
-                        console.log($("#audit"+dataList[i].id).val())
-                        if($("#audit"+dataList[i].id).val() == 0){
-                            info = true;
-                        }
-                    }
-                    if (info){
-                        parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-                        return false;
-                    }
-                }
 
-                if(boolFlag) {
-                    if (obj == 1) {
-                        $("#flag").val("yes");
-                    } else {
-                        if (obj == 2) {
-                            $("#flag").val("no1");
-                        } else {
-                            $("#flag").val("no2");
+                            if(boolFlag) {
+                                if (obj == 1) {
+                                    $("#flag").val("yes");
+                                } else {
+                                    if (obj == 2) {
+                                        $("#flag").val("no1");
+                                    } else {
+                                        $("#flag").val("no2");
+                                    }
+                                }
+                                $("#inputForm").submit();
+                                top.layer.closeAll();//关闭对话框。
+                                return true;
+                            }
                         }
-                    }
-                    $("#inputForm").submit();
-                    return true;
+                    });
+
                 }
+
             }
 
             return false;

+ 110 - 100
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageModify.jsp

@@ -26,6 +26,23 @@
         var dataList;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+
+                var info = false;
+                if(dataList == undefined){
+                    dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
+                }
+                if (null!==dataList){
+                    for (var i=0; i<dataList.length; i++){
+                        console.log($("#audit"+dataList[i].id).val())
+                        if($("#audit"+dataList[i].id).val() == 0){
+                            info = true;
+                        }
+                    }
+                    if (info){
+                        parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+                        return false;
+                    }
+                }
                 var projectId = '${projectcontentinfo.project.id}';
                 var leng1 = $("#reportedConsultantList tr").length;
                 var leng = $("#file_attachment tr").length;
@@ -40,120 +57,113 @@
                     return false;
                 }
                 var newDate =  new Date()
-                if(startDate.getTime() > newDate.getTime()){
-                    parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-                    return false;
-                }
-                if(endingDate.getTime() < newDate.getTime()){
-                    parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-                    return false;
-                }
-                if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-                    if(startDate.getTime() > projectStartDate.getTime()){
-                        parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
-                        return false;
-                    }
-                }
-                if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-                    if(endingDate.getTime() < projectEndDate.getTime()){
-                        parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-                        return false;
-                    }
-                }
-                var ziXunShouRu = $("#ziXunShouRu").val();
-                if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
-                    top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
-                    return false;
-                }
-                if (leng1<=1){
-                    top.layer.msg("请添加咨询员信息!", {icon: 0});
-                    return false;
-                }
-                for(var i=0; i<leng; i++) {
-                    var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-                    var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-                    var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-                    var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-
-                    if(second == 1){
-                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                            if (fileFlag==1){
+                if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
 
-                            }else{
-                                top.layer.msg("请上传成果文件!", {icon: 0});
+                    top.layer.open({
+                        content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+                        ,btn: ['是', '否']
+                        ,yes: function(index, layero){
+                            top.layer.close(index);//关闭对话框。
+                            return false;
+                        }
+                        ,btn2: function(index, layero){
+                            top.layer.close(index);//关闭对话框。
+                            if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+                                if(startDate.getTime() > projectStartDate.getTime()){
+                                    parent.layer.msg("工作结束日期不得大于工作计划最早结束时间!", {icon: 5});
+                                    return false;
+                                }
+                            }
+                            if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+                                if(endingDate.getTime() < projectEndDate.getTime()){
+                                    parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
+                                    return false;
+                                }
+                            }
+                            var ziXunShouRu = $("#ziXunShouRu").val();
+                            if(null == ziXunShouRu || undefined == ziXunShouRu || '' == ziXunShouRu || parseFloat(ziXunShouRu)<=0){
+                                top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
                                 return false;
                             }
-                        }
-                    }
-                }
-                if(boolFlag){
-                    var gistdata = $("#file_gistdata tr").length;
-                    for(var i=0; i<gistdata; i++) {
-                        var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-                        var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-                        var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+                            if (leng1<=1){
+                                top.layer.msg("请添加咨询员信息!", {icon: 0});
+                                return false;
+                            }
+                            for(var i=0; i<leng; i++) {
+                                var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
+                                var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+                                var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+                                var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
 
-                        if(second == 1){
-                            if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                                if (fileFlag==1){
+                                if(second == 1){
+                                    if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                        if (fileFlag==1){
 
-                                }else{
-                                    top.layer.msg("请上传依据性文件!", {icon: 0});
-                                    return false;
+                                        }else{
+                                            top.layer.msg("请上传成果文件!", {icon: 0});
+                                            return false;
+                                        }
+                                    }
                                 }
                             }
-                        }
-                    }
-                }
-                if(boolFlag){
-                    var other = $("#file_other tr").length;
-                    for(var i=0; i<other; i++) {
-                        var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-                        var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-                        var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+                            if(boolFlag){
+                                var gistdata = $("#file_gistdata tr").length;
+                                for(var i=0; i<gistdata; i++) {
+                                    var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
+                                    var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+                                    var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
 
-                        if(second == 1){
-                            if(numberStr != undefined && numberStr !=null && numberStr !=''){
-                                if (fileFlag==1){
+                                    if(second == 1){
+                                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                            if (fileFlag==1){
 
-                                }else{
-                                    top.layer.msg("请上传其它文件!", {icon: 0});
-                                    return false;
+                                            }else{
+                                                top.layer.msg("请上传依据性文件!", {icon: 0});
+                                                return false;
+                                            }
+                                        }
+                                    }
                                 }
                             }
-                        }
-                    }
-                }
-                var info = false;
-                if(dataList == undefined){
-                    dataList = ${fns:toJson(projectcontentinfo.projectReportData.projectReviewList)}
-                }
-                if (null!==dataList){
-                    for (var i=0; i<dataList.length; i++){
-                        console.log($("#audit"+dataList[i].id).val())
-                        if($("#audit"+dataList[i].id).val() == 0){
-                            info = true;
-                        }
-                    }
-                    if (info){
-                        parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-                        return false;
-                    }
-                }
+                            if(boolFlag){
+                                var other = $("#file_other tr").length;
+                                for(var i=0; i<other; i++) {
+                                    var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
+                                    var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+                                    var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
 
-                if(boolFlag) {
-                    if (obj == 1) {
-                        $("#flag").val("yes");
-                    } else {
-                        if (obj == 2) {
-                            $("#flag").val("no1");
-                        } else {
-                            $("#flag").val("no2");
+                                    if(second == 1){
+                                        if(numberStr != undefined && numberStr !=null && numberStr !=''){
+                                            if (fileFlag==1){
+
+                                            }else{
+                                                top.layer.msg("请上传其它文件!", {icon: 0});
+                                                return false;
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+
+                            if(boolFlag) {
+                                if (obj == 1) {
+                                    $("#flag").val("yes");
+                                } else {
+                                    if (obj == 2) {
+                                        $("#flag").val("no1");
+                                    } else {
+                                        $("#flag").val("no2");
+                                    }
+                                }
+                                $("#inputForm").submit();
+                                top.layer.closeAll();//关闭对话框。
+                                return true;
+                            }
                         }
-                    }
-                    $("#inputForm").submit();
-                    return true;
+                    });
+
                 }
+
             }
 
             return false;

+ 105 - 94
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp

@@ -46,116 +46,127 @@
 							return false;
 						}
 						var newDate =  new Date()
-						if(startDate.getTime() > newDate.getTime()){
-							parent.layer.msg("工作开始日期不得大于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(endingDate.getTime() < newDate.getTime()){
-							parent.layer.msg("工作结束日期不得小于送审当天日期!", {icon: 5});
-							return false;
-						}
-						if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
-							if(startDate.getTime() > projectStartDate.getTime()){
-								parent.layer.msg("工作开始日期不得大于工作计划最早结束时间!", {icon: 5});
-								return false;
-							}
-						}
-						if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
-							if(endingDate.getTime() < projectEndDate.getTime()){
-								parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
-								return false;
-							}
-						}
-
-						var projectGrade = '${projectGrade}';
-						if (leng1<=1){
-							top.layer.msg("请添加咨询员信息!", {icon: 0});
-							return false;
-						}else if(projectGrade == 1 && leng1<=2){
-							top.layer.msg("请添加咨询员信息!", {icon: 0});
-							return false;
-						}
-						for(var i=0; i<leng; i++) {
-							var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-							var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-							if(second == 1){
-								if(numberStr != undefined && numberStr !=null && numberStr !=''){
-									if (fileFlag==1){
+						if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
 
-									}else{
-										top.layer.msg("请上传成果文件!", {icon: 0});
-										return false;
-									}
+							top.layer.open({
+								content: '质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期?'
+								,btn: ['是', '否']
+								,yes: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									return false;
 								}
-							}
-						}
-						if(boolFlag){
-							var gistdata = $("#file_gistdata tr").length;
-							for(var i=0; i<gistdata; i++) {
-								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传依据性文件!", {icon: 0});
+								,btn2: function(index, layero){
+									top.layer.close(index);//关闭对话框。
+									if(null != projectStartDate && undefined != projectStartDate && '' != projectStartDate){
+										if(startDate.getTime() > projectStartDate.getTime()){
+											parent.layer.msg("工作开始日期不得大于工作计划最早结束时间!", {icon: 5});
 											return false;
 										}
 									}
-								}
-							}
-						}
-						if(boolFlag){
-							var other = $("#ile_other tr").length;
-							for(var i=0; i<other; i++) {
-								var numberStr = $("#ile_other tr").eq(i).find("td:first").html();
-								var second = $("#ile_other tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
-								if(second == 1){
-									if(numberStr != undefined && numberStr !=null && numberStr !=''){
-										if (fileFlag==1){
-
-										}else{
-											top.layer.msg("请上传其它文件!", {icon: 0});
+									if(null != projectEndDate && undefined != projectEndDate && '' != projectEndDate){
+										if(endingDate.getTime() < projectEndDate.getTime()){
+											parent.layer.msg("工作结束日期不得小于工作计划最晚开始时间!", {icon: 5});
 											return false;
 										}
 									}
-								}
-							}
-						}
-						var flags=judgment();
-						if (!flags){
-							return flags;
-						}else{
-							var info = false;
-							if(dataList == undefined){
-								dataList = ${fns:toJson(workReviewAudits)}
-							}
-							if (null!==dataList){
-								for (var i=0; i<dataList.length; i++){
-									console.log($("#audit"+dataList[i].id).val())
-									if($("#audit"+dataList[i].id).val() == 0){
-										info = true;
+
+									var projectGrade = '${projectGrade}';
+									if (leng1<=1){
+										top.layer.msg("请添加咨询员信息!", {icon: 0});
+										return false;
+									}else if(projectGrade == 1 && leng1<=2){
+										top.layer.msg("请添加咨询员信息!", {icon: 0});
+										return false;
+									}
+									for(var i=0; i<leng; i++) {
+										var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+										var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										if(second == 1){
+											if(numberStr != undefined && numberStr !=null && numberStr !=''){
+												if (fileFlag==1){
+
+												}else{
+													top.layer.msg("请上传成果文件!", {icon: 0});
+													return false;
+												}
+											}
+										}
+									}
+									if(boolFlag){
+										var gistdata = $("#file_gistdata tr").length;
+										for(var i=0; i<gistdata; i++) {
+											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传依据性文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
+									if(boolFlag){
+										var other = $("#ile_other tr").length;
+										for(var i=0; i<other; i++) {
+											var numberStr = $("#ile_other tr").eq(i).find("td:first").html();
+											var second = $("#ile_other tr").eq(i).find("td:eq(1)").html();
+											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+											if(second == 1){
+												if(numberStr != undefined && numberStr !=null && numberStr !=''){
+													if (fileFlag==1){
+
+													}else{
+														top.layer.msg("请上传其它文件!", {icon: 0});
+														return false;
+													}
+												}
+											}
+										}
+									}
+									var flags=judgment();
+									if (!flags){
+										return flags;
+									}else{
+										var info = false;
+										if(dataList == undefined){
+											dataList = ${fns:toJson(workReviewAudits)}
+										}
+										if (null!==dataList){
+											for (var i=0; i<dataList.length; i++){
+												console.log($("#audit"+dataList[i].id).val())
+												if($("#audit"+dataList[i].id).val() == 0){
+													info = true;
+												}
+											}
+											if (info){
+												parent.layer.msg("请先确认质量符合内容!", {icon: 2});
+												return false;
+											}
+										}
+
+										$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessageNew/saveReport");
+										$("#inputForm").submit();
+										top.layer.closeAll();//关闭对话框。
+										return true;
 									}
 								}
-								if (info){
-									parent.layer.msg("请先确认质量符合内容!", {icon: 2});
-									return false;
-								}
-							}
+							});
 
-							$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessageNew/saveReport");
 						}
+
 					}else{
 
 						$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessageNew/holdSaveReport");
+						$("#inputForm").submit();
+						return true;
 					}
-					$("#inputForm").submit();
-					return true;
 				}
             }else {
 				parent.layer.msg("信息未填写完整!", {icon: 5});