charge_day.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>收费记录查询</title>
  6. </head>
  7. <body>
  8. <div class="layui-card layadmin-header">
  9. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  10. <a lay-href="">主页</a>
  11. <a><cite>车辆检测管理</cite></a>
  12. <a><cite>收费记录查询</cite></a>
  13. </div>
  14. </div>
  15. <div class="layui-fluid">
  16. <div class="layui-row layui-col-space15">
  17. <div class="layui-col-md12">
  18. <div class="layui-card">
  19. <!--<div class="layui-card-header">开启头部工具栏</div>-->
  20. <!--<form class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="charge-formlist">-->
  21. <!--<div class="layui-form-item">-->
  22. <!--<div class="layui-inline">-->
  23. <!--项目筛选:-->
  24. <!--</div>-->
  25. <!--<div class="layui-inline">-->
  26. <!--<select name="project" lay-filter="LAY-charge-project">-->
  27. <!--<option value="">全部</option>-->
  28. <!--<option value="安检">安检</option>-->
  29. <!--<option value="环检">环检</option>-->
  30. <!--</select>-->
  31. <!--</div>-->
  32. <!--</div>-->
  33. <!--</form>-->
  34. <div class="layui-card-body">
  35. <div class="test-table-reload-btn" style="margin-bottom: 10px;">
  36. <div class="layui-inline">
  37. 环保类型:
  38. </div>
  39. <div class="layui-inline layui-form" lay-filter="detectionSelect">
  40. <select name="EP_type" lay-verify="required" lay-search="" lay-filter="detectionChangeType" id="detectionSelect">
  41. <option value="">全部</option>
  42. </select>
  43. </div>
  44. <div class="layui-inline">
  45. 挂账客户:
  46. </div>
  47. <div class="layui-inline layui-form" lay-filter="customerSelect">
  48. <select name="customer" lay-verify="required" lay-search="" lay-filter="customerSelect" id="customerSelect">
  49. <!--<option value="">全部</option>-->
  50. </select>
  51. </div>
  52. <div class="layui-inline">
  53. 安检类型:
  54. </div>
  55. <div class="layui-inline layui-form" lay-filter="carTypeSelect">
  56. <select name="car_type" lay-verify="required" lay-search="" lay-filter="carChangeType" id="carTypeSelect">
  57. <option value="">全部</option>
  58. </select>
  59. </div>
  60. <div class="layui-inline">
  61. 签约客户:
  62. </div>
  63. <div class="layui-inline layui-form" lay-filter="contractedSelect">
  64. <select name="contracted_customer" lay-verify="required" lay-search="" lay-filter="contractedSelect" id="contractedSelect">
  65. <!--<option value="">全部</option>-->
  66. </select>
  67. </div>
  68. <div class="layui-inline">
  69. 检测日期:
  70. <div class="layui-input-inline">
  71. <input type="text" class="layui-input" id="test-laydate-range-date">
  72. </div>
  73. </div>
  74. <button class="layui-btn" data-type="reload">搜索</button>
  75. </div>
  76. <table class="layui-hide" id="test-table-totalRow" lay-filter="test-table-totalRow"></table>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </body>
  83. <script>
  84. layui.use(['admin', 'table','laydate','form'], function(){
  85. var admin = layui.admin
  86. ,$ = layui.$
  87. ,laydate = layui.laydate
  88. ,table = layui.table
  89. ,form = layui.form;
  90. // form.render(null, 'form-group');
  91. table.render({
  92. elem: '#test-table-totalRow'
  93. ,url:'/charge/chargeDay'
  94. ,method:'post'
  95. // ,where:{"date":new Date()}
  96. ,toolbar: '#test-table-totalRow-toolbarDemo'
  97. ,title: '收费记录数据表'
  98. ,totalRow: true
  99. ,even: true//隔行背景
  100. ,height: 'full-200'
  101. ,cols: [[
  102. // {type: 'checkbox', fixed: 'left'},
  103. {type:'numbers',fixed: 'left', totalRowText: '合计:'}
  104. ,{field:'license', title:'车牌'}
  105. ,{field:'EP_type', title:'环保类型'}
  106. ,{field:'car_type', title:'安检类型'}
  107. ,{field:'customer', title:'挂账客户'}
  108. ,{field:'contracted_customer', title:'签约客户'}
  109. ,{field:'ali_pay', title:'支付宝',totalRow: true}
  110. ,{field:'on_account', title:'挂账金额',totalRow: true}
  111. ,{field:'EP_receivable', title:'环检应收',totalRow: true}
  112. ,{field:'Safe_receivable', title:'安检应收',totalRow: true}
  113. ,{field:'receivable', title:'应收总和',totalRow: true}
  114. ,{field:'cost', title:'实收总和',totalRow: true}
  115. ,{field:'remarks', title:'备注'}
  116. // ,{fixed: 'right', title:'操作', toolbar: '#test-table-toolbar-barDemo', width:150}
  117. ]]
  118. });
  119. //环检下拉
  120. $.ajax({
  121. url:"/chargingStandard/getSelect",
  122. type:'POST',
  123. data:{"project":"环检"},
  124. success:function (res) {
  125. var data = res;
  126. $.each(data,function (index,item) {
  127. $('#detectionSelect').append('<option value="'+item.carType+'">'+item.carType+'</option>');
  128. });
  129. form.render('select', 'detectionSelect');
  130. }
  131. });
  132. //安检下拉
  133. $.ajax({
  134. url:"/chargingStandard/getSelect",
  135. type:'POST',
  136. data:{"project":"安检"},
  137. success:function (res) {
  138. var data = res;
  139. $.each(data,function (index,item) {
  140. $('#carTypeSelect').append('<option value="'+item.carType+'">'+item.carType+'</option>');
  141. });
  142. form.render('select', 'carTypeSelect');
  143. }
  144. });
  145. //客户下拉
  146. $.ajax({
  147. url:"/customer/getCustomer",
  148. type:'GET',
  149. // data:{"project":"安检"},
  150. success:function (res) {
  151. var data = res;
  152. $.each(data,function (index,item) {
  153. if (index===0){
  154. $('#customerSelect').append('<option value="">'+item.name+'</option>');
  155. }else {
  156. $('#customerSelect').append('<option value="'+item.name+'">'+item.name+'</option>');
  157. }
  158. });
  159. form.render('select', 'customerSelect');
  160. }
  161. });
  162. var active = {
  163. reload: function(){
  164. var date = $('#test-laydate-range-date');
  165. var ep = $('#detectionSelect');
  166. var car = $('#carTypeSelect');
  167. var customer = $('#customerSelect');
  168. //执行重载
  169. table.reload('test-table-totalRow', {
  170. where: {
  171. 'EP_type': ep.val(),
  172. 'car_type': car.val(),
  173. 'customer': customer.val(),
  174. 'date': date.val()
  175. }
  176. });
  177. }
  178. };
  179. $('.test-table-reload-btn .layui-btn').on('click', function(){
  180. var type = $(this).data('type');
  181. active[type] ? active[type].call(this) : '';
  182. });
  183. laydate.render({
  184. elem: '#test-laydate-range-date'
  185. });
  186. });
  187. </script>
  188. </html>