|  | @@ -35,7 +35,7 @@
 | 
	
		
			
				|  |  |  			<div class="contentShadow layui-form contentDetails">
 | 
	
		
			
				|  |  |  				<div class="nav-btns">
 | 
	
		
			
				|  |  |  					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="getOne()" 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>
 | 
	
		
			
				|  |  | +<%--					<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>
 | 
	
		
			
				|  |  |  				<table class="oa-table layui-table" id="contentTable">
 | 
	
	
		
			
				|  | @@ -58,7 +58,8 @@
 | 
	
		
			
				|  |  |                  {field:'num',align:'center',  title: '报告号'}
 | 
	
		
			
				|  |  |  				,{field:'op',align:'center',title:"操作",width:200,templet:function(d){
 | 
	
		
			
				|  |  |  						var xml = "";
 | 
	
		
			
				|  |  | -						 xml +="<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>";
 | 
	
		
			
				|  |  | +						 //xml +="<a href=\"${ctx}/projectreportnum/projectReportNum/download?number=" +encodeURIComponent(encodeURIComponent( d.num ))+ "\"    class=\"op-btn op-btn-edit\"><i class=\"fa fa-edit\"></i> 生成报告模板</a>";
 | 
	
		
			
				|  |  | +						 xml +="<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>";
 | 
	
		
			
				|  |  |  						 return xml
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				}
 | 
	
	
		
			
				|  | @@ -69,6 +70,7 @@
 | 
	
		
			
				|  |  |                  <c:if test="${index.index != 0}">,</c:if>
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      "index":"${index.index+1}"
 | 
	
		
			
				|  |  | +                    ,"id":"${reportNum.id}"
 | 
	
		
			
				|  |  |                      ,"num":"${reportNum.num}"
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  </c:forEach>
 | 
	
	
		
			
				|  | @@ -80,6 +82,82 @@
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | +	function reportNumOnStage(title,url,width,height,target){
 | 
	
		
			
				|  |  | +		var company=$("#company").val();
 | 
	
		
			
				|  |  | +		url=url+"&company="+company;
 | 
	
		
			
				|  |  | +		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,
 | 
	
		
			
				|  |  | +			maxmin: true, //开启最大化最小化按钮
 | 
	
		
			
				|  |  | +			content: url ,
 | 
	
		
			
				|  |  | +			skin:"two-btns",
 | 
	
		
			
				|  |  | +			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中展示
 | 
	
		
			
				|  |  | +				var $document = iframeWin.contentWindow.document;
 | 
	
		
			
				|  |  | +				if(iframeWin.contentWindow.doSubmit() ){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +				}else{
 | 
	
		
			
				|  |  | +					return false;
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
 | 
	
		
			
				|  |  | +				formSubmit($document,"inputForm",index,index1);
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  | +			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);
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +		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>
 | 
	
		
			
				|  |  |      resizeListWindow1();
 | 
	
		
			
				|  |  |      $(window).resize(function(){
 | 
	
		
			
				|  |  |          resizeListWindow1();
 |