@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" style="line-height: 36px;">
        {{isset($data['account_name'])?$data['account_name']:''}}
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">操作人员：</label>
      <div class="layui-input-block" style="line-height: 36px;">
        {{isset($data['sysetem_user'])?$data['sysetem_user']:''}}
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">添加时间：</label>
      <div class="layui-input-block" style="line-height: 36px;">
        {{isset($data['addtime'])?$data['addtime']:''}}
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">审核时间：</label>
      <div class="layui-input-block" style="line-height: 36px;">
        {{isset($data['audittime'])?$data['audittime']:''}}
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">状态：</label>
      <div class="layui-input-block">
        <select name="status" id="status" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
            <option value="2" @if(isset($data['status']) && $data['status'] == 2) selected @endif>审核通过</option>
            <option value="3" @if(isset($data['status']) && $data['status'] == 3) selected @endif>审核未通过</option>
        </select>
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-block">
        <textarea name="remark" required  lay-verify="required" autocomplete="off" style="width: 600px; height: 180px;">{{isset($data['remark'])?$data['remark']:''}}</textarea>
      </div>
    </div>
@if(isset($data['status']) && $data['status'] == 1)
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</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(){
              window.location.href='/admin/uservip/index';
          },2500);
      }
  </script>
@endsection
