@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" action="" eventType=eventForm>
                <div class="layui-form-item">

                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('menu.name') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="name" id="name" lay-verify="required" autocomplete="off" class="layui-input">
						</div>
                    </div>
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('menu.href') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="href" id="href" lay-verify="required" autocomplete="off" class="layui-input">
						</div>
                    </div>
                    <div class="layui-inline">
						<!--<label class="layui-form-label">{{ trans('menu.parent_id') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="parent_id" id="parent_id" lay-verify="required" autocomplete="off" class="layui-input">
						</div>-->

						<label class="layui-form-label">{{ trans('menu.type') }}</label>
						<div class="layui-input-inline">
							<select name="type"  id="type"  lay-verify="" autocomplete="off" class="layui-input" >
								<option value="">{{ trans('menu.select_menutype') }}</option>
								@foreach(trans('status.dc_navs.type') as $k=>$v):
									<option value="{{$k}}">{{$v}}</option>
								@endforeach
							</select>
						</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;">提交</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>

                    &nbsp;&nbsp;&nbsp;&nbsp;<div class="layui-inline"><a href="\/admin/system/addMenu"
                     class="layui-btn layui-btn-sm">添加</a></div>
                    <div class="layui-inline"><a href="/admin/menu/add"
                                                 class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div>

                </div>
            </form>

            <script>
                $(function () {
                    $('body').on('click','a[eventtype="event-edit"]',function () {
                        var span=$(this).prev();
                        var id=span.attr('data-id');
                        openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
                    })
                })
            </script>
@push('dataTableJS')


  //重置表单
  $('.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')
        </div>

    </div>
@endsection
