print.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('配送单据打印列表')" />
  5. <th:block th:include="include :: layout-latest-css" />
  6. <th:block th:include="include :: ztree-css" />
  7. </head>
  8. <body class="gray-bg">
  9. <div class="ui-layout-center">
  10. <div class="container-div">
  11. <div class="row">
  12. <div class="col-sm-12 search-collapse">
  13. <form id="user-form">
  14. <div class="select-list">
  15. <ul>
  16. <li>
  17. <label>配送时间 </label>
  18. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="deliveryTimeStart"/>
  19. <span>-</span>
  20. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="deliveryTimeEnd"/>
  21. </li>
  22. <li>
  23. <label style="width: 90px; float: left;">打印申请时间 </label>
  24. <input type="text" class="time-input" id="startTimes" placeholder="开始时间" name="printRequestTimeStart"/>
  25. <span>-</span>
  26. <input type="text" class="time-input" id="endTimes" placeholder="结束时间" name="printRequestTimeEnd"/>
  27. </li>
  28. <li>
  29. <label>配送人: </label>
  30. <input type="text" placeholder="请输入配送人姓名" name="deliverer"/>
  31. </li>
  32. <li>
  33. <label>打印状态:</label>
  34. <select name="status" th:with="type=${@dict.getType('sys_select_print_status')}">
  35. <option value="">全部</option>
  36. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
  37. ></option>
  38. </select>
  39. </li>
  40. <li>
  41. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  42. <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  43. </li>
  44. </ul>
  45. </div>
  46. </form>
  47. </div>
  48. <div class="btn-group-sm" id="toolbar" role="group">
  49. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sdtp:print:remove">
  50. <i class="fa fa-remove"></i> 删除
  51. </a>
  52. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dtp:print:export">
  53. <i class="fa fa-download"></i> 打印
  54. </a>
  55. </div>
  56. <div class="col-sm-12 select-table table-striped">
  57. <table id="bootstrap-table"></table>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <th:block th:include="include :: footer" />
  63. <th:block th:include="include :: layout-latest-js" />
  64. <th:block th:include="include :: ztree-js" />
  65. <script th:inline="javascript">
  66. var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
  67. var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
  68. var detailFlag = [[${@permission.hasPermi('dtp:print:view')}]];
  69. var prefix = ctx + "dtp/print";
  70. $(function() {
  71. var panehHidden = false;
  72. if ($(this).width() < 1590) {
  73. panehHidden = true;
  74. }
  75. $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
  76. // 回到顶部绑定
  77. if ($.fn.toTop !== undefined) {
  78. var opt = {
  79. win:$('.ui-layout-center'),
  80. doc:$('.ui-layout-center')
  81. };
  82. $('#scroll-up').toTop(opt);
  83. }
  84. queryUserList();
  85. });
  86. function queryUserList() {
  87. var options = {
  88. url: prefix + "/list",
  89. viewUrl: prefix + "/view/{id}",
  90. createUrl: prefix + "/add",
  91. updateUrl: prefix + "/edit/{id}",
  92. detailUrl: prefix + "/detail/{id}",
  93. removeUrl: prefix + "/remove",
  94. exportUrl: prefix + "/export",
  95. sortName: "createTime",
  96. sortOrder: "desc",
  97. modalName: "配送单据打印信息",
  98. columns: [{
  99. checkbox: true
  100. },
  101. {
  102. field: "id",
  103. title: "id",
  104. //hidden:false
  105. visible: false,
  106. },
  107. {
  108. field: "orderId",
  109. title: "订单编号"
  110. },
  111. {
  112. field: "deliverer",
  113. title: "配送人"
  114. },
  115. {
  116. field: "deliveryTime",
  117. title: "配送时间"
  118. },
  119. {
  120. field: "printRequestTime",
  121. title: "打印申请时间"
  122. },
  123. {
  124. field: "status",
  125. title: "打印状态"
  126. },
  127. {
  128. field: "createTime",
  129. title: "创建时间"
  130. },
  131. {
  132. title: '操作',
  133. align: 'center',
  134. formatter: function(value, row, index) {
  135. if (row.orderId) {
  136. var actions = [];
  137. actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>详细</a>');
  138. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
  139. return actions.join('');
  140. } else {
  141. return "";
  142. }
  143. }
  144. }]
  145. };
  146. $.table.init(options);
  147. }
  148. $('#btnExpand').click(function() {
  149. $._tree.expandAll(true);
  150. $(this).hide();
  151. $('#btnCollapse').show();
  152. });
  153. $('#btnCollapse').click(function() {
  154. $._tree.expandAll(false);
  155. $(this).hide();
  156. $('#btnExpand').show();
  157. });
  158. $('#btnRefresh').click(function() {
  159. });
  160. /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
  161. function resetPre() {
  162. resetDate();
  163. $("#user-form")[0].reset();
  164. $("#deptId").val("");
  165. $("#parentId").val("");
  166. $(".curSelectedNode").removeClass("curSelectedNode");
  167. $.table.search();
  168. }
  169. </script>
  170. </body>
  171. </html>