|  | @@ -5,7 +5,7 @@
 | 
												
													
														
															|  |  <head>
 |  |  <head>
 | 
												
													
														
															|  |  	<title>报告号</title>
 |  |  	<title>报告号</title>
 | 
												
													
														
															|  |  	<meta name="decorator" content="default"/>
 |  |  	<meta name="decorator" content="default"/>
 | 
												
													
														
															|  | -
 |  | 
 | 
												
													
														
															|  | 
 |  | +	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  	<style>
 |  |  	<style>
 | 
												
													
														
															|  |  		.widthClass{
 |  |  		.widthClass{
 | 
												
											
												
													
														
															|  | @@ -38,15 +38,16 @@
 | 
												
													
														
															|  |  <%--					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="getMore()" title="领取"><i class="fa fa-plus"></i> 领多个</button>--%>
 |  |  <%--					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="getMore()" title="领取"><i class="fa fa-plus"></i> 领多个</button>--%>
 | 
												
													
														
															|  |  					<div style="clear: both;"></div>
 |  |  					<div style="clear: both;"></div>
 | 
												
													
														
															|  |  				</div>
 |  |  				</div>
 | 
												
													
														
															|  | -				<table class="oa-table layui-table" id="contentTable">
 |  | 
 | 
												
													
														
															|  | -				</table>
 |  | 
 | 
												
													
														
															|  | 
 |  | +				<%--<table class="oa-table layui-table" id="contentTable">
 | 
												
													
														
															|  | 
 |  | +				</table>--%>
 | 
												
													
														
															|  | 
 |  | +				<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  				<div style="clear: both;"></div>
 |  |  				<div style="clear: both;"></div>
 | 
												
													
														
															|  |  			</div>
 |  |  			</div>
 | 
												
													
														
															|  |  		</div>
 |  |  		</div>
 | 
												
													
														
															|  |  	</div>
 |  |  	</div>
 | 
												
													
														
															|  |  </div>
 |  |  </div>
 | 
												
													
														
															|  | -<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 |  | 
 | 
												
													
														
															|  | 
 |  | +<%--<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 | 
												
													
														
															|  |  <script>
 |  |  <script>
 | 
												
													
														
															|  |      layui.use('table', function(){
 |  |      layui.use('table', function(){
 | 
												
													
														
															|  |          layui.table.render({
 |  |          layui.table.render({
 | 
												
											
												
													
														
															|  | @@ -80,7 +81,64 @@
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      })
 |  |      })
 | 
												
													
														
															|  | 
 |  | +</script>--%>
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +<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>
 | 
												
													
														
															|  | 
 |  | +	/*使用模块加载的方式 加载文件*/
 | 
												
													
														
															|  | 
 |  | +	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;
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +		// 渲染表格
 | 
												
													
														
															|  | 
 |  | +		var renderTable = function () {
 | 
												
													
														
															|  | 
 |  | +			layer.load(2);
 | 
												
													
														
															|  | 
 |  | +			treetable.render({
 | 
												
													
														
															|  | 
 |  | +				treeColIndex: 1,//树形图标显示在第几列
 | 
												
													
														
															|  | 
 |  | +				treeSpid: 0,//最上级的父级id
 | 
												
													
														
															|  | 
 |  | +				treeIdName: 'permissionId',//id字段的名称
 | 
												
													
														
															|  | 
 |  | +				treePidName: 'pid',//pid字段的名称
 | 
												
													
														
															|  | 
 |  | +				treeDefaultClose: true,//是否默认折叠
 | 
												
													
														
															|  | 
 |  | +				treeLinkage: true,//父级展开时是否自动展开所有子级
 | 
												
													
														
															|  | 
 |  | +				elem: '#permissionTable',
 | 
												
													
														
															|  | 
 |  | +				url: '${ctx}/projectreportnum/projectReportNum/getReportNumList',
 | 
												
													
														
															|  | 
 |  | +				page: false,
 | 
												
													
														
															|  | 
 |  | +				cols: [[
 | 
												
													
														
															|  | 
 |  | +					{field:'index',align:'center',width:120, title: '序号'},
 | 
												
													
														
															|  | 
 |  | +					{field:'num',align:'center',  title: '报告号'},
 | 
												
													
														
															|  | 
 |  | +					{templet: complain, title: '操作',width:130}
 | 
												
													
														
															|  | 
 |  | +				]],
 | 
												
													
														
															|  | 
 |  | +				done: function () {
 | 
												
													
														
															|  | 
 |  | +					layer.closeAll('loading');
 | 
												
													
														
															|  | 
 |  | +				}
 | 
												
													
														
															|  | 
 |  | +			});
 | 
												
													
														
															|  | 
 |  | +		};
 | 
												
													
														
															|  | 
 |  | +		renderTable();
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +		function complain(d){//操作中显示的内容
 | 
												
													
														
															|  | 
 |  | +			if(0 == d.pid){
 | 
												
													
														
															|  | 
 |  | +				return [
 | 
												
													
														
															|  | 
 |  | +					"<a href=\"javascript:void(0)\" onclick=\"reportNumOnStage('阶段报告号新增','${ctx}/projectreportnum/projectReportNum/getProjectReportNumStageForm?num="+d.num+"&parentId="+d.id+"','70%', '50%');\" class=\"op-btn op-btn-edit\"><i class=\"fa fa-edit\"></i> 添加阶段报告号</a>"
 | 
												
													
														
															|  | 
 |  | +				].join('');
 | 
												
													
														
															|  | 
 |  | +			}else{
 | 
												
													
														
															|  | 
 |  | +				return[
 | 
												
													
														
															|  | 
 |  | +					"<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit layui-bg-orange\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>"
 | 
												
													
														
															|  | 
 |  | +				].join('');
 | 
												
													
														
															|  | 
 |  | +			}
 | 
												
													
														
															|  | 
 |  | +		}
 | 
												
													
														
															|  | 
 |  | +	});
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |  </script>
 |  |  </script>
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |  <script>
 |  |  <script>
 | 
												
													
														
															|  |  	function reportNumOnStage(title,url,width,height,target){
 |  |  	function reportNumOnStage(title,url,width,height,target){
 | 
												
													
														
															|  |  		var company=$("#company").val();
 |  |  		var company=$("#company").val();
 | 
												
											
												
													
														
															|  | @@ -112,49 +170,37 @@
 | 
												
													
														
															|  |  				}
 |  |  				}
 | 
												
													
														
															|  |  				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
 |  |  				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
 | 
												
													
														
															|  |  				var $document = iframeWin.contentWindow.document;
 |  |  				var $document = iframeWin.contentWindow.document;
 | 
												
													
														
															|  | -				if(iframeWin.contentWindow.doSubmit() ){
 |  | 
 | 
												
													
														
															|  | 
 |  | +				/*if(iframeWin.contentWindow.doSubmit() ){
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  				}else{
 |  |  				}else{
 | 
												
													
														
															|  |  					return false;
 |  |  					return false;
 | 
												
													
														
															|  | -				}
 |  | 
 | 
												
													
														
															|  | -				var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
 |  | 
 | 
												
													
														
															|  | -				formSubmit($document,"inputForm",index,index1);
 |  | 
 | 
												
													
														
															|  | 
 |  | +				}*/
 | 
												
													
														
															|  | 
 |  | +				//var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
 | 
												
													
														
															|  | 
 |  | +				formSubmit($document,"inputForm",index);
 | 
												
													
														
															|  |  			},
 |  |  			},
 | 
												
													
														
															|  |  			cancel: function(index){
 |  |  			cancel: function(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);
 |  | 
 | 
												
													
														
															|  | 
 |  | +	function formSubmit($document,inputForm,index){
 | 
												
													
														
															|  | 
 |  | +		$($document.getElementById(inputForm)).ajaxSubmit({
 | 
												
													
														
															|  | 
 |  | +			success:function(data) {
 | 
												
													
														
															|  | 
 |  | +				top.layer.close(index);
 | 
												
													
														
															|  | 
 |  | +				if(data.code == 0){
 | 
												
													
														
															|  | 
 |  | +					layer.msg(data.msg, {icon: 1,time: 1000}, function(){
 | 
												
													
														
															|  | 
 |  | +						return false;
 | 
												
													
														
															|  | 
 |  | +					});
 | 
												
													
														
															|  | 
 |  | +				}else{
 | 
												
													
														
															|  | 
 |  | +					layer.msg(data.msg, {icon: 1,time: 1000}, function(){
 | 
												
													
														
															|  | 
 |  | +						window.location.reload();
 | 
												
													
														
															|  | 
 |  | +					});
 | 
												
													
														
															|  |  				}
 |  |  				}
 | 
												
													
														
															|  | 
 |  | +			},error:function(){
 | 
												
													
														
															|  | 
 |  | +				layer.msg("操作失败",{icon:2});
 | 
												
													
														
															|  | 
 |  | +				window.location.reload();
 | 
												
													
														
															|  |  			}
 |  |  			}
 | 
												
													
														
															|  |  		});
 |  |  		});
 | 
												
													
														
															|  | -		if(validateForm.form()){
 |  | 
 | 
												
													
														
															|  | -			$($document.getElementById(inputForm)).ajaxSubmit({
 |  | 
 | 
												
													
														
															|  | -				success:function(data) {
 |  | 
 | 
												
													
														
															|  | -					top.layer.close(index);
 |  | 
 | 
												
													
														
															|  | -					layer.msg(data.msg, {icon: 1});
 |  | 
 | 
												
													
														
															|  | -					window.location.reload();
 |  | 
 | 
												
													
														
															|  | -				},error:function(){
 |  | 
 | 
												
													
														
															|  | -					layer.msg("操作失败",{icon:2});
 |  | 
 | 
												
													
														
															|  | -					window.location.reload();
 |  | 
 | 
												
													
														
															|  | -				}
 |  | 
 | 
												
													
														
															|  | -			});
 |  | 
 | 
												
													
														
															|  | -		}else {
 |  | 
 | 
												
													
														
															|  | -			parent.layer.msg("信息未填写完整!", {icon: 5});
 |  | 
 | 
												
													
														
															|  | -		}
 |  | 
 | 
												
													
														
															|  |  	}
 |  |  	}
 | 
												
													
														
															|  |  </script>
 |  |  </script>
 | 
												
													
														
															|  |  <script>
 |  |  <script>
 |