123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.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 class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="customer_name">客户名称:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="customer_name" name="customer_name"
- value="{{$data->customer_name ?? ''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="domain">域名:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="domain" name="domain"
- value="{{$data->domain??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="contact_user">联系人:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="contact_user" name="contact_user"
- value="{{$data->contact_user??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="contact_phone">联系方式:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="contact_phone" name="contact_phone"
- value="{{$data->contact_phone??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="remark">备注:</label>
- <div class="col-sm-8">
- <textarea name="remark" id="remark" cols="30" rows="10"
- class="form-control">{{$data->remark??''}}</textarea>
- </div>
- </div>
- @php $authUser=auth()->user(); @endphp
- {{--编辑情况下 只有超管或者渠道boss 才可以操作--}}
- @if($data&&($authUser->is_super||$authUser->role_id==\App\Http\Models\Role::TYPE_CHANNEL_BOSS))
- <div class="form-group">
- <label class="col-sm-2 control-label" for="user_id">转移用户:</label>
- <div class="col-sm-8 ">
- <select data-placeholder="转移用户..." style="width:350px;"
- class="chosen-select" id="user_id" name="user_id">
- <option value="">请选择用户</option>
- @foreach ($users as $item)
- <option value="{{$item->id}}"
- @if(($data->user_id??0)==$item->id) selected @endif>{{$item->username}}</option>
- @endforeach
- </select>
- </div>
- </div>
- @endif
- <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"
- onclick="units.save({{$data->id??0}})">
- 保存
- </button>
- <button class="btn btn-white closeLayer" 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/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script>
- laydate.render({
- elem: '#sign_at', //指定元素
- type: 'datetime'
- });
- var config = {".chosen-select": {}};
- for (var selector in config) $(selector).chosen(config[selector]);
- var units = {
- save: function (id) {
- var data = tips.getFormValues('#form');
- data.channel_ids = $("#channel_ids").val();
- var ajaxConfig = {
- url: '/admin/agents/customer/' + id,
- type: 'put',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- window.parent.tips.tableRefresh('#table');
- tips.closeParentLayer();
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- };
- </script>
- @endsection
|