123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>收费记录查询</title>
- </head>
- <body>
- <div class="layui-card layadmin-header">
- <div class="layui-breadcrumb" lay-filter="breadcrumb">
- <a lay-href="">主页</a>
- <a><cite>车辆检测管理</cite></a>
- <a><cite>收费记录查询</cite></a>
- </div>
- </div>
- <div class="layui-fluid">
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12">
- <div class="layui-card">
- <!--<div class="layui-card-header">开启头部工具栏</div>-->
- <div class="layui-card-body">
- <div class="test-table-reload-btn" style="margin-bottom: 10px;">
- 环保类型:
- <div class="layui-inline layui-form" lay-filter="detectionSelect">
- <select name="EP_type" lay-verify="required" lay-search="" lay-filter="detectionChangeType" id="detectionSelect">
- <option value="">全部</option>
- </select>
- </div>
- 挂账客户:
- <div class="layui-inline layui-form" lay-filter="customerSelect">
- <select name="customer" lay-verify="required" lay-search="" lay-filter="customerSelect" id="customerSelect">
- <!--<option value="">全部</option>-->
- </select>
- </div>
- 安检类型:
- <div class="layui-inline layui-form" lay-filter="carTypeSelect">
- <select name="car_type" lay-verify="required" lay-search="" lay-filter="carChangeType" id="carTypeSelect">
- <option value="">全部</option>
- </select>
- </div>
- 检测年份:
- <div class="layui-input-inline">
- <input type="text" class="layui-input" id="test-laydate-range-date">
- </div>
- <button class="layui-btn" data-type="reload">搜索</button>
- </div>
- <table class="layui-hide" id="test-table-totalRow" lay-filter="test-table-totalRow"></table>
- </div>
- <div class="layui-card-body">
- 支付宝总计:
- <div class="layui-input-inline" style="width: 80px">
- <input type="text" class="layui-input" id="ali_pay_sum" style="border:none;font-weight:bold">
- </div>
- 挂账总计:
- <div class="layui-input-inline" style="width: 80px">
- <input type="text" class="layui-input" id="on_account_sum" style="border:none;font-weight:bold">
- </div>
- 环检应收总计:
- <div class="layui-input-inline" style="width: 80px">
- <input type="text" class="layui-input" id="EP_sum" style="border:none;font-weight:bold">
- </div>
- 安检应收总计:
- <div class="layui-input-inline" style="width: 80px">
- <input type="text" class="layui-input" id="Safe_sum" style="border:none;font-weight:bold">
- </div>
- 应收总计:
- <div class="layui-input-inline" style="width: 80px">
- <input type="text" class="layui-input" id="rece_sum" style="border:none;font-weight:bold">
- </div>
- 实收总计:
- <div class="layui-input-inline" style="width: 80px" >
- <input type="text" class="layui-input" id="cost_sum" style="border:none;font-weight:bold">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script>
- layui.use(['admin', 'table','laydate','form'], function(){
- var admin = layui.admin
- ,$ = layui.$
- ,laydate = layui.laydate
- ,table = layui.table
- ,form = layui.form;
- // form.render(null, 'form-group');
- table.render({
- elem: '#test-table-totalRow'
- ,url:'/charge/chargeYear'
- ,method:'post'
- ,toolbar: '#'
- ,even: true//隔行背景
- ,title: '收费记录数据表'
- ,cols: [[
- // {type:'numbers',fixed: 'left', totalRowText: '合计:'}
- {field:'license', title:'车牌',align: 'center'},
- {field:'EP_type', title:'环保类型',align: 'center'},
- {field:'car_type', title:'安检类型',align: 'center'},
- {field:'customer', title:'挂账客户',align: 'center'},
- {field:'contracted_customer', title:'签约客户',align: 'center'},
- {field:'ali_pay', title:'支付宝',align: 'center'},
- {field:'on_account', title:'挂账金额',align: 'center'},
- {field:'EP_receivable', title:'环检应收',align: 'center'},
- {field:'Safe_receivable', title:'安检应收',align: 'center'},
- {field:'receivable', title:'应收总和',align: 'center'},
- {field:'cost', title:'实收总和',align: 'center'},
- {field:'remarks', title:'备注',align: 'center'}
- // ,{fixed: 'right', title:'操作', toolbar: '#test-table-toolbar-barDemo', width:150}
- ]]
- ,page: true
- ,done:function (data) {
- $('#ali_pay_sum').val(data.sum.ali_pay_sum);
- $('#on_account_sum').val(data.sum.on_account_sum);
- $('#EP_sum').val(data.sum.EP_sum);
- $('#Safe_sum').val(data.sum.Safe_sum);
- $('#rece_sum').val(data.sum.rece_sum);
- $('#cost_sum').val(data.sum.cost_sum);
- }
- });
- //环检下拉
- $.ajax({
- url:"/chargingStandard/getSelect",
- type:'POST',
- data:{"project":"环检"},
- success:function (res) {
- var data = res;
- $.each(data,function (index,item) {
- $('#detectionSelect').append('<option value="'+item.carType+'">'+item.carType+'</option>');
- });
- form.render('select', 'detectionSelect');
- }
- });
- //安检下拉
- $.ajax({
- url:"/chargingStandard/getSelect",
- type:'POST',
- data:{"project":"安检"},
- success:function (res) {
- var data = res;
- $.each(data,function (index,item) {
- $('#carTypeSelect').append('<option value="'+item.carType+'">'+item.carType+'</option>');
- });
- form.render('select', 'carTypeSelect');
- }
- });
- //客户下拉
- $.ajax({
- url:"/customer/getCustomer",
- type:'GET',
- // data:{"project":"安检"},
- success:function (res) {
- var data = res;
- $.each(data,function (index,item) {
- if (index===0){
- $('#customerSelect').append('<option value="">'+item.name+'</option>');
- }else {
- $('#customerSelect').append('<option value="'+item.name+'">'+item.name+'</option>');
- }
- });
- form.render('select', 'customerSelect');
- }
- });
- var active = {
- reload: function(){
- var date = $('#test-laydate-range-date');
- var ep = $('#detectionSelect');
- var car = $('#carTypeSelect');
- var customer = $('#customerSelect');
- //执行重载
- table.reload('test-table-totalRow', {
- where: {
- 'EP_type': ep.val(),
- 'car_type': car.val(),
- 'customer': customer.val(),
- 'date': date.val()
- },page: {
- curr: 1 //重新从第 1 页开始
- }
- });
- }
- };
- $('.test-table-reload-btn .layui-btn').on('click', function(){
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- laydate.render({
- elem: '#test-laydate-range-date',
- type:'year'
- });
- });
- </script>
- </html>
|