| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>审核人追踪</title>
- <style>
- </style>
- </head>
- <body layout:fragment="content">
- <article class="page-container">
- <form id="searchForm">
- <div class="row cl" id="departmentCarrier" style="padding-left: 15px ">
- <input type="text" class="input-text" style="width: 200px;" placeholder="请输入审核人名称" id="checkName" name="checkName" />
- <span><a href="javascript:void(0);" onclick="searchCarrier()" class="btn btn-info radius"><i class="Hui-iconfont"></i> 搜索</a></span>
- </div>
- <div class="row cl" id="detailCarrier" style="padding-left: 15px; display: none;">
- <label>开始日期:</label>
- <input type="text" class="input-text" style="width:170px" readonly placeholder="请输入开始日期"
- id="begin_date" name="begin_date"/>
- <label>结束日期:</label>
- <input type="text" class="input-text" style="width:170px" readonly placeholder="请输入结束日期"
- id="end_date" name="end_date"/>
- <span class="select-box" style="width:170px;">
- <select class="select" th:name="businessType" th:id="businessType" onchange="getApprovalType()">
- <option value="">请选择政务类别</option>
- <option value="1" th:selected="${businessType}==1">区级工业经济扶持</option>
- <option value="2" th:selected="${businessType}==2">省市申报</option>
- <option value="3" th:selected="${businessType}==3">报表填报</option>
- <option value="4" th:selected="${businessType}==4">服务事项</option>
- <option value="5" th:selected="${businessType}==5">存量用地</option>
- </select>
- </span>
- <span class="select-box" style="width:170px; margin-right: 10px;">
- <select class="select" th:name="approvalStatus" th:id="approvalStatus">
- <option value="">请选择单据状态</option>
- <option th:each="item : ${approvalStatusList}" th:value="${item.value}" th:text="${item.name}"
- th:selected="${typeId}==${item.id}">
- </option>
- </select>
- </span>
- <input type="text" class="input-text" style="width:170px" placeholder="请输入申请单号" name="applyNo" th:id="number"
- th:value="${number}"/>
- <input type="text" class="input-text" style="width:170px" placeholder="请输入申请企业的名称" name="companyName"
- th:id="companyName"
- th:value="${companyName}"/>
- <span><a href="javascript:void(0);" onclick="applyCarrier()" class="btn btn-info radius"><i class="Hui-iconfont"></i> 搜索</a></span>
- </div>
- <div id="listContent">
- <div class="width-half" style="width: 25%;">
- <div class="chart_data">
- <ul id="tree" class="ztree"></ul>
- </div>
- </div>
- <div class="width-half" style="width: 75%; display: none;" id="tableView">
- <div>
- <div class="cl pd-5 bg-1 bk-gray mt-20">
- <input type="hidden" id="dataType" style="display: none;"/>
- <input type="hidden" id="searchCarrier" style="display: none;"/>
- <input type="hidden" id="departmentId" style="display: none;"/>
- <input type="hidden" id="userId" style="display: none;"/>
- <input type="hidden" id="exportData" style="display: none;"/>
- <span class="l" id="export" style="display: none">
- <a id="exportBtn" onclick="exportData()" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 导出Excel</a>
- <a href="javascript:;" onclick="comeback(1)" class="btn btn-info radius"> 返回</a>
- </span>
- <span class="r">共有数据:<strong th:text="${trackingDtoList.total}" id="total" >54</strong> 条</span>
- </div>
- <table id="dataTable" class="table table-border table-bordered table-bg table-hover">
- <thead>
- <tr class="text-c">
- <th width="25" style="display: none">id</th>
- <th>单位 </th>
- <th>人数 </th>
- <th>单据处理总量 </th>
- <th>工业用地(处理数量)</th>
- <th>区级工业经济扶持(处理数量)</th>
- <th>省市申报(处理数量)</th>
- <th>服务事项(处理数量)</th>
- <th>报表填报(处理数量)</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${trackingDtoList.list}" th:object="${model}">
- <td class="id" th:text="*{deaprtmentId}" style="display: none">1</td>
- <td th:text="*{departmentName}"></td>
- <td th:text="*{personNum}"></td>
- <td th:text="*{totalHandelNum}"></td>
- <td th:text="*{stocklandHandleNum}"></td>
- <td th:text="*{projectHandleNum}"></td>
- <td th:text="*{provincesHandleNum}"></td>
- <td th:text="*{mattersHandleNum}"></td>
- <td th:text="*{fillingHandleNum}"></td>
- <td class="td-manage">
- <a title="查看" href="javascript:void(0);" onclick="detailCarrier($(this).closest('tr').find('.id').text(),1)" class="ml-5" style="text-decoration:none">详情</a>
- </td>
- </tr>
- </tbody>
- </table>
- <div th:replace="admin/common/page :: page"></div>
- </div>
- </div>
- </div>
- </form>
- </article>
- <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
- <script th:inline="javascript">
- var obj = "";
- var ztreeTid = "";
- var setting = {
- view: {
- // addHoverDom: addHoverDom, // 用于当鼠标移动到节点上时,显示用户自定义控件。务必与 setting.view.removeHoverDom 同时使用
- // edit: addHoverDom, // 用于当鼠标移动到节点上时,显示用户自定义控件。务必与 setting.view.removeHoverDom 同时使用
- // removeHoverDom: removeHoverDom, // 用于当鼠标移出节点时,隐藏用户自定义控件。务必与 addHoverDom 同时使用
- dblClickExpand: false,
- selectedMulti: false
- },
- // edit: {
- // enable: true,
- // editNameSelectAll: true,// 节点编辑名称 input 初次显示时,设置 txt 内容是否为全选状态。
- // // removeTitle: "删除", // 删除按钮的 Title 辅助信息
- // // renameTitle: "编辑" // 编辑名称按钮的 Title 辅助信息。
- // },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "parent_id",
- rootPId: ""
- }
- },
- callback: {
- // beforeRemove: beforeRemove,//点击删除时触发,用来提示用户是否确定删除
- // beforeEditName: beforeEditName,//编辑结束时触发,用来验证输入的数据是否符合要求
- onClick: clickNode,//点击节点触发的事件
- beforeDrag: zTreeBeforeDrag
- }
- };
- function clickNode(e, treeId, treeNode) {
- ztreeTid = treeNode.id;
- console.log(ztreeTid);
- if (treeNode.id != '0') {
- departmentData(treeNode.id);
- $("#tableView").show();
- }
- }
- function departmentData(departmentId) {
- $.ajax({
- url: pagePath + "/track/tableView",
- type: "get",
- dataType: "json",
- data: {
- "departmentId": departmentId
- },
- success: function (data) {
- if (data.success){
- var obj = data.obj;
- var html = '<thead>' +
- ' <tr class="text-c">' +
- ' <th width="25" style="display: none">id</th>' +
- ' <th>单位 </th>' +
- ' <th>人数 </th>' +
- ' <th>单据处理总量 </th>' +
- ' <th>工业用地(处理数量)</th>' +
- ' <th>区级工业经济扶持(处理数量)</th>' +
- ' <th>省市申报(处理数量)</th>' +
- ' <th>服务事项(处理数量)</th>' +
- ' <th>报表填报(处理数量)</th>' +
- ' <th>操作</th>' +
- ' </tr>' +
- ' </thead>';
- html += '<tbody><tr class="text-c">' +
- ' <td class="id" style="display: none">'+obj.deaprtmentId+'</td>' +
- ' <td>'+obj.departmentName+'</td>' +
- ' <td>'+obj.personNum+'</td>' +
- ' <td>'+obj.totalHandelNum+'</td>' +
- ' <td>'+obj.stocklandHandleNum+'</td>' +
- ' <td>'+obj.projectHandleNum+'</td>' +
- ' <td>'+obj.provincesHandleNum+'</td>' +
- ' <td>'+obj.mattersHandleNum+'</td>' +
- ' <td>'+obj.fillingHandleNum+'</td>' +
- ' <td class="td-manage">' +
- ' <a title="查看" href="javascript:void(0);" onclick="detailCarrier($(this).closest(\'tr\').find(\'.id\').text(),1)" class="ml-5" style="text-decoration:none">详情</a>' +
- ' </td>' +
- ' </tr></tbody>';
- $("#total").text(1);
- $("#dataTable").html(html);
- }
- }
- });
- }
- function zTreeBeforeDrag(treeId,treeNodes) {
- return false;
- }
- $(function () {
- var zNodes = [[${treeNodeList}]];
- $.fn.zTree.init($("#tree"), setting, eval('(' + zNodes + ')'));
- var currPage = [[${trackingDtoList.pageNum}]];
- var pages = [[${trackingDtoList.pages}]];
- $("#pageNum").val(currPage);
- $("#pages").val(pages);
- loadPage(0);
- });
- function searchCarrier(){
- $("#searchCarrier").val(1);
- var data = $("#searchForm").toJSON();
- data.pageNum = 1;
- $.ajax({
- type: 'POST',
- url: pagePath + "/track/getTrackByUser",
- dataType:"json",
- data:data,
- success: function(result){
- console.log(result)
- if(result.success){
- console.log(result.obj.list)
- var html;
- html = getCarrierTable(result.obj.list);
- $("#dataTable").html(html);
- $("#total").text(result.obj.total);
- $("#pageNum").val(result.obj.pageNum);
- $("#pages").val(result.obj.pages);
- $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
- $("#export").css("display","block");
- $("#dataType").val(0);
- $("#exportData").val(0);
- loadPage(null,null);
- }else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- }
- function applyCarrier() {
- var userId = $("#userId").val();
- carrierInfo(userId, 1);
- }
- function detailCarrier(departmentId, pageNum) {
- $("#departmentId").val(departmentId);
- $("#pageNum").val(pageNum);
- var data ={};
- data.pageNum = pageNum;
- data.departmentId = departmentId;
- $.ajax({
- type: 'POST',
- url: pagePath + "/track/getTrackByUser",
- dataType:"json",
- data:data,
- success: function(result){
- console.log(result)
- if(result.success){
- console.log(result.obj.list)
- var html;
- html = getCarrierTable(result.obj.list);
- $("#dataTable").html(html);
- $("#total").text(result.obj.total);
- $("#pageNum").val(result.obj.pageNum);
- $("#pages").val(result.obj.pages);
- $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
- $("#export").css("display","block");
- $("#dataType").val(0);
- $("#exportData").val(0);
- loadPage(null,null);
- }else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- }
- function carrierInfo(userId, pageNum){
- $("#userId").val(userId);
- var data = $("#searchForm").toJSON();
- data.pageNum = pageNum;
- data.userId = userId;
- $.ajax({
- type: 'POST',
- url: pagePath + "/track/getDocumentByUser",
- dataType:"json",
- data:data,
- success: function(result){
- console.log(result);
- if(result.success){
- console.log(result.obj.list)
- var html;
- html = getCarrierInfoTable(result.obj.list);
- $("#dataTable").html(html);
- $("#detailCarrier").css("display","block");
- $("#departmentCarrier").css("display","none");
- $("#total").text(result.obj.total);
- $("#pageNum").val(result.obj.pageNum);
- $("#pages").val(result.obj.pages);
- // $("#detailContent").css("display","none");
- // $("#listContent").css("display","block");
- // $("#carrierContent").css("display","none");
- $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
- $("#export").css("display","block");
- $("#dataType").val(1);
- $("#exportData").val(1);
- loadPage(userId);
- }else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- }
- function goToDetail(title, id, businessType) {
- var index = layer_show(title, pagePath + '/track/orderDetail/' + id + '/' + businessType);
- layer.full(index);
- }
- function getCarrierTable(cattierList){
- var html = '<thead>' +
- ' <tr class="text-c">' +
- ' <th width="25" style="display: none">id</th>' +
- ' <th>审核人</th>' +
- ' <th>处理单据数量</th>' +
- ' <th>操作</th></tr></thead><tbody>';
- for(var i=0;i<cattierList.length;i++){
- html += '<tr class="text-c"> ' +
- '<td class="id" style="display: none">'+cattierList[i].userId+'</td>' +
- '<td>'+cattierList[i].checkName+'</td>' +
- '<td>'+cattierList[i].handleNum+'</td>' +
- '<td class="td-manage">' +
- '<a title="查看" href="javascript:void(0);" onclick="carrierInfo('+cattierList[i].userId+', 1)" class="ml-5" style="text-decoration:none">查看</a> ' +
- '</td></tr>';
- }
- html+='</tbody>';
- return html;
- }
- function getCarrierInfoTable(cattierList){
- var html = '<thead>' +
- ' <tr class="text-c">' +
- ' <th width="25" style="display: none">id</th>' +
- ' <th>审核人</th>' +
- ' <th>政务类型</th>' +
- ' <th>申请单号</th>' +
- ' <th>申请企业</th>' +
- ' <th>单据状态</th>' +
- ' <th>审核时间</th>' +
- ' <th>单据详情</th></tr></thead><tbody>';
- for(var i=0;i<cattierList.length;i++){
- html += '<tr class="text-c"> ' +
- '<td class="id" style="display: none">'+cattierList[i].applyId+'</td>' +
- '<td>'+cattierList[i].checkName+'</td>' +
- '<td>'+cattierList[i].affairsType+'</td>' +
- '<td>'+cattierList[i].applyNo+'</td>' +
- '<td>'+cattierList[i].company+'</td>' +
- '<td>'+cattierList[i].applyStatus+'</td>' +
- '<td>'+cattierList[i].approveTime+'</td>' +
- '<td class="td-manage">' +
- '<a title="查看" href="javascript:void(0);" onclick="goToDetail(\'查看详情\', '+cattierList[i].applyId+' , '+cattierList[i].businessType+')" class="ml-5" style="text-decoration:none">详情</a> ' +
- '</td></tr>';
- }
- html+='</tbody>';
- return html;
- }
- function getApprovalType() {
- var businessType = $('#businessType').val()
- if (businessType == "" || businessType == null || businessType == undefined) {
- $("#typeId").empty();
- $("#typeId").append('<option value="">请选择单据状态</option>');
- return;
- }
- $.ajax({
- type: "get",
- dataType: "json",
- url: pagePath + "/track/getApprovalStatus/" + businessType,
- data: {
- "timestamp": new Date().getTime()
- },
- success: function (result) {
- if (result.success) {
- var array = result.obj;
- if (array == null) return;
- var str = '<option value="">请选择单据状态</option>';
- for (var i = 0; i < array.length; i++) {
- str += '<option value="' + array[i].value + '">' + array[i].name + '</option>';
- }
- $("#approvalStatus").empty();
- $("#approvalStatus").append(str);
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- function loadPage(userId) {
- //显示分页的容器
- var paging = $("#paging");
- //当前页
- var pageNum = $("#pageNum").val();
- // //总页数
- var pages = $("#pages").val();
- //连续显示分页数
- var groups = 6;
- laypage({
- cont: paging, //容器,仅支持id名\原生DOM对象,jquery对象
- pages: pages, //总页数
- // skip:true, //是否开启跳页
- groups: groups, //连续显示分页数
- first:'首页', //首页
- last: '尾页', //尾页
- skin:'#1E9FFF', //皮肤
- curr: pageNum || 1, //当前页
- jump:function(obj,first){ //触发分页后的回调
- //触发分页后的回调,并传递当前页obj.cuur
- if(!first){
- if(userId!=null && userId.length!=0){
- carrierInfo(userId, obj.curr);
- }
- }
- }
- });
- }
- function exportData(){
- var dataType = $("#dataType").val();
- var userId = $("#userId").val();
- var departmentId = $("#departmentId").val();
- window.open(pagePath + "/track/exportExcelDate?dataType=" + dataType + "&departmentId=" + departmentId + "&userId=" + userId);
- }
- function comeback(){
- var dataType = $("#dataType").val();
- var searchValue = $("#searchCarrier").val();
- if(dataType == 0){
- // window.location.href=pagePath + "/track/reviewer";
- departmentData(ztreeTid);
- }
- if(dataType == 1){
- $("#detailCarrier").css("display","none");
- $("#departmentCarrier").css("display","block");
- if (searchValue == 1){
- searchCarrier();
- }
- else {
- var departmentId = $("#departmentId").val();
- var pageNum = $("#pageNum").val();
- detailCarrier(departmentId, pageNum);
- }
- }
- }
- laydate.render({
- elem: '#begin_date', //指定元素
- // min: 0
- });
- laydate.render({
- elem: '#end_date', //指定元素
- // min: 0
- });
- </script>
- </body>
- </html>
|