@extends('vip.layouts')
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }
    </style>
    <!---注单管理-->
    <div class="layui-row">

        <!-- <div class="layui-col-xs12 layui-col-sm2 layui-col-md2">
            <ul id="tree" class="tree-table-tree-box"></ul>
        </div>-->
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12 " >

            <form class="layui-form rewrite" eventType="eventForm" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">{{ trans('chat.room_name') }}</label>
                        <div class="layui-input-inline">
                            <input type="text" name="title" id="title" eventType="event-query"  value="{{ $title }}" lay-verify="required" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                     {{--<div class="layui-inline">
                        <label class="layui-form-label">{{ trans('notice.type') }}</label>
                        <div class="layui-input-inline">

                            <select name="type" id="type" lay-verify="" autocomplete="on" eventType="event-query">
                                <option value="">{{ trans('menu.select_menutype') }}</option>
                               @if(count($classtype)>0)
                                    @foreach($classtype as $k=>$v):
                                <option value="{{$v["id"]}}" @if($type==$v["id"]&&$type!=null) selected @endif >{{$v["name"]}}</option>
                                    @endforeach
                                   @endif
                            </select>
                        </div>
                    </div>--}}

                    {{--<!--  <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('notice.add_startime') }}</label>
                         <div class="layui-input-inline">
                             <input type="text" name="add_startime" id="add_startime" placeholder=" - " lay-verify=""
                                    autocomplete="off" class="layui-input test-item" value="{{trans('status.default_time.atime')}}" eventType=event-query>
                         </div>
                     </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('notice.add_endtime') }}</label>
                         <div class="layui-input-inline">
                             <input type="text" name="add_endtime" id="add_endtime" placeholder=" - " lay-verify=""
                                    autocomplete="off" class="layui-input test-item" value="{{trans('status.default_time.etime')}}" eventType=event-query>
                         </div>
                     </div> -->--}}
                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-sm lay-btn-diy"  eventType="event-query-submit"
                           style="opacity: 1; pointer-events: auto;">提交</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" onclick="window.location.reload()">ဂ</i></a>
                    </div>
                    @if(checkRriv('/admin/ChatRoom/add'))<div class="layui-inline">
                        <a href="/admin/ChatRoom/add" class="layui-btn layui-btn-sm  ">添加</a>

                    </div>@endif
                   @if(checkRriv('/admin/ChatRoom/delete'))<div class="layui-inline"><a href="javascript:delWin('/admin/ChatRoom/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div>@endif
                </div>
            </form>
        </div>
        @push('dataTableJS')
            //                var active = {
            //                reload: function(){
            //                //执行重载
            //                table.reload('{{ $dataId }}', {
            //            page: {
            //                curr: 1 //重新从第 1 页开始
            //                }
            //                ,where: {
            ///                title:$("#title").val(),
            //                type:$('#type').val(),
            //                add_startime:$('#add_startime').val(),
            //                add_endtime:$('#add_endtime').val(),
            //                }
            //                });
            //                }
            //                };
            //                $('.lay-btn-diy').on('click', function(){
            //                var type = $(this).data('type');
            //                active[type] ? active[type].call(this) : '';
            //                });

            //重置表单
            $('.reset').on('click',function(){
            $('input').val('');
            $('#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') }}"  />
    </div>
    </div>

@endsection
