123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form method="get" class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="manager_ids">项目经理:</label>
- <div class="col-sm-10">
- <select data-placeholder="选择行业类型..." multiple class="chosen-select"
- style="width:350px;"
- id="manager_ids" name="manager_ids">
- <option value="">请选择项目经理</option>
- @foreach ($managers as $item)
- <option value="{{$item->id}}"
- @if(in_array($item->id,$hasMangerIds)) selected @endif>{{$item->username}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="editor_ids">采编人员:</label>
- <div class="col-sm-10">
- <select data-placeholder="选择采编人员..." multiple class="chosen-select"
- style="width:350px;"
- id="editor_ids" name="editor_ids">
- <option value="">请选择采编人员</option>
- @foreach ($editors as $item)
- <option value="{{$item->id}}"
- @if(in_array($item->id,$hasEditorIds)) selected @endif>{{$item->username}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="server_ids">客服人员:</label>
- <div class="col-sm-10">
- <select data-placeholder="选择客服人员..." multiple class="chosen-select"
- style="width:350px;"
- id="server_ids" name="server_ids">
- <option value="">请选择客服人员</option>
- @foreach ($services as $item)
- <option value="{{$item->id}}"
- @if(in_array($item->id,$hasServerIds)) selected @endif>{{$item->username}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" data-id="{{$user->id??0}}" id="save">
- 保存
- </button>
- <button class="btn btn-white" type="button" id="cancel">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script src="{{asset('js/plugins/chosen/chosen.jquery.js')}}"></script>
- <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script>
- $(document).on('click', '#cancel', function () {
- tips.closeParentLayer();
- });
- var config = {".chosen-select": {}};
- for (var selector in config) $(selector).chosen(config[selector]);
- var jsSwitch = document.querySelector(".js-switch");
- new Switchery(jsSwitch, {color: "#1AB394", size: 'small'});
- $(document).on('click', '#save', function () {
- var data = {};
- data.siteIds = JSON.parse('{!!json_encode($siteIds)!!}');
- data.editorIds = $("#editor_ids").val();
- data.serverIds = $("#server_ids").val();
- data.managerIds = $("#manager_ids").val();
- var ajaxConfig = {
- url: '/admin/sites/allot',
- type: 'put',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- laydate.render({
- elem: '#order_at', //指定元素
- type: 'datetime'
- });
- </script>
- @endsection
|