shop_deposit.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. <a href="javascript:;" class="layui-btn" lay-event="basic">查看</a>
  45. </script>
  46. {/block}
  47. {block name="script"}
  48. <script>
  49. layui.use(['form', 'laydate'], function() {
  50. var tableAccountList= layui.table,
  51. laydate = layui.laydate,
  52. form = layui.form;
  53. form.render();
  54. //渲染时间
  55. laydate.render({
  56. elem: '#start_time',
  57. type: 'datetime'
  58. });
  59. laydate.render({
  60. elem: '#end_time',
  61. type: 'datetime'
  62. });
  63. /**
  64. * 搜索功能
  65. */
  66. form.on('submit(search)', function(data) {
  67. tableAccountList.reload({
  68. page: {
  69. curr: 1
  70. },
  71. where: data.field
  72. });
  73. return false;
  74. });
  75. //账户流水
  76. tableAccountList = new Table({
  77. elem: '#account_list',
  78. url: ns.url("admin/account/shopdeposit"),
  79. cols: [
  80. [{
  81. field: 'deposit_no',
  82. title: '账单编号',
  83. unresize: 'false',
  84. width: '30%'
  85. },{
  86. field: 'site_name',
  87. title: '店铺名称',
  88. unresize: 'false',
  89. width: '25%'
  90. }, {
  91. field: 'money',
  92. title: '保证金余额',
  93. unresize: 'false',
  94. align: 'right',
  95. width: '15%',
  96. templet: function(data) {
  97. return '¥'+ data.money;
  98. }
  99. }, {
  100. unresize: 'false',
  101. width: '5%'
  102. }, {
  103. field: 'create_time',
  104. title: '时间',
  105. unresize: 'false',
  106. templet: function(data) {
  107. return ns.time_to_date(data.create_time); //创建时间转换方法
  108. },
  109. width: '25%'
  110. }]
  111. ]
  112. });
  113. /**
  114. * 监听工具栏操作
  115. */
  116. tableAccountList.tool(function(obj) {
  117. var data = obj.data,
  118. event = obj.event;
  119. switch (obj.event) {
  120. case 'basic': //查看
  121. location.href = ns.url("admin/shop/accountinfo?site_id=" + data.site_id)
  122. break;
  123. }
  124. })
  125. })
  126. </script>
  127. {/block}