|
@@ -0,0 +1,267 @@
|
|
|
+<%@ 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/laydate/laydate.js"></script>--%>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+
|
|
|
+ //搜索框收放
|
|
|
+ $('#moresee').click(function(){
|
|
|
+ if($('#moresees').is(':visible'))
|
|
|
+ {
|
|
|
+ $('#moresees').slideUp(0,resizeListWindow2);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
|
|
|
+ }else{
|
|
|
+ $('#moresees').slideDown(0,resizeListWindow2);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ function reset() {
|
|
|
+ $("#searchForm").resetForm();
|
|
|
+ }
|
|
|
+ function openDialog(title,url,width,height,target,formId,tableId) {
|
|
|
+
|
|
|
+ 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: url ,
|
|
|
+ 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}/defaultAuditTemplate/defaultAuditTemplate/save");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function formSubmit2($document,inputForm,index,tableId){
|
|
|
+
|
|
|
+ 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;
|
|
|
+ //输出提示信息
|
|
|
+ if(d.str.length>0){
|
|
|
+ parent.layer.msg(d.str,{icon:1});
|
|
|
+ }
|
|
|
+ window.location.reload();
|
|
|
+ //关闭当前页
|
|
|
+ top.layer.close(index)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function openDialogre(title,url,width,height,target,formId,tableId) {
|
|
|
+ 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: url ,
|
|
|
+ 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}/defaultAuditTemplate/defaultAuditTemplate/save");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 确认对话框
|
|
|
+ function subConfirmx(mess, href, closed){
|
|
|
+
|
|
|
+ top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
+ //do something
|
|
|
+ if (typeof href == 'function') {
|
|
|
+ href();
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:href,
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ top.layer.msg(data.str, {icon: 1});
|
|
|
+ window.location.reload();
|
|
|
+ }else {
|
|
|
+ top.layer.msg(data.str, {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ top.layer.close(index);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="wrapper wrapper-content">
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <div class="layui-row">
|
|
|
+ <div class="full-width fl">
|
|
|
+ <div class="layui-row contentShadow shadowLR" id="queryDiv">
|
|
|
+ <form:form id="searchForm" modelAttribute="defaultAuditTemplate" action="${ctx}/defaultAuditTemplate/defaultAuditTemplate/list?identification=${defaultAuditTemplate.identification}" method="post" class="form-inline">
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+ <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
|
|
|
+ <div class="commonQuery lw6">
|
|
|
+ <div class="layui-item query athird">
|
|
|
+ <label class="layui-form-label">模板内容:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <form:input path="content" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item fr">
|
|
|
+ <div class="input-group">
|
|
|
+ <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
|
|
|
+ <div class="layui-btn-group search-spacing">
|
|
|
+ <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
|
|
|
+ <button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style=" clear:both;"></div>
|
|
|
+ </div>
|
|
|
+ <div id="moresees" style="clear:both;display:none;" class="lw6">
|
|
|
+ <div style="clear:both;"></div>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="full-width fl">
|
|
|
+ <div class="layui-form contentDetails contentShadow shadowLBR">
|
|
|
+ <div class="nav-btns">
|
|
|
+ <div class="layui-btn-group ">
|
|
|
+ <table:subProjectAddRow url="${ctx}/defaultAuditTemplate/defaultAuditTemplate/form?identification=${defaultAuditTemplate.identification}&name=${defaultAuditTemplate.name}" title="默认意见"></table:subProjectAddRow><!-- 增加按钮 -->
|
|
|
+ <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
|
+ </div>
|
|
|
+ <div style="clear: both;"></div>
|
|
|
+ </div>
|
|
|
+ <table class="oa-table layui-table" id="contentTable1"></table>
|
|
|
+
|
|
|
+ <!-- 分页代码 -->
|
|
|
+ <table:page page="${page}"></table:page>
|
|
|
+ <div style="clear: both;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="changewidth"></div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+
|
|
|
+ layui.use('table', function(){
|
|
|
+ layui.table.render({
|
|
|
+ limit:${ page.pageSize }
|
|
|
+ ,elem: '#contentTable1'
|
|
|
+ ,page: false
|
|
|
+ ,cols: [[
|
|
|
+ // {checkbox: true, fixed: true},
|
|
|
+ {field:'index',align:'center', title: '序号',width:60}
|
|
|
+ ,{field:'content',align:'center', title: '模板内容'}
|
|
|
+ ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
|
|
|
+ ////对操作进行初始化
|
|
|
+ var xml="";
|
|
|
+ xml+="<a href=\"#\" onclick=\"openDialogre('默认意见修改', '${ctx}/defaultAuditTemplate/defaultAuditTemplate/form?id=" + d.id + "','95%', '95%','','inputForm','layui-border-box')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
|
|
|
+ xml+="<a href=\"${ctx}/defaultAuditTemplate/defaultAuditTemplate/delete?id=" + d.id + "\" onclick=\"return subConfirmx('确认要删除默认意见吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" style=\"margin-left:1px;\"> 删除</a>";
|
|
|
+ return xml;
|
|
|
+
|
|
|
+ }}
|
|
|
+ ]]
|
|
|
+ ,data: [
|
|
|
+ <c:if test="${ not empty page.list}">
|
|
|
+ <c:forEach items="${page.list}" var="defaultAuditTemplate" varStatus="index">
|
|
|
+ <c:if test="${index.index != 0}">,</c:if>
|
|
|
+ {
|
|
|
+ "index":"${index.index+1}"
|
|
|
+ ,"id":"${defaultAuditTemplate.id}"
|
|
|
+ ,"content":"${defaultAuditTemplate.content}"
|
|
|
+ }
|
|
|
+ </c:forEach>
|
|
|
+ </c:if>
|
|
|
+ ]
|
|
|
+ // ,even: true
|
|
|
+ // ,height: 315
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ resizeListTable();
|
|
|
+ $("a").on("click",addLinkVisied);
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ resizeListWindow2();
|
|
|
+ $(window).resize(function(){
|
|
|
+ resizeListWindow2();
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|