瀏覽代碼

上次文件判定(新增报告/线上归档)

[user3] 4 年之前
父節點
當前提交
8cd2f064a8
共有 20 個文件被更改,包括 768 次插入458 次删除
  1. 11 0
      src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java
  2. 6 1
      src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java
  3. 10 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  4. 0 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  5. 99 48
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp
  6. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp
  7. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp
  8. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsModify.jsp
  9. 71 45
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp
  10. 74 45
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp
  11. 85 57
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp
  12. 74 48
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportModify.jsp
  13. 72 45
      src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordForm.jsp
  14. 71 45
      src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordModify.jsp
  15. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsView.jsp
  16. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp
  17. 120 67
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp
  18. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp
  19. 69 45
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp
  20. 0 4
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectReportRecordView.jsp

+ 11 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java

@@ -36,6 +36,9 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	private String url;
 	private String temporaryUrl;		// 附件地址(临时地址)
 
+	private Integer fileFlag;   //判断是否有文件(1:有文件信息,0:无文件)
+
+
 	public ProjectTemplateInfo() {
 		super();
 	}
@@ -196,4 +199,12 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	public void setTemporaryUrl(String temporaryUrl) {
 		this.temporaryUrl = temporaryUrl;
 	}
+
+	public Integer getFileFlag() {
+		return fileFlag;
+	}
+
+	public void setFileFlag(Integer fileFlag) {
+		this.fileFlag = fileFlag;
+	}
 }

+ 6 - 1
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -303,8 +303,13 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             //判断是否为必填项,若为必填项则添加必填判定字段
             if(info.getRequiredStage() == projectTemplateInfo.getRequiredStage()){
                 info.setMustFlag(1);
+                //判定必填项的下的是否有附件信息
+                if (attachments.size()!=0){
+                    info.setFileFlag(1);
+                }
             } else {
                 info.setMustFlag(0);
+                info.setFileFlag(0);
             }
         }
         //查询没有被选择必填项的数据并查询是否已经上传附件,若有则添加到展示列中
@@ -318,7 +323,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             workattachmentService.clientAttachmentManageOnUrl(attachments);
             if(attachments.size()>0){
                 otherInfo.setWorkAttachments(attachments);
-
+                otherInfo.setFileFlag(0);
                 otherInfo.setMustFlag(0);
                 projectTemplateList.add(otherInfo);
             }

+ 10 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -34,6 +34,7 @@ import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectPlanService;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsReportedDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.*;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
@@ -109,6 +110,8 @@ public class RuralProjectMessageController extends BaseController {
     private ProjectFilingBatchDao projectFilingBatchDao;
     @Autowired
     private RuralProjectRecordsService ruralProjectRecordsService;
+    @Autowired
+    private RuralProjectRecordsReportedDao ruralProjectRecordsReportedDao;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -590,6 +593,13 @@ public class RuralProjectMessageController extends BaseController {
                 Act act = getByAct(projectReportData.getProcessInstanceId());
                 projectReportData.setAct(act);
             }
+            //根据项目id查找咨询员信息
+            List<RuralReportConsultant> consultantList=ruralProjectMessageService.getConsultantsList(projectcontentinfo1.getProject().getId());
+            for (RuralReportConsultant consultant:consultantList){
+                User user=userService.get(consultant.getZixunyuan());
+                consultant.setZixunyuanName(user.getName());
+            }
+            model.addAttribute("consultantinfo", consultantList);
             return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify";
         }
         return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm";

+ 0 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java

