@extends('vip.layouts')
@section('content')

<form class="layui-form" action="{{ url()->full() }}&id={{$data['id']}}" id="submitForm" name="submitForm" method="post"  eventType=eventAjaxForm>
{!! csrf_field() !!}
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block">
      <input type="text" name="account" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{$data['account']}}" disabled="disabled" >
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">账户余额</label>
    <div class="layui-input-block">
    <input type="text" name="available_cash"   lay-verify="" autocomplete="off" class="layui-input" value="{{$data['available_cash']}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">存款笔数</label>
    <div class="layui-input-block">
    <input type="text" name="recharge_num"   lay-verify="" autocomplete="off" class="layui-input" value="{{$data['recharge_num']}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">取款笔数</label>
    <div class="layui-input-block">
    <input type="text" name="take_num"   lay-verify="" autocomplete="off" class="layui-input" value="{{$data['take_num']}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">手机</label>
    <div class="layui-input-inline">
    <input type="text" name="phone"   lay-verify="" placeholder="请输入手机号码" autocomplete="off" class="layui-input" value="{{$data['phone']}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">QQ</label>
    <div class="layui-input-inline">
      <input type="text" name="qq"   lay-verify="" placeholder="请输入QQ号码" autocomplete="off" class="layui-input" value="{{$data['qq']}}">
    </div>
  </div>

  <!--<div class="layui-form-item">
    <label class="layui-form-label">邮箱</label>
    <div class="layui-input-inline">
      <input type="text" name="email"   lay-verify="" placeholder="请输入邮箱" autocomplete="off" class="layui-input" value="{{$data['email']}}">
    </div>
  </div>-->
  <div class="layui-form-item">
    <label class="layui-form-label">分享邀请码</label>
    <div class="layui-input-inline">
      <input type="text" name="open_invitation"   lay-verify="" autocomplete="off" readonly class="layui-input" value="{{$data['open_invitation']}}">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">微信</label>
    <div class="layui-input-inline">
      <input type="text" name="wechat"   lay-verify="" placeholder="请输入微信" autocomplete="off" class="layui-input" value="{{$data['wechat']}}">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">真实姓名</label>
    <div class="layui-input-inline">
      <input type="text" name="name"   lay-verify="" placeholder="请输入真实姓名" autocomplete="off" class="layui-input" value="{{$data['name']}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">开户行</label>
    <div class="layui-input-inline">
      <input type="text" name="bank_name"   lay-verify="" value="{{$data['bank_name']}}" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">开户地址</label>
    <div class="layui-input-inline">
      <input type="text" name="bank_address"   lay-verify="" value="{{$data['bank_address']}}" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">银行卡号</label>
    <div class="layui-input-inline">
      <input type="text" name="bank_number"   lay-verify="" value="{{$data['bank_number']}}" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
    <div class="layui-form-mid layui-word-aux">编辑真实姓名和银行卡信息</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">会员等级</label>
    <div class="layui-input-block" style="width: 190px;">
      <select name="grade" >
       <option value="">{{ trans('user.select_grade') }}</option>
                  @foreach ($data['gradelist'] as $k=>$v)
                    @if($data['grade']==$k))
                      <option value="{{$k}}" selected="selected">{{$v}}</option>
                    @else
                      <option value="{{$k}}">{{$v}}</option>
                    @endif
                  @endforeach
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">所属会员组</label>
    <div class="layui-input-block" style="width: 90%;">
        @foreach ($data['group'] as $k=>$v)
          <input type="checkbox" name="groups[{{$v['group_code']}}]" autocomplete="off" class="layui-input" title="{{$v['group_name']}}"
    @if(isset($data['group_code'])&&in_array($v['group_code'],explode(',',$data['group_code']))) checked @endif>
        @endforeach
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">注册时间</label>
    <div class="layui-input-inline">
      <input type="text" name="menu_icon" value="{{$data['register_time']}}"  lay-verify="" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">注册IP</label>
    <div class="layui-input-inline">
      <input type="text" name="menu_icon" value="{{$data['register_ip']}}"  lay-verify="" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">最后登录时间</label>
    <div class="layui-input-inline">
      <input type="text" name="menu_icon"  value="{{$data['last_time']}}" lay-verify="" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">最后登录IP</label>
    <div class="layui-input-inline">
      <input type="text" name="menu_icon" value="{{$data['last_ip']}}"  lay-verify="" autocomplete="off" class="layui-input" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">投注流水</label>
    <div class="layui-input-inline" style="line-height: 37px;">
      {{$data['bettingMoney']}}
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">提现金额</label>
    <div class="layui-input-inline" style="line-height: 37px;">
      {{$data['needBettingMoney']}}
    </div>
  </div>

  <div class="layui-form-item">
            <label class="layui-form-label">真人转账开关</label>
            <div class="layui-input-block">
              <input type="radio" name="og_type" value="1" title="启用" @if($data['og_type']==1) checked @endif>
              <input type="radio" name="og_type" value="0" title="审核" @if($data['og_type']==0) checked @endif>
              <input type="radio" name="og_type" value="-1" title="禁用" @if($data['og_type']=='-1') checked @endif>
            </div>
        </div>

  <div class="layui-form-item">
      <label class="layui-form-label">测试账号</label>
      <div class="layui-input-block">
        <input type="radio" name="user_type" value="2" title="是" @if($data['user_type']==2) checked @endif>
        <input type="radio" name="user_type" value="1" title="否" @if($data['user_type']==1) checked @endif>
      </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">备注</label>
    <div class="layui-input-inline">
      <textarea  name="remark" style="width: 550px;height: 105px;" cols="80" rows="8">{{$data['remark']}}
      </textarea>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>

<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});
function cbFormSuccess(data){
	//layer.msg(data.msg);
	layer.alert(data.msg,{},function(){
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index);
		window.history.go(-1);

	});
}
</script>
@endsection
