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

<form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType="eventAjaxForm">
{!! csrf_field() !!}
  <div class="layui-form-item">
<label>修改会员状态</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">会员</label>
    <div class="layui-input-block">
      <input type="text" name="agent_user" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset($data['agent_user'])?$data['agent_user']:''}}" disabled="disabled">
    </div>
  </div>
  
  
  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('agentGrade.state') }}</label>
    <div class="layui-input-block">
      <select name="state" id="form_state" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
				@if($data['state']==1))
					<option value="2" selected="selected">禁用</option>
          <option value="1" >启用</option>
				@else
          <option value="1" selected="selected">启用</option>
          <option value="2" >禁用</option>
				@endif
		</select>
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">二次密码</label>
    <div class="layui-input-block">
    <input type="password" name="password"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

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

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

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});

/*function cbFormFail(data){
	layer.alert(data.msg,{},function(){
		

	});
}*/

function cbFormSuccess(data){
	layer.alert(data.msg,{},function(){
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index);
		window.history.go(-1);

	});
}
</script>
@endsection
