瀏覽代碼

全过程文件

user5 3 年之前
父節點
當前提交
0c8e5ce412

+ 27 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/OverAllContentBasedInfo.java

@@ -0,0 +1,27 @@
+package com.jeeplus.modules.projectcontentinfo.entity;
+
+/**
+ * 工作内容和依据资料引用关联表
+ * @author: 徐滕
+ * @create: 2021-09-27 17:52
+ **/
+public class OverAllContentBasedInfo {
+    private String contentId;   //工作内容id
+    private String basedId;     //依据资料引用id
+
+    public String getContentId() {
+        return contentId;
+    }
+
+    public void setContentId(String contentId) {
+        this.contentId = contentId;
+    }
+
+    public String getBasedId() {
+        return basedId;
+    }
+
+    public void setBasedId(String basedId) {
+        this.basedId = basedId;
+    }
+}

+ 238 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectAchievementFileData.java

@@ -0,0 +1,238 @@
+package com.jeeplus.modules.projectcontentinfo.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 成果文件资料表
+ * @author: 徐滕
+ * @create: 2021-09-29 15:23
+ **/
+public class ProjectAchievementFileData extends DataEntity<ProjectAchievementFileData> {
+    private static final long serialVersionUID = 1L;
+    private String companyId;		// 公司id
+    private String officeId;		// 部门id
+    private String name;		// 资料名称
+    private String number;		// 资料编号
+    private String type;		// 资料类别
+    private String provider;		// 资料提供者
+    private Date provideDate;		// 提供日期
+    private ProjectRecords project;		// 项目id
+    private User uploadUser;		// 上传人
+    @JsonFormat(pattern="yyyy-MM-dd")
+    private Date uploadDate;		// 上传日期
+    private String nature;   //资料性质
+    private List<Workattachment> workAttachments;
+    private Date startDate;
+    private Date endDate;
+    private String typeLabel;
+
+    private String fileType;
+    private String fileName;
+    private String fileUrl;
+    private String temporaryUrl;		// 附件地址(临时地址)
+    private String fileAttachmentFlag;
+    private String fileAttachmentId;
+
+    private String flag;
+    private String chooseCondition;
+    private String dataCategories;	//资料类别
+
+    public String getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(String companyId) {
+        this.companyId = companyId;
+    }
+
+    public String getOfficeId() {
+        return officeId;
+    }
+
+    public void setOfficeId(String officeId) {
+        this.officeId = officeId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public Date getProvideDate() {
+        return provideDate;
+    }
+
+    public void setProvideDate(Date provideDate) {
+        this.provideDate = provideDate;
+    }
+
+    public ProjectRecords getProject() {
+        return project;
+    }
+
+    public void setProject(ProjectRecords project) {
+        this.project = project;
+    }
+
+    public User getUploadUser() {
+        return uploadUser;
+    }
+
+    public void setUploadUser(User uploadUser) {
+        this.uploadUser = uploadUser;
+    }
+
+    public Date getUploadDate() {
+        return uploadDate;
+    }
+
+    public void setUploadDate(Date uploadDate) {
+        this.uploadDate = uploadDate;
+    }
+
+    public String getNature() {
+        return nature;
+    }
+
+    public void setNature(String nature) {
+        this.nature = nature;
+    }
+
+    public List<Workattachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<Workattachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTypeLabel() {
+        return typeLabel;
+    }
+
+    public void setTypeLabel(String typeLabel) {
+        this.typeLabel = typeLabel;
+    }
+
+    public String getFileType() {
+        return fileType;
+    }
+
+    public void setFileType(String fileType) {
+        this.fileType = fileType;
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public String getFileUrl() {
+        return fileUrl;
+    }
+
+    public void setFileUrl(String fileUrl) {
+        this.fileUrl = fileUrl;
+    }
+
+    public String getTemporaryUrl() {
+        return temporaryUrl;
+    }
+
+    public void setTemporaryUrl(String temporaryUrl) {
+        this.temporaryUrl = temporaryUrl;
+    }
+
+    public String getFileAttachmentFlag() {
+        return fileAttachmentFlag;
+    }
+
+    public void setFileAttachmentFlag(String fileAttachmentFlag) {
+        this.fileAttachmentFlag = fileAttachmentFlag;
+    }
+
+    public String getFileAttachmentId() {
+        return fileAttachmentId;
+    }
+
+    public void setFileAttachmentId(String fileAttachmentId) {
+        this.fileAttachmentId = fileAttachmentId;
+    }
+
+    public String getFlag() {
+        return flag;
+    }
+
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    public String getChooseCondition() {
+        return chooseCondition;
+    }
+
+    public void setChooseCondition(String chooseCondition) {
+        this.chooseCondition = chooseCondition;
+    }
+
+    public String getDataCategories() {
+        return dataCategories;
+    }
+
+    public void setDataCategories(String dataCategories) {
+        this.dataCategories = dataCategories;
+    }
+}

+ 59 - 0
src/main/webapp/WEB-INF/tags/sys/gridselectAchievementData.tag

@@ -0,0 +1,59 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
+<%@ attribute name="name" type="java.lang.String" required="false" description="隐藏域名称(ID)"%>
+<%@ attribute name="value" type="java.lang.String" required="false" description="隐藏域值(ID)"%>
+<%@ attribute name="labelName" type="java.lang.String" required="false" description="输入框名称(Name)"%>
+<%@ attribute name="labelValue" type="java.lang.String" required="false" description="输入框值(Name)"%>
+<%@ attribute name="fieldLabels" type="java.lang.String" required="true" description="表格Th里显示的名字"%>
+<%@ attribute name="fieldKeys" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="searchLabel" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="searchKey" type="java.lang.String" required="true" description="表格Td里显示的值"%>
+<%@ attribute name="floorLabel" type="java.lang.String" required="false" description="表格Td里显示的值"%>
+<%@ attribute name="floorKey" type="java.lang.String" required="false" description="表格Td里显示的值"%>
+<%@ attribute name="housenumberLabel" type="java.lang.String" required="false" description="表格Td里显示的值"%>
+<%@ attribute name="housenumberKey" type="java.lang.String" required="false" description="表格Td里显示的值"%>
+<%@ attribute name="title" type="java.lang.String" required="true" description="选择框标题"%>
+<%@ attribute name="url" type="java.lang.String" required="true" description="数据地址"%>
+<%@ attribute name="projectId" type="java.lang.String" required="true" description="项目编号"%>
+<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script type="text/javascript">
+function searchGrid${id}(){
+    var uri = "${url}";
+	top.layer.open({
+	    type: 2,
+	    area: ['90%','90%'],
+	    title:"${title}",
+	    name:'friend',
+	    content: encodeURI(uri+"?project.id=${projectId}&fieldLabels=${fieldLabels}&fieldKeys=${fieldKeys}&url="+uri+"&searchLabel=${searchLabel}&searchKey=${searchKey}&floorLabel=${floorLabel}&floorKey=${floorKey}&housenumberLabel=${housenumberLabel}&housenumberKey=${housenumberKey}") ,
+	    btn: ['确定', '关闭'],
+	    yes: function(index, layero){
+	    	 var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+	    	 var item = iframeWin.getSelectedItem();
+            if(item.length > 1){
+                top.layer.alert('只能够选择一条数据!', {icon: 5, title:'警告'});
+                return ;
+            }
+	    	 if(item == "-1"){
+		    	 return;
+	    	 }
+
+			 top.layer.close(index);//关闭对话框。
+           	 setAchievementValuee(item);
+		  },
+		  cancel: function(index){
+	       }
+	});
+
+}
+</script>
+<div>
+<span class="input-group-btn">
+     <a href="javascript:void(0)" style="font-size:14px;" onclick="searchGrid${id}()" id="${id}Button" class="nav-btn nav-btn-add"><i class="fa fa-search-plus"></i>引用</a>
+    </span>
+</div>
+	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>

+ 394 - 0
src/main/webapp/webpage/modules/projectAccessory/workAttachmentOverAllForm.jsp

@@ -0,0 +1,394 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>收文管理管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+
+			return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			var attachmentFile = $("#file_attachment tr").length;
+			$("#fileCount").val(attachmentFile);
+			for(var i = 0 ; i<attachmentFile; i++){
+
+				let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
+				$("#"+val+"sort").val(i+1);
+			}
+
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+
+			//文件行拖拽功能
+			$("#upTable tbody").sortable({
+				helper: fixHelperModified,
+				stop: updateIndex,
+				update : function(event, ui){       //更新排序之后
+					var attachmentFile = $("#file_attachment tr").length;
+					for(var i = 0 ; i<attachmentFile; i++){
+						let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
+						if(val.indexOf("[") != -1){
+							var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
+							console.log($("#workAttachments"+number+"_sort").val())
+							$("#workAttachments"+number+"_sort").val(i+1);
+						}else{
+							$("#"+val+"sort").val(i+1);
+						}
+
+					}
+
+				}
+			}).disableSelection();
+		});
+
+		function insertTitle(tValue){
+			//文件后缀名
+			var attachTypes = $("#attachTypes").val();
+			console.log("attachTypes",attachTypes)
+			//文件大小
+			var attachLength = $("#attachLength").val();
+			var suffixResult = 0;
+
+			var fileName = tValue.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+			var fileNameLength = tValue.length;//获取到文件名长度
+
+			var suffix = tValue.substring(fileName + 1, fileNameLength);//截取后缀名
+			suffix = suffix.toLowerCase();//后缀名转换小写
+			attachTypes = attachTypes.toLowerCase();
+			if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
+				var attachTypeList = attachTypes.split(",");
+				for (var x in attachTypeList) {
+					if(attachTypeList[x] == suffix){
+						suffixResult = 1;
+						break;
+					}
+				}
+				if(suffixResult == 0 ){
+					top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+					return false;
+				}
+			}
+
+			var list = "${workIncomingMessage.workAttachments}";
+			var size = (list.split('url')).length-1;
+			var files = $("#attachment_file")[0].files;
+
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var fileSize = (file.size/(1024 * 1024)).toFixed(2);
+				if(attachLength !=undefined && attachLength != null && attachLength !='') {
+					if (parseFloat(fileSize) > parseFloat(attachLength)) {
+						top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+						return false;
+					}
+				}
+				var attachmentId = "";
+				var attachmentFlag = "100";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "workAttachment";
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile"+divId).show();
+				var fileCount = $("#fileCount").val();
+				$("#fileCount").val(parseInt(fileCount)+1);
+				multipartUploadWithStsOnProcessAccessory(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);}
+		}
+
+		function insertTitleCollection(tValue){
+			//文件后缀名
+			console.log(tValue);
+			var attachTypes =$("#attachTypes").val();
+			console.log(attachTypes);
+			//文件大小
+			var attachLength = $("#attachLength").val();
+			var suffixResult = 0;
+			for (var i=0;i<tValue.length;i++){
+				var fileName = tValue[i].fileName.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+				var fileNameLength = tValue[i].fileName.length;//获取到文件名长度
+				var suffix = tValue[i].fileName.substring(fileName + 1, fileNameLength);//截取后缀名
+				suffix = suffix.toLowerCase();//后缀名转换小写
+				attachTypes = attachTypes.toLowerCase();
+				if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
+					var attachTypeList = attachTypes.split(",");
+					for (var x in attachTypeList) {
+						if(attachTypeList[x] == suffix){
+							suffixResult = 1;
+							break;
+						}
+					}
+					if(suffixResult == 0 ){
+						top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+						return false;
+					}
+				}
+			}
+			var list = "${workIncomingMessage.workAttachments}";
+			var size = (list.split('url')).length-1;
+			var files = tValue;
+
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var fileSize = (file.fileSize/(1024 * 1024)).toFixed(2);
+				if(attachLength !=undefined && attachLength != null && attachLength !='') {
+					if (parseFloat(fileSize) > parseFloat(attachLength)) {
+						top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+						return false;
+					}
+				}
+				var attachmentId = "";
+				var attachmentFlag = "100";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "workAttachment";
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile"+divId).show();
+				var fileCount = $("#fileCount").val();
+				$("#fileCount").val(parseInt(fileCount)+1);
+				multipartUploadWithStsCollectionCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
+				//multipartUploadWithStsOnProcessAccessoryCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
+			}
+		}
+		function showfile(){
+			var length=$("#file_attachment tr").length;
+			var files=new Array();
+			for(var i=0;i<length;i++){
+				files[i]=$("#file_attachment").find("tr").eq(i).find("td").html();
+			}
+			return files;
+		}
+		function showfileXia(){
+			var length=$("#file_attachment tr").length;
+			var xia=new Array();
+			for(var i=0;i<length;i++){
+				xia[i]=$("#file_attachment").find("tr").eq(i).find("td").eq(3).find("span").html();
+			}
+			return xia;
+		}
+
+		//文件行拖拽方法
+		var fixHelperModified = function(e, tr) {
+			var $originals = tr.children();
+			var $helper = tr.clone();
+			$helper.children().each(function(index) {
+				$(this).width($originals.eq(index).width())
+			});
+			return $helper;
+		},
+
+		//文件行拖拽方法
+		updateIndex = function(e, ui) {
+			$('td.index', ui.item.parent()).each(function (i) {
+				$(this).html(i + 1);
+			});
+		};
+
+		function ceshi() {
+			alert(1);
+		}
+
+		function openInfo(id,value) {
+			console.log(id);
+			top.layer.open({
+				type: 2,
+				area: ['80%','65%'],
+				title:"意见",
+				name:'friend',
+				skin:"two-btns",
+				content: encodeURI("${ctx}/projectAccessory/projectAccessory/getDescription?auditOpinion="+value),
+				btn: ['确定', '关闭'],
+				yes: function(index, layero){
+					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var item = iframeWin.getSelectedItem();
+					console.log(item);
+					if(item == "-1"){
+						return;
+					}
+					var items = item.split('_item_');
+					console.log(items)
+					console.log(id)
+
+					$("#"+id+"_description").val(items[1]);
+					top.layer.close(index);//关闭对话框。
+				},
+				cancel: function(index){
+				}
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectTemplateInfo" action="${ctx}/projectAccessory/projectAccessory/saveWorkAttachmentOverAll" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="projectId"/>
+			<form:hidden path="attachTypes"/>
+			<form:hidden path="attachLength"/>
+			<input type="hidden" id="fileCount" value="">
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+					<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+									  name="linkman.id"  title="选择资料库"
+									  cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+									  searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">文件预览</th>
+							<th width="80px">上传人</th>
+							<th width="160px">上传时间</th>
+							<th width="30%" >文件描述</th>
+							<th width="200px">操作</th>
+							<th class="hide"></th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectTemplateInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr class="attachmentClass${status.index} trIdAdds">
+								<input type="hidden" id="workAttachments${status.index + 1}_" name="workAttachments${status.index + 1}_" value="${workClientAttachment.id}" />
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${projectTemplateInfo.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}"></td>
+													</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 style="padding:0px"><input id="workAttachments${status.index + 1}_description" name="workAttachments[${status.index + 1}].description" type="text" value="${workClientAttachment.description}"  class="form-control layui-input" placeholder="请输入文件描述" style="width: 100%;height: 100%;padding:0px;background-color: #FFFFFF;" readonly="true" onclick="openInfo('workAttachments${status.index + 1}',this.value)"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<span>
+										</span>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+										</c:if>
+										<c:choose>
+											<c:when test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:when>
+											<c:otherwise>
+												<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
+													<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+												</shiro:hasPermission>
+											</c:otherwise>
+										</c:choose>
+
+									</div>
+								</td>
+								<td class="hide">
+									<input id="workAttachments${status.index + 1}_id" name="workAttachments[${status.index + 1}].id" type="hidden" value="${workClientAttachment.id}"/>
+									<input id="workAttachments${status.index + 1}_sort" name="workAttachments[${status.index + 1}].sort" type="hidden" value="${workClientAttachment.sort}"/>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+<script>
+
+		function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize){
+		$.ajax({
+			type:"post",
+			url:url,
+			data: {"url":fileUrl,"type":"1","collectType":1,"collectUserId":uploadUserId,"fileSize":fileSize},
+			success:function(data){
+				if(data.success){
+					$(obj).hide()
+					//关闭当前页
+					top.layer.close(index)
+					parent.layer.msg(data.str,{icon:1});
+				}else {
+					parent.layer.msg(data.str,{icon:2});
+				}
+			}
+		});
+	}
+</script>
+</body>
+</html>

+ 387 - 0
src/main/webapp/webpage/modules/projectAccessory/workAttachmentOverAllView.jsp

@@ -0,0 +1,387 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>收文管理管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+
+			return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			var attachmentFile = $("#file_attachment tr").length;
+			$("#fileCount").val(attachmentFile);
+			for(var i = 0 ; i<attachmentFile; i++){
+
+				let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
+				$("#"+val+"sort").val(i+1);
+			}
+
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+
+			//文件行拖拽功能
+			$("#upTable tbody").sortable({
+				helper: fixHelperModified,
+				stop: updateIndex,
+				update : function(event, ui){       //更新排序之后
+					var attachmentFile = $("#file_attachment tr").length;
+					for(var i = 0 ; i<attachmentFile; i++){
+						let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
+						if(val.indexOf("[") != -1){
+							var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
+							console.log($("#workAttachments"+number+"_sort").val())
+							$("#workAttachments"+number+"_sort").val(i+1);
+						}else{
+							$("#"+val+"sort").val(i+1);
+						}
+
+					}
+
+				}
+			}).disableSelection();
+		});
+
+		function insertTitle(tValue){
+			//文件后缀名
+			var attachTypes = $("#attachTypes").val();
+			console.log("attachTypes",attachTypes)
+			//文件大小
+			var attachLength = $("#attachLength").val();
+			var suffixResult = 0;
+
+			var fileName = tValue.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+			var fileNameLength = tValue.length;//获取到文件名长度
+
+			var suffix = tValue.substring(fileName + 1, fileNameLength);//截取后缀名
+			suffix = suffix.toLowerCase();//后缀名转换小写
+			attachTypes = attachTypes.toLowerCase();
+			if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
+				var attachTypeList = attachTypes.split(",");
+				for (var x in attachTypeList) {
+					if(attachTypeList[x] == suffix){
+						suffixResult = 1;
+						break;
+					}
+				}
+				if(suffixResult == 0 ){
+					top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+					return false;
+				}
+			}
+
+			var list = "${workIncomingMessage.workAttachments}";
+			var size = (list.split('url')).length-1;
+			var files = $("#attachment_file")[0].files;
+
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var fileSize = (file.size/(1024 * 1024)).toFixed(2);
+				if(attachLength !=undefined && attachLength != null && attachLength !='') {
+					if (parseFloat(fileSize) > parseFloat(attachLength)) {
+						top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+						return false;
+					}
+				}
+				var attachmentId = "";
+				var attachmentFlag = "100";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "workAttachment";
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile"+divId).show();
+				var fileCount = $("#fileCount").val();
+				$("#fileCount").val(parseInt(fileCount)+1);
+				multipartUploadWithStsOnProcessAccessory(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);}
+		}
+
+		function insertTitleCollection(tValue){
+			//文件后缀名
+			console.log(tValue);
+			var attachTypes =$("#attachTypes").val();
+			console.log(attachTypes);
+			//文件大小
+			var attachLength = $("#attachLength").val();
+			var suffixResult = 0;
+			for (var i=0;i<tValue.length;i++){
+				var fileName = tValue[i].fileName.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
+				var fileNameLength = tValue[i].fileName.length;//获取到文件名长度
+				var suffix = tValue[i].fileName.substring(fileName + 1, fileNameLength);//截取后缀名
+				suffix = suffix.toLowerCase();//后缀名转换小写
+				attachTypes = attachTypes.toLowerCase();
+				if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
+					var attachTypeList = attachTypes.split(",");
+					for (var x in attachTypeList) {
+						if(attachTypeList[x] == suffix){
+							suffixResult = 1;
+							break;
+						}
+					}
+					if(suffixResult == 0 ){
+						top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
+						return false;
+					}
+				}
+			}
+			var list = "${workIncomingMessage.workAttachments}";
+			var size = (list.split('url')).length-1;
+			var files = tValue;
+
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var fileSize = (file.fileSize/(1024 * 1024)).toFixed(2);
+				if(attachLength !=undefined && attachLength != null && attachLength !='') {
+					if (parseFloat(fileSize) > parseFloat(attachLength)) {
+						top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
+						return false;
+					}
+				}
+				var attachmentId = "";
+				var attachmentFlag = "100";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "workAttachment";
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile"+divId).show();
+				var fileCount = $("#fileCount").val();
+				$("#fileCount").val(parseInt(fileCount)+1);
+				multipartUploadWithStsCollectionCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
+				//multipartUploadWithStsOnProcessAccessoryCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
+			}
+		}
+		function showfile(){
+			var length=$("#file_attachment tr").length;
+			var files=new Array();
+			for(var i=0;i<length;i++){
+				files[i]=$("#file_attachment").find("tr").eq(i).find("td").html();
+			}
+			return files;
+		}
+		function showfileXia(){
+			var length=$("#file_attachment tr").length;
+			var xia=new Array();
+			for(var i=0;i<length;i++){
+				xia[i]=$("#file_attachment").find("tr").eq(i).find("td").eq(3).find("span").html();
+			}
+			return xia;
+		}
+
+		//文件行拖拽方法
+		var fixHelperModified = function(e, tr) {
+			var $originals = tr.children();
+			var $helper = tr.clone();
+			$helper.children().each(function(index) {
+				$(this).width($originals.eq(index).width())
+			});
+			return $helper;
+		},
+
+		//文件行拖拽方法
+		updateIndex = function(e, ui) {
+			$('td.index', ui.item.parent()).each(function (i) {
+				$(this).html(i + 1);
+			});
+		};
+
+		function ceshi() {
+			alert(1);
+		}
+
+		function openInfo(id,value) {
+			console.log(id);
+			top.layer.open({
+				type: 2,
+				area: ['80%','65%'],
+				title:"意见",
+				name:'friend',
+				skin:"two-btns",
+				content: encodeURI("${ctx}/projectAccessory/projectAccessory/getDescription?auditOpinion="+value),
+				btn: ['确定', '关闭'],
+				yes: function(index, layero){
+					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var item = iframeWin.getSelectedItem();
+					console.log(item);
+					if(item == "-1"){
+						return;
+					}
+					var items = item.split('_item_');
+					console.log(items)
+					console.log(id)
+
+					$("#"+id+"_description").val(items[1]);
+					top.layer.close(index);//关闭对话框。
+				},
+				cancel: function(index){
+				}
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectTemplateInfo" action="${ctx}/projectAccessory/projectAccessory/saveWorkAttachmentOverAll" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="projectId"/>
+			<form:hidden path="attachTypes"/>
+			<form:hidden path="attachLength"/>
+			<input type="hidden" id="fileCount" value="">
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">文件预览</th>
+							<th width="80px">上传人</th>
+							<th width="160px">上传时间</th>
+							<th width="30%" >文件描述</th>
+							<th width="200px">操作</th>
+							<th class="hide"></th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectTemplateInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr class="attachmentClass${status.index} trIdAdds">
+								<input type="hidden" id="workAttachments${status.index + 1}_" name="workAttachments${status.index + 1}_" value="${workClientAttachment.id}" />
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${projectTemplateInfo.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}"></td>
+													</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 style="padding:0px">${workClientAttachment.description}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<span>
+										</span>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+										</c:if>
+										<c:choose>
+											<c:when test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:when>
+											<c:otherwise>
+												<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
+													<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+												</shiro:hasPermission>
+											</c:otherwise>
+										</c:choose>
+
+									</div>
+								</td>
+								<td class="hide">
+									<input id="workAttachments${status.index + 1}_id" name="workAttachments[${status.index + 1}].id" type="hidden" value="${workClientAttachment.id}"/>
+									<input id="workAttachments${status.index + 1}_sort" name="workAttachments[${status.index + 1}].sort" type="hidden" value="${workClientAttachment.sort}"/>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+<script>
+
+		function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize){
+		$.ajax({
+			type:"post",
+			url:url,
+			data: {"url":fileUrl,"type":"1","collectType":1,"collectUserId":uploadUserId,"fileSize":fileSize},
+			success:function(data){
+				if(data.success){
+					$(obj).hide()
+					//关闭当前页
+					top.layer.close(index)
+					parent.layer.msg(data.str,{icon:1});
+				}else {
+					parent.layer.msg(data.str,{icon:2});
+				}
+			}
+		});
+	}
+</script>
+</body>
+</html>

+ 246 - 0
src/main/webapp/webpage/modules/projectcontentinfo/achievementFileDataForm.jsp

@@ -0,0 +1,246 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>成果文件管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
+	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
+	<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js"></script>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            if (${not empty projectcontentinfo.projectAchievementFileData.type}){
+                $("#type").attr("readOnly","true");
+            }
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#provideDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "85";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "basedData";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+			multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,"0");}
+        }
+
+        function setValuee(obj){
+            var divId = "_attachment";
+            quoteFile(obj,divId);
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container${container}">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/projectcontentinfo/projectcontentinfo/save?view=achievementFileData" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="edit"/>
+			<form:hidden path="parentIds"/>
+			<form:hidden path="project.id"/>
+			<form:hidden path="projectContentDataNewId"/>
+			<form:hidden path="projectAchievementFileData.id"/>
+			<sys:message content="${message}"/>
+
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>资料名称:</label>
+					<div class="layui-input-block with-icon">
+						<form:input  path="projectAchievementFileData.name" htmlEscape="false"  class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">资料编号:</label>
+					<div class="layui-input-block">
+						<form:input  path="projectAchievementFileData.number" htmlEscape="false"   readonly="true" class="form-control layui-input "/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>提供日期:</label>
+					<div class="layui-input-block">
+						<input id="provideDate" name="projectAchievementFileData.provideDate" type="text" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectcontentinfo.projectAchievementFileData.provideDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">上传日期:</label>
+					<div class="layui-input-block">
+						<input id="uploadDate" name="projectAchievementFileData.uploadDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectcontentinfo.projectAchievementFileData.uploadDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">上传人:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectcontentinfo.projectAchievementFileData.uploadUser.name}"/>
+						<form:input  path="projectAchievementFileData.uploadUser.id" type="hidden" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<%--<th>是否引用成果文件</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectAchievementFileData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${projectcontentinfo.projectAchievementFileData.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}1</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}2</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+
+								<td>
+									<input type="hidden" name="workClientAttachment.quoteResult" value="${workClientAttachment.quoteResult}">
+									${workClientAttachment.createBy.name}
+								</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+											<%--附件下载删除--%>
+										<c:choose>
+											<c:when test="${projectcontentinfo.projectAchievementFileData.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:when>
+													<c:otherwise>
+														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											</c:otherwise>
+										</c:choose>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<c:if test="${workClientAttachment.quoteResult==1}">
+												<a href="javascript:void(0)" onclick="quoteDeleteFileFromAliyun(this,'${ctx}/projectcontentinfo/projectBasedData/deleteBasedDataAndWorkAttachment?basedDataId=${projectcontentinfo.projectAchievementFileData.id}&workAttachmentId=${workClientAttachment.id}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:if>
+											<c:if test="${workClientAttachment.quoteResult==0}">
+												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile','')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:if>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>