@@ -523,11 +523,9 @@ public class RuralProjectViewController extends BaseController {
         model.addAttribute("projectRecords", projectRecords);
         if (null != projectRecords) {
             if (StringUtils.isBlank(projectRecords.getPrrId())) {
-                model.addAttribute("projectReportRecord", projectRecords);
                 return "modules/ruralprojectrecords/view/projectReportRecordView";
             }
         }else{
-            model.addAttribute("projectReportRecord", projectRecords);
             return "modules/ruralprojectrecords/view/projectReportRecordView";
         }
         ProjectReportRecord projectReportRecord = projectReportRecordService.get(projectRecords.getPrrId());

+ 99 - 48
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp

@@ -31,23 +31,30 @@
 					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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -56,23 +63,30 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -82,23 +96,31 @@
 					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_other tr").eq(i).find("td:last").html();
+
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -350,13 +372,22 @@
 							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
 								<td style="display:none">${fileAttachment.id}</td>
 								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
 								<td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
 								<td class="op-td">
 									<div class="op-btn-box" >
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -454,7 +485,15 @@
 									<%-- <td>${status.index + 1}</td>--%>
 								<td style="display:none">${fileGistdata.id}</td>
 								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
 <%--								<td></td>--%>
 								<td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
 								<td class="op-td">
@@ -462,6 +501,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
@@ -559,13 +600,23 @@
 									<%-- <td>${status.index + 1}</td>--%>
 								<td style="display:none">${fileOther.id}</td>
 								<td style="display:none">${fileOther.mustFlag}</td>
-								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
 								<td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
 								<td class="op-td">
 									<div class="op-btn-box" >
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_other_${fileOther.id}_tr">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp

@@ -230,7 +230,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">项目责人:</label>
+					<label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
 						<input htmlEscape="false" readonly="true" id="leaderName" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
 					</div>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp

@@ -244,7 +244,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">项目责人:</label>
+					<label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
 						<input htmlEscape="false" readonly="true" id="leaderName" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
 					</div>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsModify.jsp

@@ -196,7 +196,7 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目责人:</label>
+                    <label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
                     </div>

+ 71 - 45
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp

@@ -50,23 +50,30 @@
 				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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -75,23 +82,30 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -101,23 +115,30 @@
 					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_other tr").eq(i).find("td:last").html();
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -359,6 +380,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -499,6 +521,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
@@ -640,6 +664,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="addFile_other_${fileOther.id}_tr">

+ 74 - 45
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp

@@ -47,23 +47,31 @@
 				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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -72,23 +80,31 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -98,23 +114,31 @@
 					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_other tr").eq(i).find("td:last").html();
+
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -390,6 +414,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -531,7 +556,9 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
 							</tr>
+
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
 									<td></td>
@@ -671,6 +698,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="addFile_other_${fileOther.id}_tr">

+ 85 - 57
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp

@@ -34,7 +34,7 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
 				var projectId = '${projectRecords.id}';
-				var leng = $(".file_attachment_tr").length;
+				var leng = $("#file_attachment tr").length;
 				var leng1 = $("#reportedConsultantList tr").length;
 				var boolFlag = true;
 				var startDate = new Date($("#startDate").val());
@@ -45,25 +45,32 @@
 					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 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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -72,53 +79,69 @@
 					return false;
 				}
 				if(boolFlag){
-					var gistdata = $(".file_gistdata_tr").length;
+					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 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 !=''){
-								$.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 (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;
+					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 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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -1085,7 +1108,7 @@
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
 							<tr id="file_attachment_${fileAttachment.id}_tr_fu" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none"><span class="faid">${fileAttachment.id}</span></td>
 								<td style="display:none">${fileAttachment.mustFlag}</td>
 								<c:choose>
 									<c:when test="${fileAttachment.mustFlag == 1}">
@@ -1101,6 +1124,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_tr">
@@ -1225,7 +1250,7 @@
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
 							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none"><span class="fgid">${fileGistdata.id}</span></td>
 								<td style="display:none">${fileGistdata.mustFlag}</td>
 								<c:choose>
 									<c:when test="${fileGistdata.mustFlag == 1}">
@@ -1241,6 +1266,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+										<td style="display:none">${fileGistdata.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_tr">
@@ -1365,7 +1392,7 @@
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
 							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none"><span class="foid">${fileOther.id}</span></td>
 								<td style="display:none">${fileOther.mustFlag}</td>
 								<c:choose>
 									<c:when test="${fileOther.mustFlag == 1}">
@@ -1381,6 +1408,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_other_tr">

+ 74 - 48
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportModify.jsp

@@ -46,23 +46,30 @@
 				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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -71,23 +78,30 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -96,24 +110,31 @@
 					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 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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -1007,6 +1028,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectId}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -1134,7 +1157,7 @@
 								<td style="display:none">${fileGistdata.id}</td>
 								<td style="display:none">${fileGistdata.mustFlag}</td>
 								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
+									<c:when test="${fileGistdata.mustFlag == 1}">
 										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
 									</c:when>
 									<c:otherwise>
@@ -1147,7 +1170,9 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectId}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
-							</tr>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
+								</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
 									<td></td>
@@ -1287,6 +1312,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectId}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_other_${fileOther.id}_tr">

+ 72 - 45
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordForm.jsp

@@ -35,23 +35,30 @@
 				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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -60,23 +67,31 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -86,23 +101,31 @@
 					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_other tr").eq(i).find("td:last").html();
+
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -358,6 +381,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -492,6 +517,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
@@ -626,6 +652,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileOther.id}_tr">

+ 71 - 45
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordModify.jsp

@@ -34,23 +34,30 @@
 				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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 					}
 				}
@@ -59,23 +66,31 @@
 					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 !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -85,23 +100,30 @@
 					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_other tr").eq(i).find("td:last").html();
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
-								$.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 (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("文件载入失败!");--%>
+								<%--});--%>
 							}
 						}
 					}
@@ -377,6 +399,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_${fileAttachment.id}_tr">
@@ -511,6 +534,8 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_${fileGistdata.id}_tr">
@@ -646,6 +671,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_other_${fileOther.id}_tr">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsView.jsp

@@ -215,7 +215,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">项目责人:</label>
+					<label class="layui-form-label">项目责人:</label>
 					<div class="layui-input-block">
 						<input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${projectRecords.projectMasterName}"/>
 					</div>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp

@@ -227,7 +227,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw8">
-					<label class="layui-form-label">项目责人:</label>
+					<label class="layui-form-label">项目责人:</label>
 					<div class="layui-input-block">
 						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
 					</div>

+ 120 - 67
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp

