|
@@ -28,12 +28,11 @@
|
|
|
}
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
- var validateForm;
|
|
|
+ var validateForm;
|
|
|
function listTr(obj){
|
|
|
var name=$(obj).attr("id");
|
|
|
var tiao="."+name;
|
|
|
var span=$(obj).find("td").eq(2);
|
|
|
- // var ss=$(span).val().split(" ")[4];
|
|
|
$(span).toggle(function () {
|
|
|
$(tiao).hide();
|
|
|
$(span).find("span").eq(0).attr("class","default_shut")
|
|
@@ -42,140 +41,94 @@
|
|
|
$(span).find("span").eq(0).attr("class","default_open")
|
|
|
});
|
|
|
}
|
|
|
- function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
- if(validateForm.form()){
|
|
|
+ function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if(validateForm.form()){
|
|
|
var projectId = '${project.id}';
|
|
|
var boolFlag = true;
|
|
|
- if(obj == 2){
|
|
|
- //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
|
|
|
- $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
|
|
|
- }else{
|
|
|
- var leng = $("#file_attachment tr").length;
|
|
|
- for(var i=0; i<leng; i++) {
|
|
|
- var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
|
|
|
- var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
|
|
|
- var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
|
|
|
+ if(obj == 2){
|
|
|
+ $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
|
|
|
+ }else{
|
|
|
+ var leng = $("#file_attachment tr").length;
|
|
|
+ for(var i=0; i<leng; i++) {
|
|
|
+ var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
|
|
|
+ var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
|
|
|
+ var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
|
|
|
+ if(second == 1){
|
|
|
+ if(numberStr != undefined && numberStr !=null && numberStr !=''){
|
|
|
+ if (fileFlag==1){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ top.layer.msg("请上传成果文件!", {icon: 0});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(boolFlag){
|
|
|
+ var gistdata = $("#file_gistdata tr").length;
|
|
|
+ for(var i=0; i<gistdata; i++) {
|
|
|
+ var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
|
|
|
+ var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
|
|
|
+ var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
|
|
|
if(second == 1){
|
|
|
if(numberStr != undefined && numberStr !=null && numberStr !=''){
|
|
|
if (fileFlag==1){
|
|
|
|
|
|
}else{
|
|
|
- top.layer.msg("请上传成果文件!", {icon: 0});
|
|
|
+ top.layer.msg("请上传依据性文件!", {icon: 0});
|
|
|
return false;
|
|
|
}
|
|
|
- <%--$.ajax({--%>
|
|
|
- <%-- type: 'post',--%>
|
|
|
- <%-- url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
|
|
|
- <%-- data: {"attachmentId":numberStr,"projectId":projectId},--%>
|
|
|
- <%-- dataType: "json",--%>
|
|
|
- <%-- async: false--%>
|
|
|
- <%--}).success(function (result) {--%>
|
|
|
- <%-- if(result == 0){--%>
|
|
|
- <%-- boolFlag = false;--%>
|
|
|
- <%-- top.layer.msg("请上传成果文件!", {icon: 0});--%>
|
|
|
- <%-- return false;--%>
|
|
|
- <%-- }--%>
|
|
|
- <%--}).error(function () {--%>
|
|
|
- <%-- top.layer.msg("文件载入失败!");--%>
|
|
|
- <%--});--%>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(boolFlag){
|
|
|
- var gistdata = $("#file_gistdata tr").length;
|
|
|
- for(var i=0; i<gistdata; i++) {
|
|
|
- var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
|
|
|
- var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
|
|
|
- var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
|
|
|
- if(second == 1){
|
|
|
- if(numberStr != undefined && numberStr !=null && numberStr !=''){
|
|
|
- if (fileFlag==1){
|
|
|
-
|
|
|
- }else{
|
|
|
- top.layer.msg("请上传依据性文件!", {icon: 0});
|
|
|
- return false;
|
|
|
- }
|
|
|
- <%--$.ajax({--%>
|
|
|
- <%-- type: 'post',--%>
|
|
|
- <%-- url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
|
|
|
- <%-- data: {"attachmentId":numberStr,"projectId":projectId},--%>
|
|
|
- <%-- dataType: "json",--%>
|
|
|
- <%-- async: false--%>
|
|
|
- <%--}).success(function (result) {--%>
|
|
|
- <%-- if(result == 0){--%>
|
|
|
- <%-- boolFlag = false;--%>
|
|
|
- <%-- top.layer.msg("请上传依据性文件!", {icon: 0});--%>
|
|
|
- <%-- return false;--%>
|
|
|
- <%-- }--%>
|
|
|
- <%--}).error(function () {--%>
|
|
|
- <%-- top.layer.msg("文件载入失败!");--%>
|
|
|
- <%--});--%>
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if(boolFlag){
|
|
|
- var other = $("#file_other tr").length;
|
|
|
- for(var i=0; i<other; i++) {
|
|
|
- var numberStr = $("#file_other tr").eq(i).find("td:first").html();
|
|
|
- var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
|
|
|
- var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
|
|
|
- if(second == 1){
|
|
|
- if(numberStr != undefined && numberStr !=null && numberStr !=''){
|
|
|
- if (fileFlag==1){
|
|
|
+ }
|
|
|
+ if(boolFlag){
|
|
|
+ var other = $("#file_other tr").length;
|
|
|
+ for(var i=0; i<other; i++) {
|
|
|
+ var numberStr = $("#file_other tr").eq(i).find("td:first").html();
|
|
|
+ var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
|
|
|
+ var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
|
|
|
+ if(second == 1){
|
|
|
+ if(numberStr != undefined && numberStr !=null && numberStr !=''){
|
|
|
+ if (fileFlag==1){
|
|
|
|
|
|
- }else{
|
|
|
- top.layer.msg("请上传其它文件!", {icon: 0});
|
|
|
- return false;
|
|
|
- }
|
|
|
- <%--$.ajax({--%>
|
|
|
- <%-- type: 'post',--%>
|
|
|
- <%-- url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
|
|
|
- <%-- data: {"attachmentId":numberStr,"projectId":projectId},--%>
|
|
|
- <%-- dataType: "json",--%>
|
|
|
- <%-- async: false--%>
|
|
|
- <%--}).success(function (result) {--%>
|
|
|
- <%-- if(result == 0){--%>
|
|
|
- <%-- boolFlag = false;--%>
|
|
|
- <%-- top.layer.msg("请上传其他文件!", {icon: 0});--%>
|
|
|
- <%-- return false;--%>
|
|
|
- <%-- }--%>
|
|
|
- <%--}).error(function () {--%>
|
|
|
- <%-- top.layer.msg("文件载入失败!");--%>
|
|
|
- <%--});--%>
|
|
|
+ }else{
|
|
|
+ top.layer.msg("请上传其它文件!", {icon: 0});
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/saveRecord");
|
|
|
}
|
|
|
- $("#inputForm").submit();
|
|
|
- return true;
|
|
|
- }else {
|
|
|
- parent.layer.msg("信息未填写完整!", {icon: 5});
|
|
|
- }
|
|
|
- return false;
|
|
|
+ $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/saveRecord");
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }else {
|
|
|
+ parent.layer.msg("信息未填写完整!", {icon: 5});
|
|
|
+ }
|
|
|
+ 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);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- $("#attachment_btn").click(function () {
|
|
|
- $("#attachment_file").click();
|
|
|
- });
|
|
|
+ }
|
|
|
+ $(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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ });
|
|
|
$(".tabMove").mouseover(function(){
|
|
|
//tips层-下
|
|
|
var td=$(this)
|
|
@@ -184,22 +137,22 @@
|
|
|
tips: 3
|
|
|
});
|
|
|
})
|
|
|
- });
|
|
|
- function insertTitle(tValue){
|
|
|
- var list = "${projectReportRecord.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 attachmentId = "";
|
|
|
- var attachmentFlag = "99";
|
|
|
- console.log(file);
|
|
|
- var timestamp=new Date().getTime();
|
|
|
+ });
|
|
|
+ function insertTitle(tValue){
|
|
|
+ var list = "${projectReportRecord.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 attachmentId = "";
|
|
|
+ var attachmentFlag = "99";
|
|
|
+ console.log(file);
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
|
|
|
- var storeAs = "projectRecords";
|
|
|
- var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
- var divId = "_attachment";
|
|
|
- $("#addFile"+divId).show();
|
|
|
- multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
|
|
|
- }
|
|
|
+ var storeAs = "projectRecords";
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_attachment";
|
|
|
+ $("#addFile"+divId).show();
|
|
|
+ multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
|
|
|
+ }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -222,32 +175,6 @@
|
|
|
<form:input id="reportNumber" path="report.number" 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="recordNum" name="recordNum" htmlEscape="false" readonly="true" class="form-control layui-input required" value="${projectReportRecord.recordNum}"/>
|
|
|
- </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 with-icon">
|
|
|
- <sys:treeselect id="signCostOne" name="signCostOne.id" value="${projectReportRecord.signCostOne.id}" labelName="signCostOne.name" labelValue="${projectReportRecord.signCostOne.name}"
|
|
|
- title="签字造价师一" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></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 with-icon">
|
|
|
- <sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"
|
|
|
- title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
|
|
|
- </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 id="reportName" path="report.name" 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">
|
|
@@ -290,25 +217,6 @@
|
|
|
<form:input id="cBName" path="createBy.name" 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="createDate" name="createDate" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
|
|
|
- value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
|
|
|
- </div>
|
|
|
- </div>--%>
|
|
|
- <%--<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">档案号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <form:input path="fileNum" htmlEscape="false" 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="name" htmlEscape="false" 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">
|
|
@@ -316,13 +224,6 @@
|
|
|
value="<fmt:formatDate value="${projectReportRecord.createDate}" 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="accomplishDate" name="accomplishDate" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
|
|
|
- value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
|
|
|
- </div>
|
|
|
- </div>--%>
|
|
|
<div class="layui-item layui-col-sm12 with-textarea">
|
|
|
<label class="layui-form-label">说明:</label>
|
|
|
<div class="layui-input-block">
|
|
@@ -333,9 +234,6 @@
|
|
|
|
|
|
<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="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
|
|
|
-<%-- </div>--%>
|
|
|
<div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
<span id="fileName_attachment" ></span>
|
|
|
<span id="_attachment" ></span>
|
|
@@ -348,14 +246,12 @@
|
|
|
<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 tree_table">
|
|
|
+ <table id="upTable" class="table table-bordered table-condensed tree_table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <%-- <th>序号</th>--%>
|
|
|
- <th width="30%">电子件名称</th>
|
|
|
-<%-- <th width="100px">最大容量(M)</th>--%>
|
|
|
- <th>类型限制</th>
|
|
|
-<%-- <th>文件名</th>--%>
|
|
|
+ <th width="30%">文件类型</th>
|
|
|
+ <th width="">文件描述/文件</th>
|
|
|
+ <th width="100px">文件大小(M)</th>
|
|
|
<th width="150px">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -372,7 +268,11 @@
|
|
|
<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
- <td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
|
|
|
+ <td>
|
|
|
+ <%-- <div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
|
|
|
+ <div><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M; ${fileAttachment.attachTypes}</div>
|
|
|
+ </td>
|
|
|
+ <td></td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
@@ -400,7 +300,17 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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:otherwise>
|
|
@@ -421,14 +331,26 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-<%-- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
|
|
|
+ <td class="op-td" style="text-align:center;">
|
|
|
+ ${workClientAttachment.fileSize}
|
|
|
+ </td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<%--附件下载删除--%>
|
|
@@ -447,8 +369,6 @@
|
|
|
<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> 下载</a>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-
|
|
|
- <%-- <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -488,10 +408,6 @@
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>依据性文件</h2></div>
|
|
|
-<%-- <div class="layui-item nav-btns">--%>
|
|
|
-<%-- <%–<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>–%>--%>
|
|
|
-<%-- <a href="javascript:void(0)" onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
|
|
|
-<%-- </div>--%>
|
|
|
<div id="addFile_gistdata" style="display: none" class="upload-progress">
|
|
|
<span id="fileName_gistdata" ></span>
|
|
|
<span id="_gistdata" ></span>
|
|
@@ -504,14 +420,13 @@
|
|
|
<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
|
|
|
<span id="gistdata_title"></span>
|
|
|
<div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
- <table id="gistdata_upTable" class="table table-bordered table-condensed details tree_table">
|
|
|
+ <table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<%-- <th>序号</th>--%>
|
|
|
- <th width="30%">电子件名称</th>
|
|
|
-<%-- <th width="100px">最大容量(M)</th>--%>
|
|
|
- <th>类型限制</th>
|
|
|
-<%-- <th>文件名</th>--%>
|
|
|
+ <th width="30%">文件类型</th>
|
|
|
+ <th width="">文件描述/文件</th>
|
|
|
+ <th width="100px">文件大小(M)</th>
|
|
|
<th width="150px">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -529,7 +444,11 @@
|
|
|
<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
- <td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
|
|
|
+ <td>
|
|
|
+ <%-- <div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
|
|
|
+ <div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M; ${fileGistdata.attachTypes}</div>
|
|
|
+ </td>
|
|
|
+ <td></td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
@@ -557,7 +476,17 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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:otherwise>
|
|
@@ -578,14 +507,26 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-<!-- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>-->
|
|
|
+ <td class="op-td" style="text-align:center;">
|
|
|
+ ${workClientAttachment.fileSize}
|
|
|
+ </td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<%--附件下载删除--%>
|
|
@@ -604,12 +545,9 @@
|
|
|
<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> 下载</a>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-
|
|
|
- <%-- <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
-<%-- <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
|
|
|
</c:forEach>
|
|
|
</c:forEach>
|
|
|
</tbody>
|
|
@@ -646,10 +584,6 @@
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>其他文件</h2></div>
|
|
|
-<%-- <div class="layui-item nav-btns">--%>
|
|
|
-<%-- <%–<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>–%>--%>
|
|
|
-<%-- <a href="javascript:void(0)" onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
|
|
|
-<%-- </div>--%>
|
|
|
<div id="addFile_other" style="display: none" class="upload-progress">
|
|
|
<span id="fileName_other" ></span>
|
|
|
<span id="_other" ></span>
|
|
@@ -662,14 +596,13 @@
|
|
|
<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
|
|
|
<span id="other_title"></span>
|
|
|
<div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
- <table id="upTable_other" class="table table-bordered table-condensed details tree_table">
|
|
|
+ <table id="upTable_other" class="table table-bordered table-condensed tree_table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<%-- <th>序号</th>--%>
|
|
|
- <th width="30%">电子件名称</th>
|
|
|
-<%-- <th width="100px">最大容量(M)</th>--%>
|
|
|
- <th>类型限制</th>
|
|
|
-<%-- <th>文件名</th>--%>
|
|
|
+ <th width="30%">文件类型</th>
|
|
|
+ <th width="">文件描述/文件</th>
|
|
|
+ <th width="100px">文件大小(M)</th>
|
|
|
<th width="150px">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -687,7 +620,11 @@
|
|
|
<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
- <td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
|
|
|
+ <td>
|
|
|
+ <%-- <div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
|
|
|
+ <div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M; ${fileOther.attachTypes}</div>
|
|
|
+ </td>
|
|
|
+ <td></td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
@@ -715,7 +652,17 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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:otherwise>
|
|
@@ -736,14 +683,26 @@
|
|
|
<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:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${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>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-<%-- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
|
|
|
+ <td class="op-td" style="text-align:center;">
|
|
|
+ ${workClientAttachment.fileSize}
|
|
|
+ </td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
<%--附件下载删除--%>
|
|
@@ -762,12 +721,9 @@
|
|
|
<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> 下载</a>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
-
|
|
|
- <%-- <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
-<%-- <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
|
|
|
</c:forEach>
|
|
|
</c:forEach>
|
|
|
</tbody>
|
|
@@ -801,81 +757,6 @@
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
</script>
|
|
|
-
|
|
|
- <%--<div class="form-group layui-row">
|
|
|
- <div class="form-group-label"><h2>附件信息列表</h2></div>
|
|
|
-
|
|
|
- <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
- <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></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>上传时间</th>
|
|
|
- <th width="150px">操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="file_attachment">
|
|
|
- <c:forEach items="${projectReportRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
- <tr>
|
|
|
- <%– <td>${status.index + 1}</td>–%>
|
|
|
- <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="preview('预览','${workClientAttachment.url}','90%','90%','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>
|
|
|
- <td>${workClientAttachment.createBy.name}</td>
|
|
|
- <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
- <td class="op-td">
|
|
|
- <div class="op-btn-box" >
|
|
|
- <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
-
|
|
|
- <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
- <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> 删除</a>
|
|
|
- </c:if>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>--%>
|
|
|
<div class="form-group layui-row page-end"></div>
|
|
|
</form:form>
|
|
|
</div>
|
|
@@ -1154,7 +1035,6 @@
|
|
|
|
|
|
function confirmDelete(mess, href){
|
|
|
top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
- //do something
|
|
|
if (typeof href == 'function') {
|
|
|
href();
|
|
|
}else{
|
|
@@ -1173,159 +1053,5 @@
|
|
|
return false;
|
|
|
}
|
|
|
</script>
|
|
|
-<%--<script>
|
|
|
- /*使用模块加载的方式 加载文件*/
|
|
|
- layui.config({
|
|
|
- base: '${ctx}/resoueces/css/layui/module/'
|
|
|
- }).extend({
|
|
|
- treetable: 'treetable-lay/treetable'
|
|
|
- }).use(['layer', 'table', 'treetable'], function () {
|
|
|
- var $ = layui.jquery;
|
|
|
- var table = layui.table;
|
|
|
- var layer = layui.layer;
|
|
|
- var treetable = layui.treetable;
|
|
|
-
|
|
|
- // 渲染表格
|
|
|
- window.renderTable = function () {//树桩表格参考文档:https://gitee.com/whvse/treetable-lay
|
|
|
- layer.load(2);
|
|
|
- treetable.render({
|
|
|
- treeColIndex: 1,//树形图标显示在第几列
|
|
|
- treeSpid: 0,//最上级的父级id
|
|
|
- treeIdName: 'permissionId',//id字段的名称
|
|
|
- treePidName: 'pid',//pid字段的名称
|
|
|
- treeDefaultClose: false,//是否默认折叠
|
|
|
- treeLinkage: true,//父级展开时是否自动展开所有子级
|
|
|
- elem: '#permissionTable',
|
|
|
- url: '${ctx}/projectAccessory/projectAccessory/getProjectAccessoryTreeData?projectId=${project.id}',
|
|
|
- page: false,
|
|
|
- cols: [[
|
|
|
- {type: 'numbers', title: '编号' ,width:80},
|
|
|
- {field: 'type', title: '电子件名称'},
|
|
|
- {field: 'workAttachments',title: '附件',templet:function(d){
|
|
|
- if(d.pid !='0'){
|
|
|
- if(null == d.workAttachments || '' == d.workAttachments){
|
|
|
- return "<span style=\"color:red\" title='无附件'>无附件</span>";
|
|
|
- }else{
|
|
|
- var html = '';
|
|
|
- for (var x in d.workAttachments) {
|
|
|
- html += "<div style='display:inline;float:left;'><a style='width:100px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;' class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"preview('预览','"+d.workAttachments[x].url+"','90%','90%')\" title='"+d.workAttachments[x].attachmentName+"'>"+d.workAttachments[x].attachmentName+"</a></div>"
|
|
|
- if(x != d.workAttachments.length-1){
|
|
|
- html += "<div style='display:inline;float:left;'> ; </div>";
|
|
|
- }
|
|
|
- }
|
|
|
- return html;
|
|
|
- }
|
|
|
- }else{
|
|
|
- return "";
|
|
|
- }
|
|
|
- }},
|
|
|
- {templet: complain, title: '附件管理',width:80}
|
|
|
- ]],
|
|
|
- done: function () {
|
|
|
- layer.closeAll('loading');
|
|
|
- }
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- renderTable();
|
|
|
-
|
|
|
- //触发三个button按钮
|
|
|
- $('#btn-expand').click(function () {
|
|
|
- treetable.expandAll('#permissionTable');
|
|
|
- });
|
|
|
-
|
|
|
- $('#btn-fold').click(function () {
|
|
|
- treetable.foldAll('#permissionTable');
|
|
|
- });
|
|
|
-
|
|
|
- $('#btn-refresh').click(function () {
|
|
|
- renderTable();
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- function complain(d){//操作中显示的内容
|
|
|
- if(d.pid !=0){
|
|
|
- return [
|
|
|
- '<a href="javascript:void(0)" onclick="openBill2(\'编辑附件\', \'${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId='+d.id+'&projectId='+d.projectId+'\',\'70%\',\'80%\',false,\'inputForm\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
|
|
|
- ].join('');
|
|
|
- }else{
|
|
|
- return[''].join('');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- function openBill2(title,url,width,height,target,formId){
|
|
|
- var rows = $(this).parent().prevAll().length + 1;
|
|
|
- var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
- var urls = url+"&index="+frameIndex;
|
|
|
- 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:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: function(index, layero){
|
|
|
- var body = top.layer.getChildFrame('body', index);
|
|
|
- var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
- var inputForm = body.find('#inputForm');
|
|
|
- var top_iframe;
|
|
|
- if(target){
|
|
|
- top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
- }else{
|
|
|
- top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
- }
|
|
|
- inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formSubmit2($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- function formSubmit2($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) {
|
|
|
- var d = data;
|
|
|
- //调用layui.use中的renderTable()方法刷新列表
|
|
|
- renderTable()
|
|
|
- //输出提示信息
|
|
|
- if(d.str.length>0){
|
|
|
- parent.layer.msg(d.str,{icon:1});
|
|
|
- }
|
|
|
- //关闭当前页
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-</script>--%>
|
|
|
</body>
|
|
|
</html>
|