violation_month.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <title>月度违章未检车辆</title>
  2. <div class="layui-card layadmin-header">
  3. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  4. <a lay-href="">主页</a>
  5. <a><cite>违章车辆管理</cite></a>
  6. <a><cite>月度违章未检车辆</cite></a>
  7. </div>
  8. </div>
  9. <div class="layui-fluid">
  10. <div class="layui-row layui-col-space15">
  11. <div class="layui-col-md12">
  12. <div class="layui-card">
  13. <!--<div class="layui-card-header">开启头部工具栏</div>-->
  14. <div class="layui-card-body">
  15. <div class="test-table-reload-btn" style="margin-bottom: 10px;">
  16. 选择月份:
  17. <div class="layui-input-inline">
  18. <input type="text" class="layui-input" id="test-laydate-range-date">
  19. </div>
  20. <button class="layui-btn" data-type="reload">搜索</button>
  21. </div>
  22. <table class="layui-hide" id="test-table-radio" lay-filter="test-table-radio"></table>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </body>
  29. <script>
  30. layui.use(['admin', 'table','layer','form','view','laydate'], function(){
  31. var admin = layui.admin
  32. ,$ = layui.$
  33. ,layer = layui.layer
  34. ,view = layui.view
  35. ,form = layui.form
  36. ,laydate = layui.laydate
  37. ,table = layui.table;
  38. laydate.render({
  39. elem: '#test-laydate-range-date',
  40. type:'month',
  41. value: new Date(),
  42. format:'yyyy-MM'
  43. });
  44. table.render({
  45. elem: '#test-table-radio'
  46. ,url:'/charge/violationList'
  47. ,method:'post'
  48. ,toolbar: '#test-table-radio-toolbarDemo'
  49. ,title: '违章车辆记录数据表'
  50. ,even: true//隔行背景
  51. ,cols: [[
  52. // {type: 'radio', fixed: 'left'}
  53. {field:'license', title:'车牌'}
  54. ,{field:'VIN', title:'车架号'}
  55. ,{field:'owner', title:'所有人'}
  56. // ,{field:'EP_type', title:'环保类型'}
  57. // ,{field:'car_type', title:'安检类型'}
  58. ,{field:'customer', title:'挂账客户'}
  59. // ,{field:'EP_receivable', title:'环检应收'}
  60. // ,{field:'Safe_receivable', title:'安检应收'}
  61. ,{field:'receivable', title:'应收总和'}
  62. ,{field:'cost', title:'实收总和'}
  63. ,{field:'telephone', title:'联系电话'}
  64. ,{field:'date', title:'检测日期'}
  65. ,{field:'remarks', title:'备注'}
  66. // ,{fixed: 'right', title:'操作', toolbar: '#test-table-toolbar-barDemo', width:150}
  67. ]]
  68. ,page: true
  69. });
  70. var active = {
  71. reload: function(){
  72. var date = $('#test-laydate-range-date');
  73. //执行重载
  74. table.reload('test-table-radio', {
  75. where: {
  76. 'date': date.val(),
  77. }
  78. ,page: {
  79. curr: 1 //重新从第 1 页开始
  80. }
  81. });
  82. }
  83. };
  84. $('.test-table-reload-btn .layui-btn').on('click', function(){
  85. var type = $(this).data('type');
  86. active[type] ? active[type].call(this) : '';
  87. });
  88. });
  89. </script>
  90. </html>