1.来函信息页面修改及后台实现
2.国际化添加
This commit is contained in:
136
src/main/webapp/WEB-INF/tags/sys/delRow.tag
Normal file
136
src/main/webapp/WEB-INF/tags/sys/delRow.tag
Normal file
@@ -0,0 +1,136 @@
|
||||
<%@ tag language="java" pageEncoding="UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<%@ attribute name="id" type="java.lang.String" required="true"%>
|
||||
<%@ attribute name="url" type="java.lang.String" required="true"%>
|
||||
<%@ attribute name="label" type="java.lang.String" required="false"%>
|
||||
<c:choose>
|
||||
<c:when test="${label eq 'delete'}">
|
||||
<button class="btn btn-default" onclick="del('${url}')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</button>
|
||||
</c:when>
|
||||
|
||||
<c:when test="${label eq 'approved'}">
|
||||
<a href="javascript:void(0);" onclick="passOpt('${url}')"><i class="fa fa-check"></i> <spring:message code="approved"/></a>
|
||||
</c:when>
|
||||
<c:when test="${label eq 'unapproved'}">
|
||||
<a href="javascript:void(0);" onclick="noPassOpt('${url}')"><i class="fa fa-remove"></i> <spring:message code="unapproved"/></a>
|
||||
</c:when>
|
||||
<c:when test="${label eq 'cancelPass'}">
|
||||
<a href="javascript:void(0);" onclick="cancelPassOpt('${url}')"><i class="fa fa-undo"></i> <spring:message code="cancel_approved"/></a>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<%-- 使用方法: 1.将本tag写在查询的form之前;2.传入table的id和controller的url --%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#${id} thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
|
||||
$('#${id} tbody tr td input.i-checks').iCheck('check');
|
||||
});
|
||||
|
||||
$('#${id} thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
|
||||
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
|
||||
});
|
||||
});
|
||||
//删除
|
||||
function del(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validatePass(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//通过
|
||||
function passOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validatePass(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//未通过
|
||||
function noPassOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validatePass(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//配置取消
|
||||
function cancelPassOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validatePass(checkboxes)){
|
||||
doAll(checkboxes,url);
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='hasnot_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
function doAll(checkboxes,url){
|
||||
// var url = $(this).attr('data-url');
|
||||
var str="";
|
||||
var ids="";
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
str+=$(this).attr("id")+",";
|
||||
}
|
||||
});
|
||||
if(str.substr(str.length-1)== ','){
|
||||
ids = str.substr(0,str.length-1);
|
||||
}
|
||||
if(ids == ""){
|
||||
//top.$.jBox.tip("不能选择公共模型("+nodes[i].name+")请重新选择。");
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if(v=="ok"){
|
||||
window.location = url+"?ids="+ids;
|
||||
//$("#searchForm").submit();
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}
|
||||
//验证选择的配置,是否有审核通过的
|
||||
function validatePass(checkboxes){
|
||||
var flag = false;
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
if($(this).val()==1){
|
||||
flag = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
}
|
||||
</script>
|
||||
@@ -13,7 +13,7 @@
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/request/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message><spring:message code="requestInfo"></spring:message></button>
|
||||
<spring:message code="add"/></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<div class="pull-left">
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small" >
|
||||
<form:option value="">所有状态</form:option>
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
@@ -50,14 +50,14 @@
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<select id="seltype" class="selectpicker select2 input-small" >
|
||||
<option value="requestTitle"><spring:message code="title"></spring:message></option>
|
||||
<option value="requestNumber"><spring:message code="request_number"></spring:message></option>
|
||||
<option value="requestContent"><spring:message code="content"></spring:message></option>
|
||||
</select>
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="requestTitle"><spring:message code="title"></spring:message></form:option>
|
||||
<form:option value="requestNumber"><spring:message code="request_number"></spring:message></form:option>
|
||||
<form:option value="requestContent"><spring:message code="content"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" placeholder="请输入标题" type="text">
|
||||
<input id="intype" class="form-control input-medium" placeholder=<spring:message code="input_title"/> type="text" value="">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||
@@ -65,28 +65,27 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"></spring:message> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
|
||||
<button type="button" class="btn btn-default">
|
||||
<i class="fa fa-edit"></i> 编辑</button>
|
||||
<button type="button" class="btn btn-default">
|
||||
<i class="fa fa-trash"></i> 删除</button>
|
||||
<button type="button" class="btn btn-default" onclick="edit()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||
<sys:delRow url="${ctx}/cfg/request/delete" id="contentTable" label="delete"></sys:delRow>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> 审核
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="javascript:void(0);" onclick="passOpt()"><i class="fa fa-check"></i> 通过</a></li>
|
||||
<li><a href="javascript:void(0);" onclick="noPassOpt()"><i class="fa fa-remove"></i> 未通过</a></li>
|
||||
<li><a href="javascript:void(0);" onclick="cancelPassOpt()"><i class="fa fa-undo"></i> 配置取消</a></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/request/requestExamine" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/request/requestExamineNo" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/request/requestCancelExamine" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -109,14 +108,14 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label>来函时间:</label>
|
||||
<label><spring:message code="request_time"/>:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate" data-options="buttons:buttons"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label>到</label>
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
@@ -127,18 +126,18 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label>操作时间:</label>
|
||||
<label><spring:message code="operate_time"/>:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<input id="dobeginDate" name="dobeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.dobeginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label>到</label>
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<input id="doendDate" name="doendDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.doendDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,8 +146,8 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> 搜索 </button>
|
||||
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
|
||||
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" onclick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -170,7 +169,7 @@
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="ckboxs"></th>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="seq"></spring:message></th>
|
||||
<th><spring:message code="request_number"></spring:message></th>
|
||||
<th><spring:message code="request_organization"></spring:message></th>
|
||||
@@ -187,7 +186,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="requestInfo">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="ckbox"></td>
|
||||
<td><input type="checkbox" class="i-checks" id="${requestInfo.id}" value="${requestInfo.isAudit}"></td>
|
||||
<td>${requestInfo.id }</td>
|
||||
<td>${requestInfo.requestNumber }</td>
|
||||
<td>${requestInfo.requestOrg }</td>
|
||||
@@ -215,28 +214,6 @@
|
||||
<td>${requestInfo.requestContent }</td>
|
||||
<td>${requestInfo.taskName }</td>
|
||||
<td>
|
||||
<%-- <div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<!-- 审核未通过可修改 -->
|
||||
<c:choose>
|
||||
<c:when test="${requestInfo.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/request/requestCancelExamine?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${requestInfo.isAudit ne '2'}">
|
||||
<li><a href="${ctx}/cfg/request/requestExamineNo?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/requestExamine?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/form?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/delete?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="${ctx}/cfg/request/requestExamine?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/form?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="edit"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/request/delete?id=${requestInfo.id}" onclick="return confirmx('<spring:message code="confirm_message"/>', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
</div> --%>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
@@ -253,6 +230,18 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
if("${requestInfo.requestTitle}"){
|
||||
$("#intype").val("${requestInfo.requestTitle}");
|
||||
}
|
||||
if("${requestInfo.requestNumber}"){
|
||||
$("#intype").val("${requestInfo.requestNumber}");
|
||||
}
|
||||
if("${requestInfo.requestContent}"){
|
||||
$("#intype").val("${requestInfo.requestContent}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/>"+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
|
||||
@@ -261,28 +250,57 @@
|
||||
});
|
||||
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/>"+$(this).find("option:selected").text());
|
||||
});
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
if($("#checkAll").prop("checked")){
|
||||
$("input.i-checks").prop("checked",true);
|
||||
}else{
|
||||
$("input.i-checks").prop("checked",false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function reset(){
|
||||
$("#searchForm").reset();
|
||||
function resetx(){
|
||||
// $("#searchForm").reset();
|
||||
$(':input','#searchForm')
|
||||
.not(':button,:submit,:reset,:hidden')
|
||||
.val('')
|
||||
.removeAttr('checked')
|
||||
.removeAttr('selected');
|
||||
}
|
||||
|
||||
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/cfg/request/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
//编辑
|
||||
function edit(){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = "${ctx}/cfg/request/form?id="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user