@extends('vip.layouts')
@section('content')
    <style>
        body{overflow-y: scroll;}
        .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;
        }
        #statistics{
            text-align: center;
        }
        .red{
            color: red;
        }
        .blue{
            color: #1E9FFF;
        }
        .green{
            color: green;
        }
        .yellow{
            color: #ffca10;
        }
    </style>
    <script type="text/html" id="waterTool">
        <a href="/admin/MoneyList/index?account_name=@{{d.account}}&star_time=&end_time=" class="layui-btn layui-btn-sm" style="margin-bottom:5px;margin-left:0px;">资金流水</a>
    </script>

	<script type="text/html" id="selectip">
	  <a href="/admin/demo/demos?register_ip=@{{d.register_ip}}&regist_startime=&regist_endtime=">@{{ d.register_ip}}</a><br>
	  <a href="/admin/demo/demos?last_ip=@{{d.last_ip}}&regist_startime=&regist_endtime=">@{{ d.last_ip}}</a>
	</script>

	<script type="text/html" id="selecturl">
	  <a href="/admin/demo/demos?register_url=@{{d.register_url}}&regist_startime=&regist_endtime=">@{{ d.register_url}}</a><br>
	  <a href="/admin/demo/demos?last_url=@{{d.last_url}}&regist_startime=&regist_endtime=">@{{ d.last_url}}</a>
	</script>

	<script type="text/html" id="userdetail">
	  <a href="/admin/user/view?account=@{{d.account}}">@{{ d.account}}</a>
	</script>

	<script type="text/html" id="moneyrecord">
	  <a href="/admin/fund/index?isuser=1&account_name=@{{d.account}}&star_time=&end_time=">查看财务</a><br>@{{ d.cash}}<input type="hidden" id="curpage_cash" value="@{{d.pagecash}}" />
	</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('demo.account') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="account" id="form_account" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $account }}">
						</div>
						<div class="layui-input-inline checkbox">
                            <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" checked eventType=event-query>
                        </div>

                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('demo.register_ip') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="register_ip"  id="form_register_ip"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query value="{{$register_ip}}">
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('demo.last_ip') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="last_ip"  id="form_last_ip"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query value="{{$last_ip}}">
						</div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('user.register_url') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="register_url" id="form_register_url" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query value="{{$register_url}}">
                        </div>

                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('user.last_url') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="last_url" id="form_last_url" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query value="{{$last_url}}">
                        </div>

                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('demo.statuss') }}</label>
						<div class="layui-input-inline" style="width: 125px">
							<select name="statuss"  id="form_statuss"  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
								<option value="">{{ trans('demo.select_status') }}</option>
								@foreach(trans('status.account_detailed.statuss') as $k=>$v):
									@if($statuss==$k))
										<option value="{{$k}}" selected="selected">{{$v}}</option>
									@else
										<option value="{{$k}}">{{$v}}</option>
									@endif
								@endforeach
							</select>
						</div>

					</div>
					<!--<div class="layui-inline">

						<label class="layui-form-label">{{ trans('demo.regist_startime') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="regist_startime"  id="regist_startime" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item"
                            value="{{Request::has('regist_startime')?Request::get('regist_startime'):trans('status.default_time.seven_day')}}" eventType=event-query>
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('demo.regist_endtime') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="regist_endtime"  id="regist_endtime" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item"
                            value="{{Request::has('regist_endtime')?Request::get('regist_endtime'):trans('status.default_time.etime')}}" eventType=event-query>
						</div>
                    </div>-->
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('user.cash_area') }}</label>
						<div class="layui-input-inline" style="width: 100px;">
							<input type="text" name="cash_small" id="form_cash_small" placeholder="￥0" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $cash_small }}">
						</div>
						<div class="layui-form-mid">-</div>
						<div class="layui-input-inline" style="width: 100px;">
							<input type="text" name="cash_big" id="form_cash_big" placeholder="￥0" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $cash_big }}">
						</div>

				   </div>

					<div class="layui-inline">
					<a class="layui-btn layui-btn-sm lay-btn-diy"   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;"><i class="layui-icon">ဂ</i></a>
				   </div>
                    <!-- <div class="layui-inline"><a href="javascript:delWin('/admin/demo/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div> -->
                </div>
            </form>
        </div>
    </div>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            account:$("#form_account").val(),
            register_ip:$('#form_register_ip').val(),
            last_ip:$('#form_last_ip').val(),
			register_url:$('#form_register_url').val(),
			last_url:$('#form_last_url').val(),
            regist_startime:$('#form_regist_startime').val(),
            regist_endtime:$('#form_regist_endtime').val(),
            statuss:$('#form_statuss').val(),
            cash_small:$('#form_cash_small').val(),
            cash_big:$('#form_cash_big').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('');
	  $('#form_statuss').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
