@extends('vip.layouts')
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }

        .layui-form-switch em {
            width: auto;
        }

        .layui-form-switch {
            width: 44px;
            line-height: 23px;
        }

        .layui-form-item .checkbox {
            width: auto;
        }
    </style>
    <script type="text/html" id="type">
        @{{#if(d.type==1){ }}
            结算到代理
        @{{#}else{ }}
            结算到用户
        @{{#}}}
    </script>
    <!---注单管理-->
    <div class="layui-row">

        <div class="layui-col-xs12">

            <form class="layui-form rewrite" action="" eventType=eventForm>
                <div class="layui-form-item">

                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agentFund.agent_name') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="agent_name" id="from_agent_name" value="{{ $agent_name }}" eventType=event-query lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agentFund.order_id') }}</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="order_id" id="form_order_id" value="{{ $order_id }}" eventType=event-query autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agentFund.start_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="start_time"  id="start_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item"  value="{{$start_time}}" eventType=event-query>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agentFund.end_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="end_time"  id="end_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item" value="{{ $end_time }}" eventType=event-query>
                        </div>
                    </div>

                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm lay-btn-diy" eventType=event-query-submit  data-type="reload" style="opacity: 1; pointer-events: auto;">提交</a>
                        <a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;"
                        >重置</a>
                        <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"
                        ><i class="layui-icon">ဂ</i></a>
                    </div>

                </div>
            </form>
        </div>
    </div>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            agent_user:$("#agent_user").val(),
            grade:$('#grade').val(),
            phone:$('#phone').val(),
            email:$('#email').val(),
            order_id:$('#form_order_id').val(),
            agent_name:$('#from_agent_name').val(),
            start_time:$('#start_time').val(),
            end_time:$('#end_time').val(),
			sureblur:$('.layui-form-switch').text(),
        }
      });
    }
  };
$('.lay-btn-diy').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });*/

  //重置表单
  $('.reset').on('click',function(){
	  $('input').val('');
	  $('#grade').val('');
	  $('#type').val('');
	  $('#status').val('');
//	  var type = $(this).data('type');
///	  active[type] ? active[type].call(this) : '';
  });

    //刷新表单
//    $('.set').on('click',function(){
//    var type = $(this).data('type');
//    active[type] ? active[type].call(this) : '';
//    });
@endpush
<script>
    function Vertity(url) {
        layer.confirm('是否确认操作？', {
            btn: ['确认', '取消'] //按钮
        }, function() {
            $.getJSON(url, function(data, textStatus) {
                if (data.status == '1') {
                    layer.msg('操作成功');
                    reloadDataTable();
                } else {
                    layer.msg(data.msg);
                }
            });
        }, function() {
        });
    }
</script>
    @include('vip.datatable')
@endsection
