7 changed files with 628 additions and 6 deletions
@ -0,0 +1,260 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('非行政执法登记列表')" /> |
||||
|
<link type="text/css" href="/css/stat1.css" rel="stylesheet" /> |
||||
|
</head> |
||||
|
<body class="gray-bg"> |
||||
|
<div class="container-div"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 search-collapse"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<p>执法单位:</p> |
||||
|
<input type="text" name="bureauDeptName"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>执法人员:</p> |
||||
|
<input type="text" name="lawEnforcer"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>企业名称:</p> |
||||
|
<input type="text" name="enterpriseName"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>入企事项:</p> |
||||
|
<input type="text" name="lawEnforcementItemText"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>入企类别:</p> |
||||
|
<select id="checkCategory" name="lawEnforcementType" th:with="type=${@dict.getType('check_category')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>企业注册地:</p> |
||||
|
<input type="hidden" name="areaText" id="areaText"> |
||||
|
<input type="hidden" name="streetText" id="streetText"> |
||||
|
<select id="area" name="area" th:with="type=${@dict.getType('address_type')}" onchange="areaChange(this)"> |
||||
|
<option value="">全市</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
<select id="street" name="street"> |
||||
|
<option value="">所有街道</option> |
||||
|
<option th:fragment="jd" th:each="j:${jdList}" th:text="${j.dictLabel}" th:value="${j.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>时段:</p> |
||||
|
<select id="year" name="year"> |
||||
|
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option> |
||||
|
</select> |
||||
|
<select id="dateSearch" name="dateSearch" onchange="timeChange()" > |
||||
|
<option value="year">年度</option> |
||||
|
<option value="quarter">季度</option> |
||||
|
<option value="month">月度</option> |
||||
|
<option value="selectTime">自定义时段</option> |
||||
|
</select> |
||||
|
<select id="quarter" name="quarter"> |
||||
|
<option value="">所有</option> |
||||
|
<option value="1">第1季度</option> |
||||
|
<option value="2">第2季度</option> |
||||
|
<option value="3">第3季度</option> |
||||
|
<option value="4">第4季度</option> |
||||
|
</select> |
||||
|
<select id="month" name="month"> |
||||
|
<option value="">所有</option> |
||||
|
<option value="01">1月</option> |
||||
|
<option value="02">2月</option> |
||||
|
<option value="03">3月</option> |
||||
|
<option value="04">4月</option> |
||||
|
<option value="05">5月</option> |
||||
|
<option value="06">6月</option> |
||||
|
<option value="07">7月</option> |
||||
|
<option value="08">8月</option> |
||||
|
<option value="09">9月</option> |
||||
|
<option value="10">10月</option> |
||||
|
<option value="11">11月</option> |
||||
|
<option value="12">12月</option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li id="selectTime" class="select-time"> |
||||
|
<p>检查时间:</p> |
||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="startTime"/> |
||||
|
<span>-</span> |
||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<a class="btn btn-success btn-sm" onclick="searchList()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-reset btn-sm" onclick="resetList()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
<a class="btn btn-warning btn-sm" onclick="downloadExcel()"><i class="fa fa-share-square-o"></i> 导出</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</form> |
||||
|
<div class="col-sm-12 select-table table-bordered"> |
||||
|
<table id="bootstrap-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="zdxtInclude :: footer" /> |
||||
|
<script type="text/javascript" src="/js/echarts.min.js"></script> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/registration"; |
||||
|
$(function() { |
||||
|
if($("#area option:selected").val()!=""){ |
||||
|
$("#areaText").val($("#area option:selected").text()); |
||||
|
} |
||||
|
if($("#street option:selected").val()!=""){ |
||||
|
$("#streetText").val($("#street option:selected").text()); |
||||
|
} |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
$("#selectTime").hide(); |
||||
|
init(); |
||||
|
}); |
||||
|
|
||||
|
// search |
||||
|
function searchList(){ |
||||
|
if($("#area option:selected").val()!=""){ |
||||
|
$("#areaText").val($("#area option:selected").text()); |
||||
|
} |
||||
|
if($("#street option:selected").val()!=""){ |
||||
|
$("#streetText").val($("#street option:selected").text()); |
||||
|
} |
||||
|
$.table.search() |
||||
|
} |
||||
|
|
||||
|
// reset |
||||
|
function resetList(){ |
||||
|
$("#year").show(); |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
$("#selectTime").hide(); |
||||
|
$.form.reset() |
||||
|
} |
||||
|
|
||||
|
// table |
||||
|
function init(){ |
||||
|
var options = { |
||||
|
url:prefix+"/getList", |
||||
|
modalName: "非行政检查", |
||||
|
showFooter: false, |
||||
|
showColumns: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showHeader: true, |
||||
|
height:$(window).height()-$(".search-collapse").height()-$("#toolbar").height()-50, |
||||
|
columns: [ |
||||
|
{ |
||||
|
field : 'enterpriseName', |
||||
|
title : '被检查企业名称', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'area', |
||||
|
title : '企业注册地', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'street', |
||||
|
title : '企业所属街道', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'bureauDeptName', |
||||
|
title : '执法单位', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'lawEnforcer', |
||||
|
title : '执法人员', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'enforcementTime', |
||||
|
title : '检查时间', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'lawEnforcementTypeText', |
||||
|
title : '入企类别', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'lawEnforcementItemText', |
||||
|
title : '入企事项', |
||||
|
align :'center' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'lawEnforcementBasisText', |
||||
|
title : '活动依据', |
||||
|
align :'center' |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
} |
||||
|
|
||||
|
// 时间选择 |
||||
|
function timeChange() { |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
$("#selectTime").hide(); |
||||
|
var type = $("#dateSearch option:selected").val(); |
||||
|
if(type==="year")$("#year").show(); |
||||
|
if(type==="quarter") $("#quarter").show(); |
||||
|
if(type==="month") $("#month").show(); |
||||
|
if(type==="selectTime"){ |
||||
|
$("#year").hide(); |
||||
|
$("#selectTime").show(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 获取街道 |
||||
|
function areaChange(obj){ |
||||
|
var html="<option value=''>所有街道</option>" |
||||
|
var area =$(obj).val(); |
||||
|
if(area!=""){ |
||||
|
$.ajax({ |
||||
|
url:prefix+'/getStreetList', |
||||
|
type:'post', |
||||
|
data: {"type":area}, |
||||
|
success: function (res) { |
||||
|
if(res.length!=0){ |
||||
|
res.forEach(r=>{ |
||||
|
html+="<option value='"+r.dictValue+"'>"+r.dictLabel+"</option>"; |
||||
|
}) |
||||
|
$("#street").html(""); |
||||
|
$("#street").html(html); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}else{ |
||||
|
$("#street").html(""); |
||||
|
$("#street").html(html); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 下载excel |
||||
|
function downloadExcel(){ |
||||
|
var currentId=$('form').eq(0).attr('id'); |
||||
|
var params = $.common.formToJSON(currentId); |
||||
|
let paramsList=[] |
||||
|
for(var key in params){ |
||||
|
if (params.hasOwnProperty(key)) { |
||||
|
var value = params[key]; |
||||
|
// 检查值是否为空 |
||||
|
if (value!== null && value!== undefined && value!== '') { |
||||
|
paramsList.push(key + '=' + value); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
window.location.href = prefix +"/downloadExcel?"+paramsList.join("&"); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
Loading…
Reference in new issue