Explorar o código

总审代办(项目计划页签)

[user3] %!s(int64=4) %!d(string=hai) anos
pai
achega
e225f7a15d

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

@@ -2507,6 +2507,7 @@ public class WorkProjectNotifyController extends BaseController {
 							projectcontentinfo.setChargeCriterionList(chargeCriterionList);
 						}
 					}
+					RuralProjectRecords projectRecordPlans=this.planView(projectcontentinfo.getProject().getId());
 					model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
 					model.addAttribute("projectId", projectcontentinfo.getProject().getId());
 					model.addAttribute("id", projectcontentinfo.getId());
@@ -2516,6 +2517,7 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("consultantCount", consultants.size());
 					model.addAttribute("subProjectInfos", subProjectInfos);
 					model.addAttribute("workContractInfo", workContractInfo);
+					model.addAttribute("projectRecordPlans", projectRecordPlans);
 					WorkReviewAudit workReviewAudit = new WorkReviewAudit();
 					String type = "";
 					if ("master".equals(act.getTaskDefKey())) {
@@ -4714,6 +4716,49 @@ public class WorkProjectNotifyController extends BaseController {
 		WorkContractInfo workContractInfo = workContractInfoService.get(projectRecords.getWorkContractInfo().getId());
 		return workContractInfo;
 	}
-
+	//获取项目计划
+	public RuralProjectRecords planView(String projectId) {
+		//获取项目信息
+		//如果没有id则为新增 添加创建人信息和当前创建时间信息
+		RuralProjectRecords projectRecords=new RuralProjectRecords();
+		if (StringUtils.isNotBlank(projectId)) {
+			//projectRecords = ruralProjectRecordsService.get(projectRecords.getId());
+			projectRecords = ruralProjectRecordsService.getMasters(projectId);
+		}else {
+			projectRecords.setCreateBy(UserUtils.getUser());
+			projectRecords.setCreateDate(new Date());
+		}
+		ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+		//将项目id放入项目计划表中
+		projectPlanInfo.setProjectId(projectRecords.getId());
+		//获取项目计划信息
+		List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+		if(projectPlanList.size() == 0){
+			//获取项目计划信息
+			List<MainDictDetail> mainDictList = DictUtils.getMainDictList("projectPlan");
+			if(mainDictList.size()>0){
+				for (MainDictDetail mainDict : mainDictList) {
+					ProjectPlanInfo projectPlan = new ProjectPlanInfo();
+					projectPlan.setProjectStage(mainDict.getLabel());
+					//将项目负责人添加到展示栏
+					if(null != projectRecords.getProjectLeaders()) {
+						projectPlan.setRemindName(projectRecords.getProjectLeaders().get(0).getName());
+						projectPlan.setRemindId(projectRecords.getProjectLeaders().get(0).getId());
+					}
+					//将项目等级人信息添加到完成人控件中
+					User user = UserUtils.get(projectRecords.getCreateBy().getId());
+					projectPlan.setFinishId(user.getId());
+					projectPlan.setFinishName(user.getName());
+					projectPlanList.add(projectPlan);
+				}
+			}
+		}
+		//获取 项目计划附件信息
+		List<WorkClientAttachment> workAttachmentList = projectPlanService.getWorkAttachment(projectRecords.getId());
+		projectRecords.setProjectPlanList(projectPlanList);
+		projectRecords.setWorkAttachments(workAttachmentList);
+		projectRecords.setUploadMode(uploadMode);
+		return projectRecords;
+	}
 
 }

+ 153 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp

@@ -142,7 +142,6 @@
                 }
             });
         }
-
 	</script>
 </head>
 <body >
@@ -186,6 +185,7 @@
 							<li><a>子项目列表</a><span class="hide">subProjectInfo</span></li>
 							<li><a>合同信息</a><span class="hide">workContractInfo</span></li>
 							<li><a>客户信息</a><span class="hide">workClientInfo</span></li>
