|
@@ -0,0 +1,921 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>工作内容详情管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
|
|
|
+ <style>
|
|
|
+ #projectContentDataType-error{
|
|
|
+ left:0;
|
|
|
+ top:40px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $.fn.serializeJson=function(){
|
|
|
+ var serializeObj={};
|
|
|
+ var array=this.serializeArray();
|
|
|
+ var str=this.serialize();
|
|
|
+ $(array).each(function(){
|
|
|
+ if(serializeObj[this.name]){
|
|
|
+ if($.isArray(serializeObj[this.name])){
|
|
|
+ serializeObj[this.name].push(this.value);
|
|
|
+ }else{
|
|
|
+ serializeObj[this.name]=[serializeObj[this.name],this.value];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ serializeObj[this.name]=this.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return serializeObj;
|
|
|
+ };
|
|
|
+
|
|
|
+ var validateForm;
|
|
|
+ var detailFlag =0;
|
|
|
+ function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if(validateForm.form()){
|
|
|
+
|
|
|
+ var length = document.getElementById("file_monthly");
|
|
|
+ var rows = length.rows.length;
|
|
|
+ if(rows<=0){
|
|
|
+ layer.msg('请上传月报附件信息', {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ beforeSubmit();
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function beforeSubmit() {
|
|
|
+ var contentDetaStr = '';
|
|
|
+ var contentTypeId = $("#projectContentDataSign").val();
|
|
|
+ /*if(contentTypeId !=24){
|
|
|
+ if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
|
|
|
+ contentDetaStr += encodeURIComponent(genDetailStr());
|
|
|
+ }
|
|
|
+ if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
|
|
|
+ contentDetaStr += encodeURIComponent(genSecondDetailStr());
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ if(detailFlag==1){
|
|
|
+ $("#contentDeta").val(contentDetaStr);
|
|
|
+ }
|
|
|
+ $(document.getElementById("projectContentDataType")).removeAttr("disabled");
|
|
|
+ }
|
|
|
+
|
|
|
+ $(function() {
|
|
|
+ var editVal = '${projectcontentinfo.edit}';
|
|
|
+
|
|
|
+ if($("#createDate").val()==null || $("#createDate").val()==''){
|
|
|
+ $("#createDate").val(getNowFormatDate());
|
|
|
+ }
|
|
|
+ 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 tp = "${projectcontentinfo.dictType}";
|
|
|
+ var tp2 = "${projectcontentinfo.projectContentData.id}"
|
|
|
+ if((tp!=null && tp!='')||(tp2!=null && tp2!='')){
|
|
|
+ $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
|
|
|
+ }
|
|
|
+ initControlData("1");
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ });
|
|
|
+ $("#monthly_btn").click(function () {
|
|
|
+ $("#monthly_file").click();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ function openDialogre(title,url,width,height,formId){
|
|
|
+
|
|
|
+ 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,
|
|
|
+ skin: 'three-btns',
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
+ content: url ,
|
|
|
+ btn: ['提交','关闭'],
|
|
|
+ btn1: 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;
|
|
|
+ inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+ formSubmitAjax($document,formId,index);
|
|
|
+ },
|
|
|
+ btn2: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function formSubmitAjax($document,inputForm,index){
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(validateForm.form()){
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
+ success:function(data) {
|
|
|
+ if(!data.success){
|
|
|
+ top.layer.msg("保存依据资料信息异常!",{icon:2});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var idx = $("#workBaseDataList tr").length;
|
|
|
+ addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
|
|
|
+ parent.layer.msg(data.msg,{icon:1});
|
|
|
+ top.layer.close(index)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function getNowFormatDate() {
|
|
|
+ var date = new Date();
|
|
|
+ var seperator1 = "-";
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ var strDate = date.getDate();
|
|
|
+ month = (month < 10)?"0"+month:month;
|
|
|
+ strDate = (strDate < 10)?"0"+strDate:strDate;
|
|
|
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
|
|
|
+ return currentdate;
|
|
|
+ }
|
|
|
+
|
|
|
+ function accordingBtn(obj, prefix){
|
|
|
+ //var id = $(prefix+"_id").val();
|
|
|
+ $(prefix+"_file").click();
|
|
|
+ }
|
|
|
+
|
|
|
+ function insertAccording(tValue,idx,prefix) {
|
|
|
+ var files = $(prefix+"_file")[0].files;
|
|
|
+ for(var i=0;i<files.length;i++) {
|
|
|
+ var file = files[i];
|
|
|
+ var attachmentId = "";
|
|
|
+ var attachmentFlag = "132";
|
|
|
+ console.log(file);
|
|
|
+ var timestamp = new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
|
|
|
+ var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
|
|
|
+ /*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_attachment";
|
|
|
+ multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
|
|
|
+ }
|
|
|
+ $(prefix+"_file").val(123)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ function addFile() {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ }
|
|
|
+ function addMonthlyFile() {
|
|
|
+ $("#monthly_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 = "94";
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
|
|
|
+ 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 insertMonthlyTitle(tValue){
|
|
|
+ var files = $("#monthly_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
|
|
|
+ var monthlyId = "";
|
|
|
+ var monthlyFlag = "94";
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_monthly";
|
|
|
+ $("#addFile"+divId).show();
|
|
|
+ multipartUploadWithSts(storeAs, file,monthlyId,monthlyFlag,uploadPath,divId,0);}
|
|
|
+ }
|
|
|
+
|
|
|
+ function openDialogreControl(title,url,width,height,target){
|
|
|
+ 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,
|
|
|
+ skin: 'three-btns',
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
+ content: url ,
|
|
|
+ btn: ['提交','关闭'],
|
|
|
+ btn1: 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中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+ var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
|
|
|
+ formSubmit($document,"inputForm",index,index1);
|
|
|
+ },
|
|
|
+ btn2: function(index){
|
|
|
+ parent.layer.close(index)
|
|
|
+ },
|
|
|
+ end:function(index){
|
|
|
+ parent.layer.close(index)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function formSubmit($document,inputForm,index,index1){
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(validateForm.form()){
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
+ success:function(data) {
|
|
|
+ parent.parent.layer.msg("操作成功",{icon:1})
|
|
|
+ parent.parent.layer.close(index1)
|
|
|
+ parent.layer.close(index1)
|
|
|
+ parent.parent.layer.close(index)
|
|
|
+ parent.layer.close(index)
|
|
|
+ initGetControlData();
|
|
|
+ },error:function(){
|
|
|
+ parent.parent.layer.msg("操作失败",{icon:2})
|
|
|
+ parent.parent.layer.close(index1)
|
|
|
+ parent.layer.close(index1)
|
|
|
+ parent.parent.layer.close(index)
|
|
|
+ parent.layer.close(index)
|
|
|
+ initControlData("1");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ parent.parent.layer.msg("信息未填写完整!", {icon: 2});
|
|
|
+ parent.layer.close(index1)
|
|
|
+ parent.parent.layer.close(index1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 删除临时数据
|
|
|
+ */
|
|
|
+ function initControlData(obj,othis,del,tableId){
|
|
|
+ if(del == "del"){
|
|
|
+ proId = tableId;
|
|
|
+ }else{
|
|
|
+ proId = "";
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/projectcontroltable/projectControlTable/delControlData',
|
|
|
+ data:{
|
|
|
+ "projectId":"${projectcontentinfo.project.id}",
|
|
|
+ "projectContentId":proId,
|
|
|
+ "flag":del
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ if(obj != "1"){
|
|
|
+ if(data.flag){
|
|
|
+ //$(othis).parent().parent().parent().remove();
|
|
|
+ parent.layer.msg("数据删除成功",{icon:1})
|
|
|
+ $(othis).remove()
|
|
|
+ }else{
|
|
|
+ parent.layer.msg("数据删除失败",{icon:2})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function getMatchDate(str){
|
|
|
+ var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1]))/
|
|
|
+ var date = (""+str).match(reDateTime);
|
|
|
+ if(date){
|
|
|
+ return date[0]
|
|
|
+ }else{
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取临时数据
|
|
|
+ * @param obj
|
|
|
+ * @param othis
|
|
|
+ */
|
|
|
+ function initGetControlData(){
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/projectcontroltable/projectControlTable/getControlData',
|
|
|
+ data:{
|
|
|
+ "projectId":"${projectcontentinfo.project.id}",
|
|
|
+ "proId":"${projectcontentinfo.projectContentData.id}"
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ if(data){
|
|
|
+ var htmlStr = '';
|
|
|
+ data = data.list.projectControlTableList;
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
+ htmlStr += "<tr id='tr"+i+"'>"+
|
|
|
+ " <td style='text-align:center;'>"+
|
|
|
+ " "+data[i].tName+
|
|
|
+ " <input type='hidden' name='projectContentData.projectControlTableList["+i+"].id' value='"+data[i].id+"'>"+
|
|
|
+ " <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tName' value='"+data[i].tName+"'>"+
|
|
|
+ " <input type='hidden' name='projectContentData.projectControlTableList["+i+"].processName' value='"+data[i].processName+"'>"+
|
|
|
+ " <input type='hidden' name='projectContentData.projectControlTableList["+i+"].pfId' value='"+data[i].pfId+"'>"+
|
|
|
+ " </td>"+
|
|
|
+ " <td style='text-align:center;'>" +
|
|
|
+ " "+data[i].processName+
|
|
|
+ " <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tType' value='"+data[i].tType+"'>"+
|
|
|
+ " </td>"+
|
|
|
+ " <td style='text-align:center;'>"+
|
|
|
+ " "+data[i].tUser.name+
|
|
|
+ " </td>"+
|
|
|
+ " <td style='text-align:center;'>"+
|
|
|
+ " "+ getMatchDate(data[i].createDate)+
|
|
|
+ // " <input type='hidden' name='projectControlTableList["+i+"].createDate' value='"+data[i].createDate+"'>"+
|
|
|
+ // " <input type='hidden' name='projectControlTableList["+i+"].updateDate' value='"+data[i].updateDate+"'>"+
|
|
|
+ // " <input type='hidden' name='projectControlTableList["+i+"].delFlag' value='"+data[i].delFlag+"'>"+
|
|
|
+ // " <input type='hidden' name='projectControlTableList["+i+"].createBy.id' value='"+data[i].createBy.id+"'>"+
|
|
|
+ " </td>"+
|
|
|
+ " <td style='text-align:center;'>"+
|
|
|
+ " <a href='javascript:void(0)' onclick=\"openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?view=view&id="+data[i].id+"','90%', '90%')\" class='btn btn-info btn-xs' ><i class='fa fa-search-plus'></i> 查看</a>"+
|
|
|
+ " <a href=\"javascript:initControlData('0','#tr"+i+"','del','"+data[i].id+"')\" onclick=\"return confirmx('确认要删除该过程控制数据吗?', this.href)\" class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> 删除</a>"+
|
|
|
+ " </td>"+
|
|
|
+ "</tr>";
|
|
|
+ }
|
|
|
+ if(htmlStr){
|
|
|
+ $("#projectControlTables").html(htmlStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function formatNum(obj) {
|
|
|
+ var val = $(obj).val();
|
|
|
+ console.log("-----------val"+val);
|
|
|
+ if(!isNumber(val))return;
|
|
|
+ var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
|
|
|
+ var l = money.split(".")[0].split("").reverse(),
|
|
|
+ r = money.split(".")[1];
|
|
|
+ t = "";
|
|
|
+ for(i = 0; i < l.length; i ++ )
|
|
|
+ {
|
|
|
+ t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
|
|
|
+ }
|
|
|
+ $(obj).val(t.split("").reverse().join("") + "." + r);
|
|
|
+ }
|
|
|
+ function isNumber(val){
|
|
|
+ if(val === "" || val ==null){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
|
|
+ var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
|
|
|
+ if(regPos.test(val) || regNeg.test(val)){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ $(document).ready(function() {
|
|
|
+ laydate.render({
|
|
|
+ elem: '#monthlyDate',
|
|
|
+ event: 'focus',
|
|
|
+ type: 'month'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="single-form">
|
|
|
+ <div class="container${container}">
|
|
|
+ <form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/project/monthlyConsultationReport/save?view=content&condition=${flag}" 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="projectContentData.id"/>
|
|
|
+ <form:hidden path="projectContentData.contractId"/>
|
|
|
+ <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
|
|
|
+ <input type="hidden" id="dataBodyList" name="dataBodyList" value="">
|
|
|
+ <input type="hidden" id="projectContentDataSign" name="projectContentDataSign" value="">
|
|
|
+ <input type="hidden" id="modify" value="${modify}">
|
|
|
+ <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">项目名称:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="project.projectName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">项目编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="project.projectId" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">类型:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="projectContentData.type" value="按月出具跟踪咨询报告" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">月报内容编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="monthlyNumber" 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">
|
|
|
+ <form:input path="monthlyName" htmlEscape="false" class="form-control required 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">
|
|
|
+ <form:input path="projectContentData.master.name" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
|
|
|
+ <form:hidden path="projectContentData.master.id" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
|
|
|
+ </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="monthlyDate" name="monthlyDate" type="text" class="form-control layui-input required"
|
|
|
+ value="<fmt:formatDate value="${projectcontentinfo.monthlyDate}" pattern="yyyy-MM"/>"/>
|
|
|
+ </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="createDate" name="projectContentData.createDate" type="text" readonly="true" maxlength="20" class="form-control layui-input required"
|
|
|
+ value="<fmt:formatDate value="${createDate}" pattern="yyyy-MM-dd"/>"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>月报基本内容信息</h2></div>
|
|
|
+ <div class="layui-item layui-col-sm12 with-textarea">
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:textarea path="monthlyContent" htmlEscape="false" maxlength="1000" rows="6" class="form-control"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>依据性资料明细</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}&project.id=${projectcontentinfo.project.id}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
|
|
|
+
|
|
|
+ <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
|
|
|
+ cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
+ <table id="contentTableBase" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th class="hide"></th>
|
|
|
+ <th >资料编号</th>
|
|
|
+ <th >资料名称</th>
|
|
|
+ <th >资料类别</th>
|
|
|
+ <th >上传人</th>
|
|
|
+ <th >上传日期</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workBaseDataList">
|
|
|
+ <c:forEach items="${projectcontentinfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
|
|
|
+ <tr>
|
|
|
+ <td class="hide">
|
|
|
+ <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectBasedData.number}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectBasedData.name}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectBasedData.uploadUser.name}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td class="text-center op-td">
|
|
|
+ <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')" class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script type="text/template" id="workBaseDataTpl">//<!--
|
|
|
+ <tr id="budgetList{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
|
|
|
+ <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
|
|
|
+ <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
|
|
|
+ <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ {{row.number}}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ {{row.name}}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ {{row.typeLabel}}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ {{row.uploadUser.name}}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ {{row.uploadDate}}
|
|
|
+ </td>
|
|
|
+ <td class="text-center op-td">
|
|
|
+ <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')" class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
|
|
|
+ function setValuee(obj){
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
+ var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
|
+ if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
+ addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
+ workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function hasInArr(id,idArr) {
|
|
|
+ for(var i=0;i<idArr.length;i++){
|
|
|
+ if(id==$(idArr[i]).val()){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function existBaseData(id,length) {
|
|
|
+ for (var i=0;i<length;i++) {
|
|
|
+ var val = $('#workBaseDataList'+i+'_id').val();
|
|
|
+ if(id==val){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ function addRowBaseData(list, idx, tpl, row){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx);
|
|
|
+ }
|
|
|
+
|
|
|
+ function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
+ var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1, idx1:idx1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function delRowBaseData(obj, prefix,userId){
|
|
|
+ var id = $(prefix+"_id").val();
|
|
|
+ var currentUser = '${fns:getUser().id}';
|
|
|
+ var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
|
+ console.log(contentId);
|
|
|
+ var condition = "${flag}";
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
|
+ data:{"contentId":contentId,"basedId":id,"condition":condition},
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition ){
|
|
|
+ $(obj).parent().parent().parent().remove();
|
|
|
+ }else{
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }
|
|
|
+ if(data.body.inuse){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (currentUser == userId) {
|
|
|
+ confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ top.layer.msg("删除依据资料失败!", {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ function confirmDelete(mess, href){
|
|
|
+ top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
+ //do something
|
|
|
+ if (typeof href == 'function') {
|
|
|
+ href();
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ url:href,
|
|
|
+ type:"post",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success){
|
|
|
+ top.layer.msg("删除依据资料成功!", {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ top.layer.close(index);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <%--<div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>过程控制明细</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a href="javascript:void(0)" onclick="openDialogreControl('新增控制表格', '${ctx}/projectcontroltable/projectControlTable/form?pfId=${projectcontentinfo.project.id}','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
+ <table id="contentTable" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th >表格名称</th>
|
|
|
+ <th >表格类型</th>
|
|
|
+ <th >负责人</th>
|
|
|
+ <th >创建日期</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="projectControlTables">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${not empty projectcontentinfo.projectContentData.projectControlTableList}">
|
|
|
+ <c:forEach items="${projectcontentinfo.projectContentData.projectControlTableList}" var="projectControlTable" varStatus="status">
|
|
|
+ <tr id="tr${status.index}">
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectControlTable.tName}
|
|
|
+ <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].id" value="${projectControlTable.id}">
|
|
|
+ <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tName" value="${projectControlTable.tName}">
|
|
|
+ <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].pfId" value="${projectControlTable.pfId}">
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectControlTable.processName}
|
|
|
+ <input type="hidden" name="projectContentData.projectControlTableList[${status.index}].tType" value="${projectControlTable.tType}">
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ ${projectControlTable.tUser.name}
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <fmt:formatDate value="${projectControlTable.createDate}" pattern="yyyy-MM-dd" />
|
|
|
+ <%–<input type="hidden" name="projectControlTableList[${status.index}].createDate" value="${projectControlTable.createDate}">–%>
|
|
|
+ <%–<input type="hidden" name="projectControlTableList[${status.index}].updateDate" value="${projectControlTable.updateDate}">–%>
|
|
|
+ <%–<input type="hidden" name="projectControlTableList[${status.index}].delFlag" value="${projectControlTable.delFlag}">–%>
|
|
|
+ <%–<input type="hidden" name="projectControlTableList[${status.index}].createBy.id" value="${projectControlTable.createBy.id}">–%>
|
|
|
+ </td>
|
|
|
+ <td class="op-td text-center">
|
|
|
+ <div class="op-btn-box">
|
|
|
+ <a href="#" onclick="openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?id=${projectControlTable.id}&view=view','90%', '90%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
|
|
|
+ <a href="javascript:initControlData('0','#tr${status.index}','del','${projectControlTable.id}')" onclick="return confirmx('确认要删除该过程控制数据吗?', this.href)" class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <tr>
|
|
|
+ <td colspan="5" align="center">暂无数据</td>
|
|
|
+ </tr>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>--%>
|
|
|
+
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2><span class="require-item">*</span>月报附件信息</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a id="monthly_btn" class="nav-btn nav-btn-add" title="添加月报附件"><i class="fa fa-plus"></i> 添加月报附件</a>
|
|
|
+ <a class="nav-btn nav-btn-export" title="下载月报模板" onclick="window.location.href='${ctx}/project/monthlyConsultationReport/downloadTemplate';"><i class="fa fa-download"></i> 下载模板</a>
|
|
|
+ </div>
|
|
|
+ <div id="addFile_monthly" style="display: none" class="upload-progress">
|
|
|
+ <span id="fileName_monthly" ></span>
|
|
|
+ <b><span id="baifenbi_monthly" ></span></b>
|
|
|
+ <div class="progress">
|
|
|
+ <div id="jindutiao_monthly" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <input id="monthly_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertMonthlyTitle(this.value);"/>
|
|
|
+ <span id="monthly_title"></span>
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
+ <table id="upMonthlyTable" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>文件名称</th>
|
|
|
+ <th>上传人</th>
|
|
|
+ <th>上传时间</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_monthly">
|
|
|
+ <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workAttachment" varStatus="status">
|
|
|
+ <c:if test="${workAttachment.divIdType =='_monthly'}">
|
|
|
+ <tr>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
|
|
|
+ <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ <td>${workAttachment.createBy.name}</td>
|
|
|
+ <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
|
|
|
+ <td class="op-td">
|
|
|
+ <div class="op-btn-box" >
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+
|
|
|
+ <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workAttachment.url}&id=${workAttachment.id}&type=2','addMonthlyFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:if>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </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> 添加附件</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 width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_attachment">
|
|
|
+ <c:forEach items="${projectcontentinfo.projectContentData.workAttachments}" var = "workAttachment" varStatus="status">
|
|
|
+ <c:if test="${workAttachment.divIdType =='_attachment'}">
|
|
|
+ <tr>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
|
|
|
+ <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ <td>${workAttachment.createBy.name}</td>
|
|
|
+ <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
|
|
|
+ <td class="op-td">
|
|
|
+ <div class="op-btn-box" >
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+
|
|
|
+ <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workAttachment.url}&id=${workAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:if>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <c:if test="${projectcontentinfo.infoId !=null and projectcontentinfo.edit == 'edit'}">
|
|
|
+ <div class="pull-right">
|
|
|
+ <button id="btnSubmit" class="nav-btn nav-btn-add" type="submit" onclick="$('#edit').val('edit');beforeSubmit();"><i class="fa fa-chevron-up"></i> 提 交</button>
|
|
|
+ </div>
|
|
|
+ </c:if>
|
|
|
+ <div class="form-group layui-row page-end">
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+</body>
|
|
|
+</html>
|