shop_balance.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. {extend name="base"/}
  2. {block name="resources"}
  3. <style>
  4. .ns-shop-account-block {
  5. display: flex;
  6. justify-content: space-between;
  7. }
  8. .ns-shop-account {
  9. width: 30%;
  10. text-align: center;
  11. padding: 20px 0;
  12. }
  13. .ns-shop-account-num {
  14. font-size: 20px;
  15. font-weight: 600;
  16. margin-bottom: 10px;
  17. }
  18. .ns-shop-account-name {
  19. font-size: 18px;
  20. }
  21. .layui-tab-content {
  22. padding: 10px 0;
  23. }
  24. .ns-function-search .layui-form .ns-order-calc .layui-btn {
  25. position: initial;
  26. border-right: 1px solid #e5e5e5;
  27. }
  28. </style>
  29. {/block}
  30. {block name="main"}
  31. <div class="ns-single-filter-box">
  32. <div class="layui-form">
  33. <div class="layui-input-inline">
  34. <input type="text" name="site_name" placeholder="店铺名称" autocomplete="off" class="layui-input">
  35. <button type="button" class="layui-btn layui-btn-primary" lay-filter="search" lay-submit>
  36. <i class="layui-icon">&#xe615;</i>
  37. </button>
  38. </div>
  39. </div>
  40. </div>
  41. <table id="account_list" lay-filter="account_list"></table>
  42. <!--操作-->
  43. <script type="text/html" id="operation">
  44. <div class="ns-table-btn">
  45. <a href="javascript:;" class="layui-btn" lay-event="basic">查看</a>
  46. </div>
  47. </script>
  48. {/block}
  49. {block name="script"}
  50. <script>
  51. layui.use(['form', 'laydate'], function() {
  52. var tableAccountList= layui.table,
  53. laydate = layui.laydate,
  54. form = layui.form;
  55. form.render();
  56. //渲染时间
  57. laydate.render({
  58. elem: '#start_time',
  59. type: 'datetime'
  60. });
  61. laydate.render({
  62. elem: '#end_time',
  63. type: 'datetime'
  64. });
  65. /**
  66. * 搜索功能
  67. */
  68. form.on('submit(search)', function(data) {
  69. tableAccountList.reload({
  70. page: {
  71. curr: 1
  72. },
  73. where: data.field
  74. });
  75. return false;
  76. });
  77. //账户流水
  78. tableAccountList = new Table({
  79. elem: '#account_list',
  80. url: ns.url("admin/account/shopbalance"),
  81. cols: [
  82. [{
  83. field: 'site_name',
  84. title: '店铺',
  85. width: '15%',
  86. unresize: 'false'
  87. }, {
  88. field: 'account',
  89. title: '账户余额',
  90. width: '10%',
  91. unresize: 'false'
  92. }, {
  93. field: 'account_withdraw',
  94. title: '已提现',
  95. width: '10%',
  96. unresize: 'false'
  97. }, {
  98. field: 'account_withdraw_apply',
  99. title: '提现中',
  100. width: '10%',
  101. unresize: 'false'
  102. }, {
  103. field: 'shop_baozhrmb',
  104. title: '保证金',
  105. width: '8%',
  106. templet: '#status',
  107. unresize: 'false'
  108. }, {
  109. title: '操作',
  110. width: '10%',
  111. toolbar: '#operation',
  112. align: 'left',
  113. unresize: 'false'
  114. }]
  115. ]
  116. });
  117. /**
  118. * 监听工具栏操作
  119. */
  120. tableAccountList.tool(function(obj) {
  121. var data = obj.data,
  122. event = obj.event;
  123. switch (obj.event) {
  124. case 'basic': //查看
  125. location.href = ns.url("admin/shop/accountinfo?site_id=" + data.site_id)
  126. break;
  127. }
  128. })
  129. })
  130. </script>
  131. {/block}