@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="check">
        <a class="" href="/admin/MoneyList/index?account_name=@{{ d.account_name }}" >核查</a>
    </script>
    <script type="text/html" id="account">
        <a class="" href="/admin/user/view?identity=@{{ d.account_identity }}" >@{{ d.account_name }}</a>
    </script>
    <!---注单管理-->
    <div class="layui-row">

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

            <form class="layui-form rewrite" action="" eventType=eventForm>
                <div class="layui-form-item">
                    <input id="form_identity" name="identity" eventType=event-query type="hidden" value="{{$identity}}">
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('agent.child_name') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="account_name" id="form_account_name" value="{{ $account_name }}" eventType=event-query lay-verify="required" autocomplete="off" class="layui-input">
						</div>
						<!--<div class="layui-input-inline checkbox">
							<input type="checkbox" name="sureblur" id="sureblur" lay-skin="switch" lay-text="精确|模糊" checked>
						</div>-->
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agent.star_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="start_time" id="form_star_time" placeholder=" - " lay-verify=""
                                   autocomplete="off" class="layui-input test-item" eventType=event-query
                                   value="{{$start_time}}">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('agent.end_time') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="end_time" id="form_end_time" placeholder=" - " lay-verify=""
                                   autocomplete="off" class="layui-input test-item" eventType=event-query
                                   value="{{$end_time}}">
                        </div>
                    </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;"
                       eventType=event-query-submit
                    >提交</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;" eventType=event-query-submit>
                        <i class="layui-icon">ဂ</i>
                    </a>
                    @if(checkRriv('/admin/AgentChild/delete'))<a href="javascript:delWin('/admin/AgentChild/delete?account_identity=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif
                </div>
            </form>
        </div>
    </div>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            agent_user:$("#agent_user").val(),
            identity:$('#identity').val(),
            grade:$('#grade').val(),
            phone:$('#phone').val(),
            email:$('#email').val(),
            type:$('#type').val(),
            status:$('#status').val(),
            regist_startime:$('#regist_startime').val(),
            regist_endtime:$('#regist_endtime').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

    @include('vip.datatable')
@endsection
