Browse Source

Merge remote-tracking branch 'origin/master'

user7 4 years ago
parent
commit
980bf0506f

+ 2 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/Early/ProjectEarlyReviewController.java

@@ -252,6 +252,8 @@ public class ProjectEarlyReviewController extends BaseController {
         model.addAttribute("achievementParentId", projectReportData.getType());
         model.addAttribute("achievementParentId", projectReportData.getType());
         model.addAttribute("achievementId", projectReportData.getAchievementType());
         model.addAttribute("achievementId", projectReportData.getAchievementType());
         model.addAttribute("reviewStandard", projectReportData.getReviewStandard());
         model.addAttribute("reviewStandard", projectReportData.getReviewStandard());
+        model.addAttribute("projectId", projectcontentinfo.getProject().getId());
+        model.addAttribute("reportType", projectcontentinfo.getReportType());
         if (projectcontentinfo.getView().equals("reportView")){
         if (projectcontentinfo.getView().equals("reportView")){
             return "modules/projectcontentinfo/reportView";
             return "modules/projectcontentinfo/reportView";
         }else if (projectcontentinfo.getView().equals("reportChange")) {
         }else if (projectcontentinfo.getView().equals("reportChange")) {

+ 10 - 2
src/main/java/com/jeeplus/modules/projectreportnum/web/ProjectReportNumController.java

@@ -121,8 +121,16 @@ public class ProjectReportNumController extends BaseController {
 				if(treeData.getPid().equals("0")){
 				if(treeData.getPid().equals("0")){
 					listNum.add(treeData);
 					listNum.add(treeData);
 				}else{
 				}else{
-					String n=treeData.getNum().split("-")[1];
-					if(n.equals(projectTypeId)){
+					String typeId=treeData.getNum().split("-")[1];
+					if(typeId.equals(projectTypeId)){
+						List<WorkClientAttachment> workClientAttachmentList = projectResultsFileTemplateService.getWorkClientAttachmentList(typeId);
+						if(null != workClientAttachmentList){
+							for (WorkClientAttachment workClientAttachment: workClientAttachmentList) {
+								treeData.setUrl(workClientAttachment.getUrl());
+							}
+							treeData.setCount(workClientAttachmentList.size());
+							treeData.setType(typeId);
+						}
 						listNum.add(treeData);
 						listNum.add(treeData);
 					}
 					}
 				}
 				}

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/implementEarly/projectEarlyReviewList.jsp

@@ -431,7 +431,7 @@
 						].join('');
 						].join('');
 					}else if(d.status == null || d.status == '' || d.status == 10){
 					}else if(d.status == null || d.status == '' || d.status == 10){
 						return [
 						return [
-							'<a href="javascript:void(0)" onclick="openDialogres(\'复核\', \'${ctx}/project/projectEarlyReview/reviewForm?view=report&condition=according&dictType='+d.dictType+'&project.id='+d.pid+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'&projectId='+d.projectId+ '\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-plus"></i> 复核</a>',
+							'<a href="javascript:void(0)" onclick="openDialogres(\'复核\', \'${ctx}/project/projectEarlyReview/reviewForm?view=report&condition=according&dictType='+d.dictType+'&reportType=${reportType}&project.id='+d.pid+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'&projectId='+d.projectId+ '\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-plus"></i> 复核</a>',
 						].join('');
 						].join('');
 					}else{
 					}else{
 						return[''].join('');
 						return[''].join('');

+ 11 - 10
src/main/webapp/webpage/modules/projectreportnum/projectReportNumList.jsp

@@ -135,17 +135,18 @@
 						"<a href=\"${ctx}/workfullmanage/workFullManage/downLoadAttach?file=" +encodeURIComponent(encodeURIComponent( d.url ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
 						"<a href=\"${ctx}/workfullmanage/workFullManage/downLoadAttach?file=" +encodeURIComponent(encodeURIComponent( d.url ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
 						/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
 						/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
 					].join('');
 					].join('');
-				}else
-				if(d.count >1){
-					return[
-						"<a href=\"javascript:void(0)\" onclick=\"downloadFile('选择报告模板','${ctx}/projectreportnum/projectReportNum/skipTemplateForm?reportType=${reportType}&num="+d.num+"&type="+d.type+"','80%', '80%');\" class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
-						/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
-					].join('');
-				}
-				else{
-					return[
+				}else{
+					if(d.count >1){
+						return[
+							"<a href=\"javascript:void(0)\" onclick=\"downloadFile('选择报告模板','${ctx}/projectreportnum/projectReportNum/skipTemplateForm?reportType=${reportType}&num="+d.num+"&type="+d.type+"','80%', '80%');\" class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
+							/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
+						].join('');
+					}
+					else{
+						return[
 
 
-					].join('');
+						].join('');
+					}
 				}
 				}
 			}
 			}
 		}
 		}

+ 59 - 3
src/main/webapp/webpage/modules/projectreportnum/projectReportNumSel.jsp

@@ -125,9 +125,25 @@
 					"<a href=\"javascript:void(0)\" onclick=\"reportNumOnStage('阶段报告号新增','${ctx}/projectreportnum/projectReportNum/getProjectReportNumStageForm?num="+d.num+"&parentId="+d.id+"projectId=${projectId}&reportType=${reportType}','70%', '50%');\" class=\"op-btn op-btn-edit\"><i class=\"fa fa-edit\"></i> 添加阶段报告号</a>"
 					"<a href=\"javascript:void(0)\" onclick=\"reportNumOnStage('阶段报告号新增','${ctx}/projectreportnum/projectReportNum/getProjectReportNumStageForm?num="+d.num+"&parentId="+d.id+"projectId=${projectId}&reportType=${reportType}','70%', '50%');\" class=\"op-btn op-btn-edit\"><i class=\"fa fa-edit\"></i> 添加阶段报告号</a>"
 				].join('');
 				].join('');
 			}else{
 			}else{
-				return[
-					""
-				].join('');
+
+				if(d.count ==1){
+					return[
+						"<a href=\"${ctx}/workfullmanage/workFullManage/downLoadAttach?file=" +encodeURIComponent(encodeURIComponent( d.url ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
+						/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
+					].join('');
+				}else{
+					if(d.count >1){
+						return[
+							"<a href=\"javascript:void(0)\" onclick=\"downloadFile('选择报告模板','${ctx}/projectreportnum/projectReportNum/skipTemplateForm?reportType=${reportType}&num="+d.num+"&type="+d.type+"','80%', '80%');\" class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
+							/*"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"*/
+						].join('');
+					}
+					else{
+						return[
+
+						].join('');
+					}
+				}
 			}
 			}
 		}
 		}
 	});
 	});
@@ -196,6 +212,46 @@
 			}
 			}
 		});
 		});
 	}
 	}
+
+	function downloadFile(title,url,width,height,target){
+		var company=$("#company").val();
+		url=url+"&company="+company;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			skin:"two-btns",
+			btn: ['下载', '关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			cancel: function(index){
+			}
+		});
+
+	}
 </script>
 </script>
 
 
 <script>
 <script>