transaction.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {extend name="layout:home" /}
  2. {block name="container"}
  3. <div class="layui-tab layui-tab-card">
  4. <div class="layui-tab-content page-tab-content">
  5. <!-- 搜索框开始 -->
  6. <div class="search-form">
  7. <div class="layui-form-item">
  8. <div class="layui-inline">
  9. <input type="text" class="layui-input" name="timeRang" id="timeRang" placeholder="选择时间段"
  10. style="width: 170px;">
  11. </div>
  12. <div class="layui-inline">
  13. <select name="type" id="type" lay-verify="" class="layui-select layui-unselect layui-form-select">
  14. <option value="">全部</option>
  15. <option value="1">支付宝支付</option>
  16. <option value="2">微信支付</option>
  17. <option value="2">银行转账</option>
  18. </select>
  19. </div>
  20. <div class="layui-inline">
  21. <button type="submit" class="layui-btn search-subBtn" onclick="showCurrent()">搜索</button>
  22. </div>
  23. </div>
  24. </div>
  25. <table class="layui-table lay-even">
  26. <colgroup>
  27. <col width="150">
  28. <col width="200">
  29. <col>
  30. </colgroup>
  31. <thead>
  32. <tr>
  33. <th>订单编号</th>
  34. <th>交易类型</th>
  35. <th>金额</th>
  36. <th>交易时间</th>
  37. <th>余额</th>
  38. <th>审核状态</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. {if count($allRecharge)}
  43. {volist name="allRecharge" id="recharge"}
  44. <tr>
  45. <td>{$recharge.recharge_identity}</td>
  46. <td>{$recharge.recharge_type == 2 ? '微信支付' : ($recharge.recharge_type == 3 ? '银行转账' : '支付宝支付')}</td>
  47. <td>{$recharge.recharge_money}</td>
  48. <td>{$recharge.recharge_time}</td>
  49. <td>{$recharge.user_money}</td>
  50. <td>{$recharge.recharge_status == 1 ? '已审核' : '未审核'}</td>
  51. </tr>
  52. {/volist}
  53. {else}
  54. <td colspan="7" style="text-align: center">无数据</td>
  55. {/if}
  56. </tbody>
  57. </table>
  58. {$show_page}
  59. </div>
  60. </div>
  61. <script>
  62. const myHost = "http://" + window.location.host;
  63. function showCurrent() {
  64. let timeRang = $("#timeRang").val();
  65. let type = $("#type").val();
  66. window.location.href = myHost + "/User/cost/transaction.html?timeRang=" + timeRang + "&type=" + type;
  67. }
  68. layui.use('laydate', function(){
  69. var laydate = layui.laydate;
  70. //执行一个laydate实例
  71. laydate.render({
  72. elem: '#creatTime' //指定元素
  73. });
  74. laydate.render({
  75. elem:'#timeRang',
  76. range:true,
  77. format: 'yyyy/MM/dd',
  78. done: function(value, date){
  79. /* 时间选择完成后的回调 */
  80. }
  81. })
  82. });
  83. </script>
  84. {/block}