+							<li><a>项目计划信息</a><span class="hide">planView</span></li>
 						</ul>
 					</div>
 				</div>
@@ -875,7 +875,7 @@
 								<div class="form-group-label"><h2><span class="require-item">*</span>项目组成员</h2></div>
 								<div class="layui-item layui-col-sm12 lw6">
 									<div class="layui-item nav-btns">
-										<table id="bankinfo" class="table table-bordered table-condensed can-edit">
+										<table id="bankinfo1" class="table table-bordered table-condensed can-edit">
 											<thead>
 											<tr>
 												<th width="60px">编号</th>
@@ -1287,7 +1287,7 @@
 									<label class="layui-form-label">开户行信息:</label>
 									<div class="layui-input-block">
 
-										<table id="bankinfo" class="table table-bordered table-condensed details">
+										<table id="bankinfo2" class="table table-bordered table-condensed details">
 											<thead>
 											<tr>
 												<th width="80px">序号</th>
@@ -1361,6 +1361,156 @@
 						</c:otherwise>
 					</c:choose>
 				</div>
+				<div class="form-group layui-row first hide" id="planView">
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>项目计划信息</h2></div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.projectName}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block">
+								<div class="input-group">
+									<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.projectId}"/>
+								</div>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">创建人:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordPlans.createBy.name}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label">创建日期:</label>
+							<div class="layui-input-block">
+								<input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecordPlans.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+							</div>
+						</div>
+					</div>
+
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>项目计划列表</h2></div>
+						<div class="layui-item layui-col-sm12 lw7">
+							<div class="layui-item nav-btns">
+								<table id="bankinfo3" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th >任务阶段</th>
+										<th >计划开始时间</th>
+										<th >计划结束时间</th>
+										<th >提醒人</th>
+										<th >完成人</th>
+									</tr>
+									</thead>
+									<tbody id="projectPlanList">
+										<c:forEach items="${projectRecordPlans.projectPlanList}" var="plan">
+											<tr>
+												<td>
+													<input readonly="readonly" value="${plan.projectStage}" type="text" class="form-control contentDetail"/>
+												</td>
+
+												<td>
+													<input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" readonly="readonly" type="text" value="${plan.beginDate}"  class="form-control required datetime"/>
+												</td>
+												<td>
+													<input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off"  readonly="readonly"  type="text" value="${plan.endDate}"  class="form-control required datetime"/>
+												</td>
+
+												<td>
+													<input readonly="readonly" style="text-align: center"  value="${plan.remindName}" type="text" class="form-control contentDetail"/>
+												</td>
+
+												<td>
+													<input readonly="readonly" style="text-align: center"  value="${plan.finishName}" type="text" class="form-control contentDetail"/>
+												</td>
+											</tr>
+										</c:forEach>
+									</tbody>
+								</table>
+							</div>
+						</div>
+					</div>
+
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>项目计划附件信息</h2></div>
+						<div class="layui-item layui-col-xs12 form-table-container">
+							<table id="listAttachment" class="table table-bordered table-condensed details">
+								<thead>
+								<tr>
+										<%-- <th>序号</th>--%>
+									<th width="25%">文件</th>
+									<th width="25%">上传人</th>
+									<th width="25%">上传时间</th>
+									<th width="150px">操作</th>
+								</tr>
+								</thead>
+								<tbody id="file_attachment1">
+								<c:forEach items="${projectRecordPlans.workAttachments}" var = "workClientAttachment" varStatus="status">
+									<tr class="trIdAdds">
+											<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${projectRecordPlans.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+
+										<td>${workClientAttachment.createBy.name}</td>
+										<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+										<td class="op-td">
+											<div class="op-btn-box" >
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											</div>
+										</td>
+									</tr>
+								</c:forEach>
+								</tbody>
+							</table>
+						</div>
+					</div>
+				</div>
 			</div>
 			<%--<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>咨询质量控制信息</h2></div>