@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 class="layui-form-label">代理名称</label>
    <div class="layui-input-block">
      <input type="text" name="" required  lay-verify="required" placeholder="" autocomplete="off" value="{{ isset($agent_name)?$agent_name:'' }}" class="layui-input" style="width:200px;" readonly="readonly">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">可用余额</label>
    <div class="layui-input-block">
    <input type="text" name=""   lay-verify="" placeholder="" autocomplete="off" class="layui-input" style="width:200px;" value="{{ isset($money)?$money:'' }}" readonly="readonly">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">操 作:</label>
        <div class="layui-input-block">
            <input type="radio" name="type" value="1" title="加款" checked/>
            <input type="radio" name="type" value="2" title="扣款">
        </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">金 额:</label>
    <div class="layui-input-block">
    <input type="text" name="upmoney"   lay-verify="" placeholder="请输入金额" autocomplete="off" class="layui-input" style="width:200px;" value="" >
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状 态:</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" title="正常" @if($status==1) checked @endif >
            <input type="radio" name="status" value="2" title="禁用" @if($status==2) checked @endif>
            <input type="radio" name="status" value="3" title="待启用" @if($status==3) checked @endif>
            <input type="radio" name="status" value="4" title="停用" @if($status==4) checked @endif>
        </div>
  </div>

@if(S('ACTION')!='view')
  <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>
@endif
</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);
	setTimeout(function(){
		parent.window.location.reload();
	},2500);
}
</script>
@endsection
