prints.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <include file="public@header"/>
  2. <style>
  3. .count {
  4. margin: 1rem auto;
  5. }
  6. .count span {
  7. margin-right: 1rem;
  8. }
  9. .count span em {
  10. font-style: normal;
  11. color: red;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <div class="wrap js-check-wrap">
  17. <ul class="nav nav-tabs">
  18. <li class="active"><a>打印收入订单</a></li>
  19. </ul>
  20. <form class="well form-inline margin-top-20" method="post" action="{:url('order/prints')}">
  21. <select class="form-control" name="status" id="status">
  22. <option value="0">全部</option>
  23. <option value="1" <if condition="$status == 1">selected</if>>待付款</option>
  24. <option value="2" <if condition="$status == 2">selected</if>>待打印</option>
  25. <option value="3" <if condition="$status == 3">selected</if>>已完成</option>
  26. </select>
  27. <input type="text" class="form-control js-bootstrap-date" name="start_time"
  28. value="{$start_time|default=''}"
  29. style="width: 140px;" autocomplete="off" placeholder="开始时间">-
  30. <input type="text" class="form-control js-bootstrap-date" name="end_time"
  31. value="{$end_time|default=''}"
  32. style="width: 140px;" autocomplete="off" placeholder="结束时间">
  33. 关键字:
  34. <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
  35. placeholder="下单人名称/订单号/设备号">
  36. <input type="submit" class="btn btn-primary" value="搜索"/>
  37. <a class="btn btn-default" href="{:url('order/prints')}">清空</a>
  38. <a class="btn btn-warning" href="{:url('order/printExport')}">导出</a>
  39. <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
  40. </form>
  41. <div class="count">
  42. <span>总收入:<em>{$counts.total|default='0.00'} 元</em></span>
  43. <span><php> echo date('Y'); </php>年收入:<em>{$counts.year|default='0.00'} 元</em></span>
  44. <span><php> echo date('Y'); </php>年第<php> echo ceil(date('m')/3);</php>季度收入:<em>{$counts.quarter|default='0.00'} 元</em></span>
  45. <span><php> echo date('Y年m月'); </php>收入:<em>{$counts.month|default='0.00'} 元</em></span>
  46. </div>
  47. <form method="post" class="js-ajax-form">
  48. <table class="table table-hover table-bordered">
  49. <thead>
  50. <tr>
  51. <th width="80"><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
  52. <th width="100">订单号</th>
  53. <th width="100">下单人名称</th>
  54. <th>设备名称</th>
  55. <th width="60">价格</th>
  56. <th width="50">数量</th>
  57. <th width="60">总价</th>
  58. <th width="100">支付方式</th>
  59. <!--<th width="60">备注</th>-->
  60. <!--<th>下单时间</th>-->
  61. <th width="160">付款时间</th>
  62. <th>{:lang('STATUS')}</th>
  63. <th width="100">{:lang('ACTIONS')}</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <php>
  68. $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  69. </php>
  70. <foreach name="list" item="vo">
  71. <tr>
  72. <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  73. value="{$vo.id}" title="ID:{$vo.id}">{$vo.id}</td>
  74. <td>{$vo['order_sn']?$vo['order_sn']:''}</td>
  75. <td>{$vo['real_name']?$vo['real_name']:''}</td>
  76. <td>
  77. {$vo['device_name']?$vo['device_name']:''}({$vo.device_code})
  78. </td>
  79. <td>{$vo['price']?$vo['price']:0.00}</td>
  80. <td>{$vo['nums']?$vo['nums']:0}</td>
  81. <td>{$vo['total']?$vo['total']:0}</td>
  82. <td>
  83. <switch name="vo.pay_type">
  84. <case value="1">
  85. 微信
  86. </case>
  87. <case value="2">
  88. 余额
  89. </case>
  90. </switch>
  91. </td>
  92. <!--<td>{$vo['remark']}</td>-->
  93. <!--<td>{$vo['created_at']?$vo['created_at']:'无'}</td>-->
  94. <td>{$vo['pay_at']?$vo['pay_at']:'无'}</td>
  95. <td>
  96. <switch name="vo.status">
  97. <case value="1">
  98. <span class="text-success">待支付</span>
  99. </case>
  100. <case value="2">
  101. <span class="text-danger">待打印</span>
  102. </case>
  103. <case value="3">
  104. <span class="text-danger">已完成</span>
  105. </case>
  106. </switch>
  107. </td>
  108. <td>
  109. <if condition="$vo.status eq ">
  110. <a class="btn btn-xs btn-danger js-ajax-dialog-btn"
  111. href="{:url('order/printDel',array('id'=>$vo['id']))}"
  112. data-msg="确认删除该兑换记录?">删除</a>
  113. </td>
  114. </tr>
  115. </foreach>
  116. </tbody>
  117. </table>
  118. <div class="pagination">{$page}</div>
  119. </form>
  120. </div>
  121. <script src="__STATIC__/js/admin.js"></script>
  122. <script>
  123. function reloadPage(win) {
  124. win.location.reload();
  125. }
  126. $(function () {
  127. setCookie("refersh_time", 3);
  128. Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  129. //批量冻结
  130. $('#js-batch-delete').click(function (e) {
  131. var ids = [];
  132. $("input[name='ids[]']").each(function () {
  133. if ($(this).is(':checked')) {
  134. ids.push($(this).val());
  135. }
  136. });
  137. if (ids.length == 0) {
  138. return false;
  139. }
  140. ids = ids.join(',');
  141. });
  142. //end
  143. });
  144. });
  145. </script>
  146. <script>
  147. function doDelete() {
  148. // Wind.use('artDialog', function () {
  149. var ids = [];
  150. $(".js-check:checked").each(function () {
  151. var id = $(this).val();
  152. if (id > 0) {
  153. ids.push(id);
  154. }
  155. });
  156. if (ids.length <= 0) {
  157. showMsg('请先选择操作项');
  158. return false;
  159. }
  160. if (confirm('确定批量删除选择项?不可恢复')) {
  161. $.post('/admin/order/printDel', {id: ids}, function (res) {
  162. if (res.code == 1) {
  163. showMsg(res.msg);
  164. setTimeout(function () {
  165. location.reload();
  166. }, 800)
  167. } else {
  168. showMsg(res.msg);
  169. }
  170. }, "json")
  171. }
  172. }
  173. </script>
  174. </body>
  175. </html>