|
@@ -29,6 +29,47 @@
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
layui.use(['form', 'layer'], function () {
|
|
layui.use(['form', 'layer'], function () {
|
|
var form = layui.form;
|
|
var form = layui.form;
|
|
|
|
+ var identificationFirst = $("#identificationFirst").val();
|
|
|
|
+ var identificationSecond = $("#identificationSecond").val();
|
|
|
|
+ var identificationThird = $("#identificationThird").val();
|
|
|
|
+ console.log('identificationFirst',identificationFirst)
|
|
|
|
+ console.log('identificationSecond',identificationSecond)
|
|
|
|
+ console.log('identificationThird',identificationThird)
|
|
|
|
+ if (undefined != identificationFirst && null != identificationFirst && "" != identificationFirst){
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:'${ctx}/personOpinion/personOpinion/getMessage',
|
|
|
|
+ data:{"value":identificationFirst},
|
|
|
|
+ dataType:"json",
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data) {
|
|
|
|
+ for (var info in data){
|
|
|
|
+ $('#identificationSecond').append(new Option(data[info].label,data[info].value));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ }
|
|
|
|
+ if (undefined != identificationSecond && null != identificationSecond && "" != identificationSecond){
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:'${ctx}/personOpinion/personOpinion/getMessage',
|
|
|
|
+ data:{"value":identificationSecond},
|
|
|
|
+ dataType:"json",
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data) {
|
|
|
|
+ for (var info in data){
|
|
|
|
+ $('#identificationThird').append(new Option(data[info].label,data[info].value));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ }
|
|
|
|
+
|
|
});
|
|
});
|
|
validateForm = $("#inputForm").validate({
|
|
validateForm = $("#inputForm").validate({
|
|
submitHandler: function(form){
|
|
submitHandler: function(form){
|
|
@@ -130,75 +171,182 @@
|
|
</script>
|
|
</script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<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="inputForm" modelAttribute="auditTemplate" action="${ctx}/personOpinion/personOpinion/" method="post" class="form-horizontal layui-form">
|
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
|
+ <input id="toflag" name="toflag" type="hidden" value="1"/>
|
|
|
|
+ <div class="commonQuery lw12" style="margin-bottom: 20px;">
|
|
|
|
+ <div class="layui-item query athird">
|
|
|
|
+ <label class="layui-form-label">一级模板类型:</label>
|
|
|
|
+ <div class="layui-input-block readOnlyFFF">
|
|
|
|
+ <%-- <form:input path="name" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>--%>
|
|
|
|
+ <select class="form-control simple-select" lay-filter="firstFilter" id="identificationFirst" name="identificationFirst">
|
|
|
|
+ <option value=""></option>
|
|
|
|
+ <c:forEach items="${identificationFirstList}" var="type">
|
|
|
|
+ <option value="${type.value}" <c:if test="${auditTemplate.identificationFirst eq type.value }">selected</c:if>>${type.label}</option>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item query athird">
|
|
|
|
+ <label class="layui-form-label double-line">二级模板类型:</label>
|
|
|
|
+ <div class="layui-input-block readOnlyFFF">
|
|
|
|
+ <select class="form-control simple-select" id="identificationSecond" name="identificationSecond" lay-filter="secondFilter">
|
|
|
|
+ <option value=""></option>
|
|
|
|
+ <c:forEach items="${identificationSecondList}" var="type">
|
|
|
|
+ <option value="${type.value}" <c:if test="${auditTemplate.identificationSecond eq type.value }">selected</c:if>>${type.label}</option>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item athird">
|
|
|
|
+ <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="rereset()">重置</button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div id="moresees" class="commonQuery lw12" style="clear:both;display:none;">
|
|
|
|
+ <div class="layui-item query athird">
|
|
|
|
+ <label class="layui-form-label double-line">三级模板类型:</label>
|
|
|
|
+ <div class="layui-input-block readOnlyFFF">
|
|
|
|
+ <select class="form-control simple-select" id="identificationThird" name="identificationThird" lay-filter="thirdFilter" >
|
|
|
|
+ <option value=""></option>
|
|
|
|
+ <c:forEach items="${identificationThirdList}" var="type">
|
|
|
|
+ <option value="${type.value}" <c:if test="${auditTemplate.identificationThird eq type.value }">selected</c:if>>${type.label}</option>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </select>
|
|
|
|
+ </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>
|
|
|
|
|
|
-<form:form id="inputForm" modelAttribute="auditTemplate" action="${ctx}/personOpinion/personOpinion/" 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 style="clear:both;"></div>
|
|
|
|
+ </div>
|
|
|
|
+ </form:form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div style="clear:both;"></div>
|
|
|
|
- </div>
|
|
|
|
- <div class="single-form">
|
|
|
|
- <div class="container" style="width: 98%">
|
|
|
|
- <div class="nav-btns">
|
|
|
|
- <div class="layui-btn-group" style="float: left">
|
|
|
|
- <button class="layui-btn layui-btn-sm layui-bg-blue" onclick="openDialogre('添加模板', '${ctx}/personOpinion/personOpinion/toAddSave','95%', '95%','','添加,关闭')"> 添加</button>
|
|
|
|
- <button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
|
|
|
|
+ <div class="full-width fl">
|
|
|
|
+ <div class="layui-form contentDetails contentShadow shadowLBR">
|
|
|
|
+ <div class="nav-btns">
|
|
|
|
+ <div class="layui-btn-group" style="margin-left: 15px;">
|
|
|
|
+ <button class="layui-btn layui-btn-sm layui-bg-blue" onclick="openDialogre('添加模板', '${ctx}/personOpinion/personOpinion/toAddSave','95%', '95%','','添加,关闭')"> 添加</button>
|
|
|
|
+ <button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="clear: both;"></div>
|
|
</div>
|
|
</div>
|
|
- <div style="clear: both;"></div>
|
|
|
|
- </div>
|
|
|
|
- <table class="oa-table layui-table">
|
|
|
|
- <thead>
|
|
|
|
|
|
+
|
|
|
|
+ <table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
|
|
|
|
+ <thead>
|
|
<th width="20%">模板类型</th>
|
|
<th width="20%">模板类型</th>
|
|
<th width="40%">模板</th>
|
|
<th width="40%">模板</th>
|
|
- <th width="20%">创建人</th>
|
|
|
|
|
|
+ <th width="10%">创建人</th>
|
|
|
|
+ <th width="10%">创建时间</th>
|
|
<th width="20%">操作</th>
|
|
<th width="20%">操作</th>
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
<c:forEach items="${page.list}" var="tem">
|
|
<c:forEach items="${page.list}" var="tem">
|
|
<tr align="center" >
|
|
<tr align="center" >
|
|
<td>${tem.name}</td>
|
|
<td>${tem.name}</td>
|
|
- <td><span title="${tem.content}">${tem.content}</span></td>
|
|
|
|
|
|
+ <td><span title="${tem.content}" style="width:200px;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;">${tem.content}</span></td>
|
|
<td>${tem.createBy.name}</td>
|
|
<td>${tem.createBy.name}</td>
|
|
|
|
+ <td><fmt:formatDate value="${tem.createDate}" pattern="yyyy-MM-dd"/></td>
|
|
<td>
|
|
<td>
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
<div class="op-btn-box">
|
|
<div class="op-btn-box">
|
|
<a href="${ctx}/personOpinion/personOpinion/delete?id=${tem.id}" onclick="return deleteByid('确认要删除该审核模板吗?', this.href)" class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
|
|
<a href="${ctx}/personOpinion/personOpinion/delete?id=${tem.id}" onclick="return deleteByid('确认要删除该审核模板吗?', this.href)" class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
|
|
</div>
|
|
</div>
|
|
<div class="op-btn-box">
|
|
<div class="op-btn-box">
|
|
- <a style="color: white" onclick="openDialogre('修改模板', '${ctx}/personOpinion/personOpinion/toAddSave?id=${tem.id}','80%', '70%','','修改,关闭')" class="layui-btn layui-btn-xs" >修改</a>
|
|
|
|
|
|
+ <a style="color: white" onclick="openDialogre('修改模板', '${ctx}/personOpinion/personOpinion/toAddSave?id=${tem.id}','80%', '70%','','修改,关闭')" class="layui-btn layui-btn-xs" >修改</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:forEach>
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- <!-- 分页代码 -->
|
|
|
|
- <table:page page="${page}"></table:page>
|
|
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+
|
|
|
|
+ <!-- 分页代码 -->
|
|
|
|
+ <table:page page="${page}"></table:page>
|
|
|
|
+ <div style="clear: both;"></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-</form:form>
|
|
|
|
|
|
+</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>
|
|
|
|
+ resizeListWindow2();
|
|
|
|
+ $(window).resize(function(){
|
|
|
|
+ resizeListWindow2();
|
|
|
|
+ });
|
|
|
|
|
|
|
|
+ /*使用模块加载的方式 加载文件*/
|
|
|
|
+ layui.config({
|
|
|
|
+ base: '${ctx}/resoueces/css/layui/module/'
|
|
|
|
+ }).use(['layer', 'table'], function () {
|
|
|
|
+
|
|
|
|
+ layui.form.on('select(firstFilter)',function (data) {
|
|
|
|
+ console.log(data.value)
|
|
|
|
+ if (data.value == "") {
|
|
|
|
+ $('#identificationSecond').html('<option value=""></option>');
|
|
|
|
+ $('#identificationThird').html('<option value=""></option>');
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ } else {
|
|
|
|
+ $('#identificationThird').html('<option value=""></option>');
|
|
|
|
+ $('#identificationSecond').html('<option value=""></option>')
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:'${ctx}/personOpinion/personOpinion/getMessage',
|
|
|
|
+ data:{"value":data.value},
|
|
|
|
+ dataType:"json",
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data) {
|
|
|
|
+ for (var info in data){
|
|
|
|
+ $('#identificationSecond').append(new Option(data[info].label,data[info].value));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ layui.form.on('select(secondFilter)',function (data) {
|
|
|
|
+ console.log(this.innerHTML)
|
|
|
|
+ $("#name").val(this.innerHTML)
|
|
|
|
+ if (data.value == "") {
|
|
|
|
+ $('#identificationThird').html('<option value=""></option>');
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ } else {
|
|
|
|
+ $('#identificationThird').html('<option value=""></option>')
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:'${ctx}/personOpinion/personOpinion/getMessage',
|
|
|
|
+ data:{"value":data.value},
|
|
|
|
+ dataType:"json",
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data) {
|
|
|
|
+ for (var info in data){
|
|
|
|
+ $('#identificationThird').append(new Option(data[info].label,data[info].value));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ layui.form.render("select");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|