123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- @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">
- <link rel="stylesheet"
- href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
- @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">
- <input type="hidden" name="site_id" id="site_id" value="{{$siteId}}">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="customer_name"><span
- class="red">* </span>客户姓名 :</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="customer_name" name="customer_name"
- autocomplete="off" value="{{$info->customer_name??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="tel"><span class="red">* </span>电话:</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="tel" name="tel"
- value="{{$info->tel??''}}" autocomplete="off">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="position"><span class="red">* </span>
- 职位:</label>
- <div class="col-sm-6">
- <select class="form-control" id="position" name="position">
- @foreach($roleList as $key=>$item)
- <option value="{{$key}}"
- @if (!empty($info->position) && $info->position==$key) selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="order_volume"><span
- class="red">* </span>订单成交量:</label>
- <div class="col-sm-6">
- <select class="form-control"
- id="order_volume" name="order_volume">
- @foreach($orderVolumeList as $key=>$item)
- <option value="{{$key}}"
- @if (!empty($info->order_volume) && $info->order_volume==$key) selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="gift_name"><span
- class="red">* </span>礼品名称:</label>
- <div class="col-sm-6">
- <select class="form-control"
- id="gift_name" name="gift_name">
- @foreach($giftList as $key=>$item)
- @if(in_array($key,[3,4]))
- <option value="{{$key}}"
- @if (!empty($info->gift_name) && $info->gift_name==$key) selected @endif>{{$item}}</option>
- @endif
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="gift_amount"><span class="red">* </span>礼品金额(元):</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="gift_amount" name="gift_amount"
- value="{{$info->gift_amount??''}}" autocomplete="off">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="gift_time"><span
- class="red">* </span>送礼时间:</label>
- <div class="col-sm-6">
- <input type="text" class="form-control my-date deadline"
- name="gift_time" id="gift_time"
- value="{{$info->gift_time??''}}" autocomplete="off">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="transaction_customer"><span
- class="red">* </span>
- 成交客户:</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="transaction_customer"
- name="transaction_customer"
- value="{{$info->transaction_customer??''}}" autocomplete="off">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="remark">
- 备注:</label>
- <div class="col-sm-6">
- <textarea name="remark" id="remark"
- style="width: 100%;height: 100px ;border: 1px solid #e5e6e7;">{{$info->remark??''}}</textarea>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" data-id="{{$info->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/switchery/switchery.js')}}"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script>
- //同时绑定多个
- lay('.deadline').each(function () {
- laydate.render({
- elem: this
- , trigger: 'click'
- , type: 'datetime'
- });
- });
- $(document).on('click', '#cancel', function () {
- tips.closeParentLayer();
- });
- $(document).on('click', '#save', function () {
- var data = tips.getFormValues('#form');
- if(!data.customer_name){
- layer.alert('请输入姓名', {icon: 0});
- return;
- }
- if(!data.tel){
- layer.alert('请输入电话', {icon: 0});
- return;
- }
- if(!data.gift_amount){
- layer.alert('请输入礼品金额', {icon: 0});
- return;
- }
- if(!data.gift_time){
- layer.alert('请输入送礼时间', {icon: 0});
- return;
- }
- var id = $(this).data('id');
- var url = '/admin/witness-project/introduce-add/' + id + '/{{$siteId}}';
- var type = 'post';
- var ajaxConfig = {
- url: url,
- type: type,
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- </script>
- @endsection
|