reviewer_tracking.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>审核人追踪</title>
  7. <style>
  8. </style>
  9. </head>
  10. <body layout:fragment="content">
  11. <article class="page-container">
  12. <form id="searchForm">
  13. <div class="row cl" id="departmentCarrier" style="padding-left: 15px ">
  14. <input type="text" class="input-text" style="width: 200px;" placeholder="请输入审核人名称" id="checkName" name="checkName" />
  15. <span><a href="javascript:void(0);" onclick="searchCarrier()" class="btn btn-info radius"><i class="Hui-iconfont">&#xe665;</i> 搜索</a></span>
  16. </div>
  17. <div class="row cl" id="detailCarrier" style="padding-left: 15px; display: none;">
  18. <label>开始日期:</label>
  19. <input type="text" class="input-text" style="width:170px" readonly placeholder="请输入开始日期"
  20. id="begin_date" name="begin_date"/>
  21. <label>结束日期:</label>
  22. <input type="text" class="input-text" style="width:170px" readonly placeholder="请输入结束日期"
  23. id="end_date" name="end_date"/>
  24. <span class="select-box" style="width:170px;">
  25. <select class="select" th:name="businessType" th:id="businessType" onchange="getApprovalType()">
  26. <option value="">请选择政务类别</option>
  27. <option value="1" th:selected="${businessType}==1">区级工业经济扶持</option>
  28. <option value="2" th:selected="${businessType}==2">省市申报</option>
  29. <option value="3" th:selected="${businessType}==3">报表填报</option>
  30. <option value="4" th:selected="${businessType}==4">服务事项</option>
  31. <option value="5" th:selected="${businessType}==5">存量用地</option>
  32. </select>
  33. </span>
  34. <span class="select-box" style="width:170px; margin-right: 10px;">
  35. <select class="select" th:name="approvalStatus" th:id="approvalStatus">
  36. <option value="">请选择单据状态</option>
  37. <option th:each="item : ${approvalStatusList}" th:value="${item.value}" th:text="${item.name}"
  38. th:selected="${typeId}==${item.id}">
  39. </option>
  40. </select>
  41. </span>
  42. <input type="text" class="input-text" style="width:170px" placeholder="请输入申请单号" name="applyNo" th:id="number"
  43. th:value="${number}"/>
  44. <input type="text" class="input-text" style="width:170px" placeholder="请输入申请企业的名称" name="companyName"
  45. th:id="companyName"
  46. th:value="${companyName}"/>
  47. <span><a href="javascript:void(0);" onclick="applyCarrier()" class="btn btn-info radius"><i class="Hui-iconfont">&#xe665;</i> 搜索</a></span>
  48. </div>
  49. <div id="listContent">
  50. <div class="width-half" style="width: 25%;">
  51. <div class="chart_data">
  52. <ul id="tree" class="ztree"></ul>
  53. </div>
  54. </div>
  55. <div class="width-half" style="width: 75%; display: none;" id="tableView">
  56. <div>
  57. <div class="cl pd-5 bg-1 bk-gray mt-20">
  58. <input type="hidden" id="dataType" style="display: none;"/>
  59. <input type="hidden" id="searchCarrier" style="display: none;"/>
  60. <input type="hidden" id="departmentId" style="display: none;"/>
  61. <input type="hidden" id="userId" style="display: none;"/>
  62. <input type="hidden" id="exportData" style="display: none;"/>
  63. <span class="l" id="export" style="display: none">
  64. <a id="exportBtn" onclick="exportData()" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 导出Excel</a>
  65. <a href="javascript:;" onclick="comeback(1)" class="btn btn-info radius"> 返回</a>
  66. </span>
  67. <span class="r">共有数据:<strong th:text="${trackingDtoList.total}" id="total" >54</strong> 条</span>
  68. </div>
  69. <table id="dataTable" class="table table-border table-bordered table-bg table-hover">
  70. <thead>
  71. <tr class="text-c">
  72. <th width="25" style="display: none">id</th>
  73. <th>单位 </th>
  74. <th>人数 </th>
  75. <th>单据处理总量 </th>
  76. <th>工业用地(处理数量)</th>
  77. <th>区级工业经济扶持(处理数量)</th>
  78. <th>省市申报(处理数量)</th>
  79. <th>服务事项(处理数量)</th>
  80. <th>报表填报(处理数量)</th>
  81. <th>操作</th>
  82. </tr>
  83. </thead>
  84. <tbody>
  85. <tr class="text-c" th:each="model,iterStat:${trackingDtoList.list}" th:object="${model}">
  86. <td class="id" th:text="*{deaprtmentId}" style="display: none">1</td>
  87. <td th:text="*{departmentName}"></td>
  88. <td th:text="*{personNum}"></td>
  89. <td th:text="*{totalHandelNum}"></td>
  90. <td th:text="*{stocklandHandleNum}"></td>
  91. <td th:text="*{projectHandleNum}"></td>
  92. <td th:text="*{provincesHandleNum}"></td>
  93. <td th:text="*{mattersHandleNum}"></td>
  94. <td th:text="*{fillingHandleNum}"></td>
  95. <td class="td-manage">
  96. <a title="查看" href="javascript:void(0);" onclick="detailCarrier($(this).closest('tr').find('.id').text(),1)" class="ml-5" style="text-decoration:none">详情</a>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <div th:replace="admin/common/page :: page"></div>
  102. </div>
  103. </div>
  104. </div>
  105. </form>
  106. </article>
  107. <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
  108. <script th:inline="javascript">
  109. var obj = "";
  110. var ztreeTid = "";
  111. var setting = {
  112. view: {
  113. // addHoverDom: addHoverDom, // 用于当鼠标移动到节点上时,显示用户自定义控件。务必与 setting.view.removeHoverDom 同时使用
  114. // edit: addHoverDom, // 用于当鼠标移动到节点上时,显示用户自定义控件。务必与 setting.view.removeHoverDom 同时使用
  115. // removeHoverDom: removeHoverDom, // 用于当鼠标移出节点时,隐藏用户自定义控件。务必与 addHoverDom 同时使用
  116. dblClickExpand: false,
  117. selectedMulti: false
  118. },
  119. // edit: {
  120. // enable: true,
  121. // editNameSelectAll: true,// 节点编辑名称 input 初次显示时,设置 txt 内容是否为全选状态。
  122. // // removeTitle: "删除", // 删除按钮的 Title 辅助信息
  123. // // renameTitle: "编辑" // 编辑名称按钮的 Title 辅助信息。
  124. // },
  125. data: {
  126. simpleData: {
  127. enable: true,
  128. idKey: "id",
  129. pIdKey: "parent_id",
  130. rootPId: ""
  131. }
  132. },
  133. callback: {
  134. // beforeRemove: beforeRemove,//点击删除时触发,用来提示用户是否确定删除
  135. // beforeEditName: beforeEditName,//编辑结束时触发,用来验证输入的数据是否符合要求
  136. onClick: clickNode,//点击节点触发的事件
  137. beforeDrag: zTreeBeforeDrag
  138. }
  139. };
  140. function clickNode(e, treeId, treeNode) {
  141. ztreeTid = treeNode.id;
  142. console.log(ztreeTid);
  143. if (treeNode.id != '0') {
  144. departmentData(treeNode.id);
  145. $("#tableView").show();
  146. }
  147. }
  148. function departmentData(departmentId) {
  149. $.ajax({
  150. url: pagePath + "/track/tableView",
  151. type: "get",
  152. dataType: "json",
  153. data: {
  154. "departmentId": departmentId
  155. },
  156. success: function (data) {
  157. if (data.success){
  158. var obj = data.obj;
  159. var html = '<thead>' +
  160. ' <tr class="text-c">' +
  161. ' <th width="25" style="display: none">id</th>' +
  162. ' <th>单位 </th>' +
  163. ' <th>人数 </th>' +
  164. ' <th>单据处理总量 </th>' +
  165. ' <th>工业用地(处理数量)</th>' +
  166. ' <th>区级工业经济扶持(处理数量)</th>' +
  167. ' <th>省市申报(处理数量)</th>' +
  168. ' <th>服务事项(处理数量)</th>' +
  169. ' <th>报表填报(处理数量)</th>' +
  170. ' <th>操作</th>' +
  171. ' </tr>' +
  172. ' </thead>';
  173. html += '<tbody><tr class="text-c">' +
  174. ' <td class="id" style="display: none">'+obj.deaprtmentId+'</td>' +
  175. ' <td>'+obj.departmentName+'</td>' +
  176. ' <td>'+obj.personNum+'</td>' +
  177. ' <td>'+obj.totalHandelNum+'</td>' +
  178. ' <td>'+obj.stocklandHandleNum+'</td>' +
  179. ' <td>'+obj.projectHandleNum+'</td>' +
  180. ' <td>'+obj.provincesHandleNum+'</td>' +
  181. ' <td>'+obj.mattersHandleNum+'</td>' +
  182. ' <td>'+obj.fillingHandleNum+'</td>' +
  183. ' <td class="td-manage">' +
  184. ' <a title="查看" href="javascript:void(0);" onclick="detailCarrier($(this).closest(\'tr\').find(\'.id\').text(),1)" class="ml-5" style="text-decoration:none">详情</a>' +
  185. ' </td>' +
  186. ' </tr></tbody>';
  187. $("#total").text(1);
  188. $("#dataTable").html(html);
  189. }
  190. }
  191. });
  192. }
  193. function zTreeBeforeDrag(treeId,treeNodes) {
  194. return false;
  195. }
  196. $(function () {
  197. var zNodes = [[${treeNodeList}]];
  198. $.fn.zTree.init($("#tree"), setting, eval('(' + zNodes + ')'));
  199. var currPage = [[${trackingDtoList.pageNum}]];
  200. var pages = [[${trackingDtoList.pages}]];
  201. $("#pageNum").val(currPage);
  202. $("#pages").val(pages);
  203. loadPage(0);
  204. });
  205. function searchCarrier(){
  206. $("#searchCarrier").val(1);
  207. var data = $("#searchForm").toJSON();
  208. data.pageNum = 1;
  209. $.ajax({
  210. type: 'POST',
  211. url: pagePath + "/track/getTrackByUser",
  212. dataType:"json",
  213. data:data,
  214. success: function(result){
  215. console.log(result)
  216. if(result.success){
  217. console.log(result.obj.list)
  218. var html;
  219. html = getCarrierTable(result.obj.list);
  220. $("#dataTable").html(html);
  221. $("#total").text(result.obj.total);
  222. $("#pageNum").val(result.obj.pageNum);
  223. $("#pages").val(result.obj.pages);
  224. $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
  225. $("#export").css("display","block");
  226. $("#dataType").val(0);
  227. $("#exportData").val(0);
  228. loadPage(null,null);
  229. }else {
  230. errorMessage(result.message);
  231. }
  232. },
  233. error: function () {
  234. errorMessage('系统错误!');
  235. }
  236. })
  237. }
  238. function applyCarrier() {
  239. var userId = $("#userId").val();
  240. carrierInfo(userId, 1);
  241. }
  242. function detailCarrier(departmentId, pageNum) {
  243. $("#departmentId").val(departmentId);
  244. $("#pageNum").val(pageNum);
  245. var data ={};
  246. data.pageNum = pageNum;
  247. data.departmentId = departmentId;
  248. $.ajax({
  249. type: 'POST',
  250. url: pagePath + "/track/getTrackByUser",
  251. dataType:"json",
  252. data:data,
  253. success: function(result){
  254. console.log(result)
  255. if(result.success){
  256. console.log(result.obj.list)
  257. var html;
  258. html = getCarrierTable(result.obj.list);
  259. $("#dataTable").html(html);
  260. $("#total").text(result.obj.total);
  261. $("#pageNum").val(result.obj.pageNum);
  262. $("#pages").val(result.obj.pages);
  263. $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
  264. $("#export").css("display","block");
  265. $("#dataType").val(0);
  266. $("#exportData").val(0);
  267. loadPage(null,null);
  268. }else {
  269. errorMessage(result.message);
  270. }
  271. },
  272. error: function () {
  273. errorMessage('系统错误!');
  274. }
  275. })
  276. }
  277. function carrierInfo(userId, pageNum){
  278. $("#userId").val(userId);
  279. var data = $("#searchForm").toJSON();
  280. data.pageNum = pageNum;
  281. data.userId = userId;
  282. $.ajax({
  283. type: 'POST',
  284. url: pagePath + "/track/getDocumentByUser",
  285. dataType:"json",
  286. data:data,
  287. success: function(result){
  288. console.log(result);
  289. if(result.success){
  290. console.log(result.obj.list)
  291. var html;
  292. html = getCarrierInfoTable(result.obj.list);
  293. $("#dataTable").html(html);
  294. $("#detailCarrier").css("display","block");
  295. $("#departmentCarrier").css("display","none");
  296. $("#total").text(result.obj.total);
  297. $("#pageNum").val(result.obj.pageNum);
  298. $("#pages").val(result.obj.pages);
  299. // $("#detailContent").css("display","none");
  300. // $("#listContent").css("display","block");
  301. // $("#carrierContent").css("display","none");
  302. $("#exportBtn").attr("onclick","exportData("+JSON.stringify(data)+")");
  303. $("#export").css("display","block");
  304. $("#dataType").val(1);
  305. $("#exportData").val(1);
  306. loadPage(userId);
  307. }else {
  308. errorMessage(result.message);
  309. }
  310. },
  311. error: function () {
  312. errorMessage('系统错误!');
  313. }
  314. })
  315. }
  316. function goToDetail(title, id, businessType) {
  317. var index = layer_show(title, pagePath + '/track/orderDetail/' + id + '/' + businessType);
  318. layer.full(index);
  319. }
  320. function getCarrierTable(cattierList){
  321. var html = '<thead>' +
  322. ' <tr class="text-c">' +
  323. ' <th width="25" style="display: none">id</th>' +
  324. ' <th>审核人</th>' +
  325. ' <th>处理单据数量</th>' +
  326. ' <th>操作</th></tr></thead><tbody>';
  327. for(var i=0;i<cattierList.length;i++){
  328. html += '<tr class="text-c"> ' +
  329. '<td class="id" style="display: none">'+cattierList[i].userId+'</td>' +
  330. '<td>'+cattierList[i].checkName+'</td>' +
  331. '<td>'+cattierList[i].handleNum+'</td>' +
  332. '<td class="td-manage">' +
  333. '<a title="查看" href="javascript:void(0);" onclick="carrierInfo('+cattierList[i].userId+', 1)" class="ml-5" style="text-decoration:none">查看</a> ' +
  334. '</td></tr>';
  335. }
  336. html+='</tbody>';
  337. return html;
  338. }
  339. function getCarrierInfoTable(cattierList){
  340. var html = '<thead>' +
  341. ' <tr class="text-c">' +
  342. ' <th width="25" style="display: none">id</th>' +
  343. ' <th>审核人</th>' +
  344. ' <th>政务类型</th>' +
  345. ' <th>申请单号</th>' +
  346. ' <th>申请企业</th>' +
  347. ' <th>单据状态</th>' +
  348. ' <th>审核时间</th>' +
  349. ' <th>单据详情</th></tr></thead><tbody>';
  350. for(var i=0;i<cattierList.length;i++){
  351. html += '<tr class="text-c"> ' +
  352. '<td class="id" style="display: none">'+cattierList[i].applyId+'</td>' +
  353. '<td>'+cattierList[i].checkName+'</td>' +
  354. '<td>'+cattierList[i].affairsType+'</td>' +
  355. '<td>'+cattierList[i].applyNo+'</td>' +
  356. '<td>'+cattierList[i].company+'</td>' +
  357. '<td>'+cattierList[i].applyStatus+'</td>' +
  358. '<td>'+cattierList[i].approveTime+'</td>' +
  359. '<td class="td-manage">' +
  360. '<a title="查看" href="javascript:void(0);" onclick="goToDetail(\'查看详情\', '+cattierList[i].applyId+' , '+cattierList[i].businessType+')" class="ml-5" style="text-decoration:none">详情</a> ' +
  361. '</td></tr>';
  362. }
  363. html+='</tbody>';
  364. return html;
  365. }
  366. function getApprovalType() {
  367. var businessType = $('#businessType').val()
  368. if (businessType == "" || businessType == null || businessType == undefined) {
  369. $("#typeId").empty();
  370. $("#typeId").append('<option value="">请选择单据状态</option>');
  371. return;
  372. }
  373. $.ajax({
  374. type: "get",
  375. dataType: "json",
  376. url: pagePath + "/track/getApprovalStatus/" + businessType,
  377. data: {
  378. "timestamp": new Date().getTime()
  379. },
  380. success: function (result) {
  381. if (result.success) {
  382. var array = result.obj;
  383. if (array == null) return;
  384. var str = '<option value="">请选择单据状态</option>';
  385. for (var i = 0; i < array.length; i++) {
  386. str += '<option value="' + array[i].value + '">' + array[i].name + '</option>';
  387. }
  388. $("#approvalStatus").empty();
  389. $("#approvalStatus").append(str);
  390. } else {
  391. errorMessage(result.message);
  392. }
  393. },
  394. error: function () {
  395. errorMessage('系统错误!');
  396. }
  397. });
  398. }
  399. function loadPage(userId) {
  400. //显示分页的容器
  401. var paging = $("#paging");
  402. //当前页
  403. var pageNum = $("#pageNum").val();
  404. // //总页数
  405. var pages = $("#pages").val();
  406. //连续显示分页数
  407. var groups = 6;
  408. laypage({
  409. cont: paging, //容器,仅支持id名\原生DOM对象,jquery对象
  410. pages: pages, //总页数
  411. // skip:true, //是否开启跳页
  412. groups: groups, //连续显示分页数
  413. first:'首页', //首页
  414. last: '尾页', //尾页
  415. skin:'#1E9FFF', //皮肤
  416. curr: pageNum || 1, //当前页
  417. jump:function(obj,first){ //触发分页后的回调
  418. //触发分页后的回调,并传递当前页obj.cuur
  419. if(!first){
  420. if(userId!=null && userId.length!=0){
  421. carrierInfo(userId, obj.curr);
  422. }
  423. }
  424. }
  425. });
  426. }
  427. function exportData(){
  428. var dataType = $("#dataType").val();
  429. var userId = $("#userId").val();
  430. var departmentId = $("#departmentId").val();
  431. window.open(pagePath + "/track/exportExcelDate?dataType=" + dataType + "&departmentId=" + departmentId + "&userId=" + userId);
  432. }
  433. function comeback(){
  434. var dataType = $("#dataType").val();
  435. var searchValue = $("#searchCarrier").val();
  436. if(dataType == 0){
  437. // window.location.href=pagePath + "/track/reviewer";
  438. departmentData(ztreeTid);
  439. }
  440. if(dataType == 1){
  441. $("#detailCarrier").css("display","none");
  442. $("#departmentCarrier").css("display","block");
  443. if (searchValue == 1){
  444. searchCarrier();
  445. }
  446. else {
  447. var departmentId = $("#departmentId").val();
  448. var pageNum = $("#pageNum").val();
  449. detailCarrier(departmentId, pageNum);
  450. }
  451. }
  452. }
  453. laydate.render({
  454. elem: '#begin_date', //指定元素
  455. // min: 0
  456. });
  457. laydate.render({
  458. elem: '#end_date', //指定元素
  459. // min: 0
  460. });
  461. </script>
  462. </body>
  463. </html>