|
@@ -0,0 +1,198 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>模板管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
+ <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
|
|
|
+ <style>
|
|
|
+ label.error{
|
|
|
+ top:40px;
|
|
|
+ left:0;
|
|
|
+ }
|
|
|
+ #standardDetail-error{
|
|
|
+ top:82px;
|
|
|
+ left:0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var validateForm;
|
|
|
+ function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if(validateForm.form()){
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $(document).ready(function() {
|
|
|
+ layui.use(['form', 'layer'], function () {
|
|
|
+ var form = layui.form;
|
|
|
+ });
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#cus_name").show();
|
|
|
+ $("#cus_name").siblings().hide();
|
|
|
+ //搜索框收放
|
|
|
+ $('#moresee').click(function(){
|
|
|
+ if($('#moresees').is(':visible'))
|
|
|
+ {
|
|
|
+ $('#moresees').slideUp(0,resizeListWindow4);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
|
|
|
+ }else{
|
|
|
+ $('#moresees').slideDown(0,resizeListWindow4);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ function openDialogre(title,url,width,height,target,buttons) {
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width = 'auto';
|
|
|
+ height = 'auto';
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
+ }
|
|
|
+ var split = buttons.split(",");
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: [width, height],
|
|
|
+ title: title,
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
+ skin: 'three-btns',
|
|
|
+ content: url,
|
|
|
+ btn: split,
|
|
|
+ btn1: 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
|
|
|
+ }
|
|
|
+ if(iframeWin.contentWindow.doSubmit(1) ){
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
+ setTimeout(function(){
|
|
|
+ location = '${ctx}/auditTemplate/auditTemplate/list';
|
|
|
+ }, 100);//延时0.1秒,对应360 7.1版本bug
|
|
|
+ }
|
|
|
+ },
|
|
|
+ btn2:function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function deleteByid(mess, href) {
|
|
|
+ top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
+ if (typeof href == 'function') {
|
|
|
+ href();
|
|
|
+ }else{
|
|
|
+ resetTip(); //loading();
|
|
|
+ $.ajax({
|
|
|
+ url:href,
|
|
|
+ type:"post",
|
|
|
+ success:function(data){
|
|
|
+ parent.layer.msg(data,{icon:1});
|
|
|
+ rereset();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ top.layer.close(index);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function rereset(){//重置,页码清零
|
|
|
+ $("#pageNo").val(0);
|
|
|
+ $("#inputForm div.query input").val("");
|
|
|
+ $("#inputForm div.query select").val("");
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function page(n,s){//翻页
|
|
|
+ $("#pageNo").val(n);
|
|
|
+ $("#pageSize").val(s);
|
|
|
+ $("#inputForm").submit();
|
|
|
+ $("span.page-size").text(s);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<%--<div style="margin: 10px 30px;background-color: #FFB800"> <a href="javascript:void(0)" onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toSave?identification=${auditTemplate.identification}&name=${auditTemplate.name}','80%', '50%','','添加,关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 添加审核意见模板</a></div>--%>
|
|
|
+<form:form id="inputForm" modelAttribute="auditTemplate" action="${ctx}/auditTemplate/auditTemplate/" 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}"/>
|
|
|
+ <div class="commonQuery lw6" style="margin-bottom: 20px;">
|
|
|
+ <div class="layui-item query athird">
|
|
|
+ <label class="layui-form-label">模板类型:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="name" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird">
|
|
|
+ <label class="layui-form-label">模板内容:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="content" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item athird">
|
|
|
+ <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="rereset()">重置</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="clear:both;"></div>
|
|
|
+ </div>
|
|
|
+ <div class="single-form">
|
|
|
+ <div class="container" style="width: 95%">
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <thead>
|
|
|
+ <th>模板类型</th>
|
|
|
+ <th>模板</th>
|
|
|
+ <th>创建人</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <c:forEach items="${page.list}" var="tem">
|
|
|
+ <tr align="center" >
|
|
|
+ <td>${tem.name}</td>
|
|
|
+ <td>${tem.content}</td>
|
|
|
+ <td>${tem.createBy.name}</td>
|
|
|
+ <td>
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <div class="op-btn-box">
|
|
|
+ <a href="${ctx}/auditTemplate/auditTemplate/delete?id=${tem.id}" onclick="return deleteByid('确认要删除该审核模板吗?', this.href)" class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
|
|
|
+ </div>
|
|
|
+ <div class="op-btn-box">
|
|
|
+ <a style="color: white" onclick="openDialogre('添加模板', '${ctx}/auditTemplate/auditTemplate/toAddSave','80%', '70%','','添加,关闭')" class="layui-btn layui-btn-xs" >添加审核意见模板</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <!-- 分页代码 -->
|
|
|
+ <table:page page="${page}"></table:page>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</form:form>
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|