list_approve.html 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>审批列表</title>
  7. <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
  8. <link rel="stylesheet" th:href="@{/css/public.css}" media="all">
  9. <link rel="stylesheet" th:href="@{/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">
  10. </head>
  11. <body>
  12. <div class="layuimini-container">
  13. <div class="layuimini-main">
  14. <form class="layui-form" action="" lay-filter="formDemo">
  15. <div class="layui-form-item" style="margin: 20px 0px 0px 5px">
  16. <input type="text" style="width: 55px; border: 0px" value="任务书:" readonly>
  17. <input type="text" name="xm" id="xm" style="width: 1000px; border: 0px" readonly>
  18. </div>
  19. <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
  20. <!-- 右侧悬浮按钮 -->
  21. <div class="layui-form layuimini-form" style="padding-bottom: 100px">
  22. <div class="right-bottom-btn">
  23. <button class="layui-btn" lay-filter="cancleBtn">
  24. <i class="layui-icon layui-icon-close"></i>关闭
  25. </button>
  26. </div>
  27. </div>
  28. </form>
  29. </div>
  30. </div>
  31. <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
  32. <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
  33. <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
  34. <script th:src="@{/js/lay-config.js}" charset="utf-8"></script>
  35. <script th:src="@{/lib/xm-select-v1.2.2/xm-select.js}" charset="utf-8"></script>
  36. <script th:inline="javascript" type="text/javascript">
  37. AjaxUtil.ctx = /*[[@{/}]]*/'';
  38. layui.use(['form', 'table'], function () {
  39. var form = layui.form,
  40. table = layui.table;
  41. var xmApprove = parent.getXmApproval();
  42. $("#xm").val(xmApprove.xm);
  43. form.render();
  44. var currTable = table.render({
  45. elem: '#currentTableId',
  46. url: AjaxUtil.ctx + 'prjApproverecord/spList/' + xmApprove.xmid,
  47. method: 'post',
  48. // toolbar: '#toolbarDemo',
  49. // defaultToolbar: ['filter', 'exports', 'print'],
  50. cols: [
  51. [
  52. {type: 'numbers', align: 'center'},
  53. {field: 'zt', width: '15%',title: '审批状态'},
  54. // {field: 'tjrxm', width: '10%', title: '提交人'},
  55. {field: 'tjsj', width: '16%', title: '提交时间', align: 'center'},
  56. {field: 'wc', width: '6%', title: '完成', align: 'center', templet: function (d) {
  57. if (1 == d.wc) {
  58. return '<span class="layui-badge layui-bg-blue">是</span>';
  59. } else {
  60. return '<span class="layui-badge layui-bg-orange">否</span>';
  61. }
  62. }
  63. },
  64. {field: 'shrxm', width: '10%', title: '审核人', align: 'center'},
  65. {field: 'shsj', width: '16%', title: '审核时间', align: 'center'},
  66. {field: 'spcz', width: '8%',title: '审批操作', align: 'center'},
  67. {field: 'yj', title: '意见'}
  68. ]
  69. ],
  70. sortName: 'jtsj',
  71. autoSort: false,
  72. limits: [10, 15, 20, 25, 50, 100],
  73. limit: 10,
  74. page: true,
  75. skin: 'grid',
  76. parseData: function(res){ //res 即为原始返回的数据
  77. return {
  78. "code": res.code, //解析接口状态
  79. "msg": res.message, //解析提示文本
  80. "count": res.data.total, //解析数据长度
  81. "data": res.data.rows //解析数据列表
  82. };
  83. }
  84. });
  85. // 监听取消按钮
  86. $("button[lay-filter='cancleBtn']").click(function(){
  87. var iframeIndex = parent.layer.getFrameIndex(window.name);
  88. parent.layer.close(iframeIndex);
  89. });
  90. });
  91. </script>
  92. </body>
  93. </html>