|
@@ -59,6 +59,84 @@
|
|
|
return false;
|
|
|
}
|
|
|
$(document).ready(function() {
|
|
|
+ var filingId=$("#filingId").val();
|
|
|
+ if(filingId!=""){
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/projectFilingBatch/projectFilingBatchInfo/formTwo",
|
|
|
+ data:{
|
|
|
+ "filingId":filingId
|
|
|
+ },
|
|
|
+ type:"post",
|
|
|
+ success:function (d) {
|
|
|
+ $.each(d.project,function(index,obj){
|
|
|
+ var id="projectList_"+obj.id;
|
|
|
+ var pid="project_"+obj.id;
|
|
|
+ var tid="project_"+obj.id+"_proId";
|
|
|
+ var inId="#"+tid;
|
|
|
+ var size=$("#projectList .rowSize").size();
|
|
|
+ var flag=true;
|
|
|
+ var dd=$(inId).val();
|
|
|
+ for (var i=0;i<size;i++){
|
|
|
+ if (dd==d.id){
|
|
|
+ flag=false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(flag) {
|
|
|
+ $("#projectList").append("<tr class='rowSize'>" +
|
|
|
+ "<td><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + ">" + obj.projectId + "</td>" +
|
|
|
+ "<td>" + obj.projectName + "</td>" +
|
|
|
+ "<td>" + obj.projectReportNumber + "</td>" +
|
|
|
+ "<td class=\"text-center op-td\" >" +
|
|
|
+ "<span class=\"op-btn op-btn-add\" onclick=\"addRowInfo(" + id + ")\" title=\"添加\"><i class=\"fa fa-plus\"></i> 添加</span>" +
|
|
|
+ "<span class=\"op-btn op-btn-delete\" onclick=\"delListRow(this," + id + ")\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
+ "</td>" +
|
|
|
+ "</tr>")
|
|
|
+ $("#projectList").append("<tr style='display: none;'> <td colspan='4' style='padding: 0px;'>" +
|
|
|
+ "<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
|
|
|
+ "<tbody id='" + id + "'>" +
|
|
|
+ "</tbody>" +
|
|
|
+ "</table>" +
|
|
|
+ "</td></tr>")
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type : "POST",
|
|
|
+ url : "${ctx}/projectFilingBatch/projectFilingBatchInfo/getAttachmentList",
|
|
|
+ data : {'projectId':obj.id},
|
|
|
+ //请求成功
|
|
|
+ success : function(result) {
|
|
|
+ var iid="#"+id
|
|
|
+ // var ss=(obj.id).split("_")
|
|
|
+ // var sa=ss[1];
|
|
|
+ $(iid).parent().parent().parent().show();
|
|
|
+ $.each(result.data,function(index,value){
|
|
|
+ $(iid).append(
|
|
|
+ "<tr>"+
|
|
|
+ "<td class=\"hide\">"+
|
|
|
+ "<input type='file' multiple='multiple' style='display: none;' onChange='if(this.value)insertAccording(this.value,"+obj.id+",this);'/>"+
|
|
|
+ "<input type='hidden' style='display: none;' id='attId' value='"+value.id+"'/>"+
|
|
|
+ "</td>"+
|
|
|
+ "<td style=\"text-align: center\" width=\"20%\"><input name='wType' onChange='upwType(this)' class=\"form-control required\" value='"+value.remarks+"'/></td>"+
|
|
|
+ "<td style=\"text-align: center\" width=\"20%\"><a class=\"attention-info\" href=\"javascript:void(0)\" title=\""+value.attachmentName+"\" onclick=\"preview('预览','"+value.url+"','90%','90%')\"></a>"+value.attachmentName+"</td>"+
|
|
|
+ "<td style=\"text-align: center\" width=\"20%\"></td>"+
|
|
|
+ "<td width=\"20%\">" +
|
|
|
+ "<span href=javascript:void(0); onclick=\"accordingBtn(this)\" class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i> 编辑</span>" +
|
|
|
+ "<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
+ "</td>"+
|
|
|
+ "</tr>"
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var radioVal ;
|
|
|
validateForm = $("#inputForm").validate({
|
|
|
submitHandler: function(form){
|
|
@@ -159,6 +237,8 @@
|
|
|
});
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$('#masterId').on("change", function () {
|
|
|
var masterId = $("#masterId").val();
|
|
|
$("#officeName").val('');
|
|
@@ -191,6 +271,8 @@
|
|
|
, trigger: 'click'
|
|
|
, trigger: 'click'
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
|
|
|
|
|
@@ -431,7 +513,7 @@
|
|
|
"<td>" + d.projectReportNumber + "</td>" +
|
|
|
"<td class=\"text-center op-td\" >" +
|
|
|
"<span class=\"op-btn op-btn-add\" onclick=\"addRowInfo(" + id + ")\" title=\"添加\"><i class=\"fa fa-plus\"></i> 添加</span>" +
|
|
|
- "<span class=\"op-btn op-btn-delete\" onclick=\"delEntrustRow(" + id + ")\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
+ "<span class=\"op-btn op-btn-delete\" onclick=\"delListRow(this," + id + ")\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
"</td>" +
|
|
|
"</tr>")
|
|
|
$("#projectList").append("<tr style='display: none;'> <td colspan='4' style='padding: 0px;'>" +
|
|
@@ -483,7 +565,7 @@
|
|
|
"<td style=\"text-align: center\" width=\"20%\"></td>"+
|
|
|
"<td width=\"20%\">" +
|
|
|
"<span href=javascript:void(0); onclick=\"accordingBtn(this)\" class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i> 编辑</span>" +
|
|
|
- "<span class=\"op-btn op-btn-delete\" onclick=\"delEntrustRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
+ "<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i> 删除</span>" +
|
|
|
"</td>"+
|
|
|
"</tr>"
|
|
|
)
|
|
@@ -552,9 +634,28 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- function delListRow(obj){
|
|
|
+ function delListRow(o,obj){
|
|
|
+ $(o).parent().parent().remove();
|
|
|
+ $(obj).parent().parent().parent().remove();
|
|
|
+ $(obj).parent().parent().parent().hide();
|
|
|
+ var id=$(obj+" tr").length();
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:"${ctx}/projectFilingBatch/projectFilingBatchInfo/deleteById",
|
|
|
+ data:{
|
|
|
+ "id":id
|
|
|
+ },
|
|
|
+ dataType:"json",
|
|
|
+ success:function (d) {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function delListInfoRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
$(obj).parent().parent().remove();
|
|
|
- $(obj).parent().parent().parent().parent()
|
|
|
+ $(obj).parent().parent().parent().parent().parent().parent().remove();
|
|
|
}
|
|
|
function delEntrustRow(obj, prefix){
|
|
|
var id = $(prefix+"_id");
|
|
@@ -756,7 +857,7 @@
|
|
|
<div class="container">
|
|
|
<sys:message content="${message}"/>
|
|
|
<form:form id="inputForm" modelAttribute="projectFilingBatch" action="${ctx}/projectFilingBatch/projectFilingBatchInfo/save" method="post" class="form-horizontal">
|
|
|
- <form:hidden path="id"/>
|
|
|
+ <form:input path="id" id="filingId"/>
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>归档批次基础信息</h2></div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
@@ -805,19 +906,19 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody id="projectList">
|
|
|
- <c:if test="${projectFilingBatch.project!=null}">
|
|
|
- <c:forEach items="${projectFilingBatch.project}" var="pro" >
|
|
|
- <tr>
|
|
|
- <td><input type="hidden" name="proId" value="${pro.id}"/>${pro.projectId}</td>
|
|
|
- <td>${pro.projectName}</td>
|
|
|
- <td>${pro.projectReportNumber}</td>
|
|
|
- <td class="text-center op-td" >
|
|
|
- <span class="op-btn op-btn-add" onclick="addRowInfo()" title=\添加"><i class="fa fa-plus"></i> 添加</span>
|
|
|
- <span class="op-btn op-btn-delete" onclick="delEntrustRow(this)" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </c:if>
|
|
|
+<%-- <c:if test="${projectFilingBatch.project!=null}">--%>
|
|
|
+<%-- <c:forEach items="${projectFilingBatch.project}" var="pro" >--%>
|
|
|
+<%-- <tr>--%>
|
|
|
+<%-- <td><input type="hidden" name="proId" value="${pro.id}"/>${pro.projectId}</td>--%>
|
|
|
+<%-- <td>${pro.projectName}</td>--%>
|
|
|
+<%-- <td>${pro.projectReportNumber}</td>--%>
|
|
|
+<%-- <td class="text-center op-td" >--%>
|
|
|
+<%-- <span class="op-btn op-btn-add" onclick="addRowInfo($)" title=\添加"><i class="fa fa-plus"></i> 添加</span>--%>
|
|
|
+<%-- <span class="op-btn op-btn-delete" onclick="delEntrustRow(this)" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>--%>
|
|
|
+<%-- </td>--%>
|
|
|
+<%-- </tr>--%>
|
|
|
+<%-- </c:forEach>--%>
|
|
|
+<%-- </c:if>--%>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|