123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- @extends('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="title">项目名称:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="title" name="title"
- value="{{$data->title ?? ''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="password">域名:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="password" name="password" value="{{$data->domain??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="ae_id">ae人员:</label>
- <div class="col-sm-8">
- <select data-placeholder="选择ae人员..." class="chosen-select" style="width:350px;"
- id="ae_id" name="ae_id">
- <option value="">请选择se</option>
- @foreach ($aes as $ae)
- <option value="{{$ae->id}}"
- @if(($data->ae_id??null)==$ae->id) selected @endif>{{$ae->name}}</option>
- @endforeach
- </select>
- </div>
- </div>
- {{--<div class="hr-line-dashed"></div>--}}
- {{--<div class="form-group">--}}
- {{--<label class="col-sm-2 control-label" for="status">状态:</label>--}}
- {{--<div class="col-sm-8">--}}
- {{--<input type="checkbox" id="status" name="status" class="js-switch"--}}
- {{--@if(!$user || $user->status) checked @endif>--}}
- {{--</div>--}}
- {{--</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 id = $(this).data('id');
- var url = '/system/user';
- var type = 'post';
- if (id > 0) { //编辑
- url += '/' + id;
- type = 'put';
- }
- var data = tips.getFormValues('#form');
- data.status = jsSwitch.checked ? 1 : 0;
- var ajaxConfig = {
- url: url,
- type: type,
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 3000}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- </script>
- @endsection
|