@@ -28,7 +28,7 @@
             if(validateForm.form()){
                 var projectId = '${projectcontentinfo.project.id}';
                 var leng1 = $("#reportedConsultantList tr").length;
-                var leng = $(".file_attachment_tr").length;
+                var leng = $("#file_attachment tr").length;
                 var boolFlag = true;
                 var startDate = new Date($("#startDate").val());
                 var endingDate = new Date($("#endingDate").val());
@@ -42,77 +42,101 @@
                     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 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 !=''){
-                            $.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 (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;
+                    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 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 !=''){
-                                $.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 (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;
+                    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 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 !=''){
-                                $.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 (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("文件载入失败!");--%>
+                                <%--});--%>
                             }
                         }
                     }
@@ -437,7 +461,7 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw8">
-                    <label class="layui-form-label">项目责人:</label>
+                    <label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
                     </div>
@@ -820,15 +844,24 @@
                         <tbody id="file_attachment">
                         <c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
                                 <tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-                                    <td style="display:none">${fileAttachment.id}</td>
+                                    <td style="display:none"><span class="faid">${fileAttachment.id}</span></td>
                                     <td style="display:none">${fileAttachment.mustFlag}</td>
-                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+                                    <c:choose>
+                                        <c:when test="${fileAttachment.mustFlag == 1}">
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+                                        </c:otherwise>
+                                    </c:choose>
+<%--                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
                                     <td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
                                     <td class="op-td">
                                         <div class="op-btn-box" >
                                             <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectcontentinfo.project.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
                                         </div>
                                     </td>
+                                    <td style="display:none">${fileAttachment.fileFlag}</td>
                                 </tr>
                             <c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
                                 <tr class="file_attachment_tr">
@@ -895,7 +928,7 @@
             </div>
 
             <div class="form-group layui-row">
-                <div class="form-group-label"><h2>依据性资料</h2></div>
+                <div class="form-group-label"><h2>依据性文件</h2></div>
                 <div id="addFile_gistdata" style="display: none" class="upload-progress">
                     <span id="fileName_gistdata" ></span>
                     <b><span id="baifenbi_gistdata" ></span></b>
@@ -920,15 +953,25 @@
                         <tbody id="file_gistdata">
                         <c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
                                 <tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-                                    <td style="display:none">${fileGistdata.id}</td>
+                                    <td style="display:none"><span class="fgid">${fileGistdata.id}</span></td>
                                     <td style="display:none">${fileGistdata.mustFlag}</td>
-                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+                                    <c:choose>
+                                        <c:when test="${fileGistdata.mustFlag == 1}">
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+                                        </c:otherwise>
+                                    </c:choose>
+<%--                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
                                     <td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
                                     <td class="op-td">
                                         <div class="op-btn-box" >
                                             <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
                                         </div>
                                     </td>
+                                    <td style="display:none">${fileGistdata.fileFlag}</td>
+
                                 </tr>
                             <c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
                                 <tr class="file_gistdata_tr">
@@ -1020,15 +1063,25 @@
                         <tbody id="file_other">
                         <c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
                                 <tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-                                    <td style="display:none">${fileOther.id}</td>
+                                    <td style="display:none"><span class="foid">${fileOther.id}</span></td>
                                     <td style="display:none">${fileOther.mustFlag}</td>
-                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                                    <c:choose>
+                                        <c:when test="${fileOther.mustFlag == 1}">
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                                        </c:otherwise>
+                                    </c:choose>
+<%--                                    <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
                                     <td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
                                     <td class="op-td">
-                                    <div class="op-btn-box" >
-                                        <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-                                    </div>
-                                </td>
+                                        <div class="op-btn-box" >
+                                            <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                        </div>
+                                    </td>
+                                    <td style="display:none">${fileOther.fileFlag}</td>
+
                                 </tr>
                             <c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
                                 <tr class="file_other_tr">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp

@@ -129,7 +129,7 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">项目责人:</label>
+					<label class="layui-form-label">项目责人:</label>
 					<div class="layui-input-block">
 						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
 					</div>

+ 69 - 45
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -39,23 +39,30 @@
 					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 !=''){
-						$.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 (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("文件载入失败!");--%>
+						<%--});--%>
 					}
 					}
 				}
@@ -64,23 +71,30 @@
 					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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 						}
 					}
@@ -90,23 +104,30 @@
 					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 !=''){
-							$.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 (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("文件载入失败!");--%>
+							<%--});--%>
 						}
 						}
 					}
@@ -1068,6 +1089,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_attachment_tr">
@@ -1210,6 +1232,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_gistdata_tr">
@@ -1350,6 +1373,7 @@
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
 							</tr>
 							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
 								<tr class="file_other_tr">

+ 0 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectReportRecordView.jsp

@@ -217,10 +217,6 @@
 		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal">
 			<form:hidden path="id"/>
 			<form:hidden path="view"/>
-			<form:hidden path="numberCount"/>
-			<form:hidden id="reportId" path="report.id"/>
-			<form:hidden path="report.name"/>
-			<form:hidden path="report.project.id"/>
 			<input type="hidden" name="saveAuditFlag" value="1">
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>基本信息</h2></div>