@extends('vip.layouts')
@section('content')
    <style>
        .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;
        }
    </style>

	<script type="text/html" id="userdetail">
	  <a href="/admin/feedback/feedbacks?account=@{{d.account_name}}&startime=&endtime=">@{{ d.account_name}}</a>
	</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('user.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('user.type') }}</label>
						<div class="layui-input-inline" style="width: 200px">
							<select name="type"  id="form_type"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
								<option value="">{{ trans('user.select_replytype') }}</option>
								@foreach(trans('status.feedback.type') as $k=>$v):
									@if($type==$v))
										<option value="{{$v}}" selected="selected">{{$v}}</option>
									@else
										<option value="{{$v}}">{{$v}}</option>
									@endif
								@endforeach
							</select>
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('user.content') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="content"  id="form_content"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $content }}">
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('user.reply') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="reply"  id="form_reply"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $reply }}">
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('user.status') }}</label>
						<div class="layui-input-inline" style="width: 125px">
							<select name="status"  id="form_status"  lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
								<option value="">{{ trans('user.select_status') }}</option>
								@foreach(trans('status.feedback.status') as $k=>$v):
									@if($status==$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('user.startime') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="startime"  id="form_startime" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item"
                             eventType=event-query  value="{{ $startime }}">
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('user.endtime') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="endtime"  id="form_endtime" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item"
                             eventType=event-query  value="{{ $endtime }}">
						</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>

                    @if(checkRriv('/admin/Feedback/delete'))<div class="layui-inline"><a href="javascript:delWin('/admin/Feedback/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div>@endif
                </div>
            </form>
        </div>
    </div>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            account:$("#form_account").val(),
            type:$('#form_type').val(),
            content:$('#form_content').val(),
            reply:$('#form_reply').val(),
            status:$('#form_status').val(),
            startime:$('#form_startime').val(),
            endtime:$('#form_endtime').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_status').val('');
	  $('#form_type').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')
    <link rel="stylesheet" href="{{ asset('/css/untablelist.css') }}"  />
@endsection
