123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- @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 href="{{asset('js/plugins/bootstrap-select-1.13.5/css/bootstrap-select.min.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">
- {{-- <div class="form-group">
- <label class="col-sm-2 control-label" for="order_at"><span
- class="red">* </span>到期时间:</label>
- <div class="col-sm-4">
- <div class="input-group m-b">
- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- <input type="text" class="form-control" id="expireDate" name="expireDate"
- value="" autocomplete="off">
- </div>
- </div>
- </div>--}}
- {{-- <div class="form-group">
- <label class="col-sm-2 control-label" for="database">联系电话:</label>
- <div class="col-sm-4">
- <input type="text" class="form-control" id="mobile" name="mobile"
- value="">
- </div>
- </div>--}}
- <div class="form-group" id="siteAssign">
- <label class="col-sm-2 control-label" for="site_ids">站点分配:</label>
- <div class="col-sm-2">
- {{--<select class="chosen-select form-control" data-placeholder="选择站点..." multiple--}}
- <select class="selectpicker form-control"
- id="site_ids" name="site_ids" data-live-search="true" multiple
- title="请选择站点" autocomplete="off">
- <option value="">请选择站点</option>
- @foreach ($siteList as $site)
- <option value="{{$site->id}}"
- >{{$site->cn_title}}</option>
- @endforeach
- </select>
- </div>
- </div>
- {{-- <div class="form-group">
- <label class="col-sm-2 control-label" for="type"><span
- class="red">* </span>项目名称:</label>
- <div class="col-sm-8">
- <select class="form-control" style="width:350px;"
- id="siteId" name="siteId">
- <option value="0">请选择推送的项目</option>
- @foreach($siteList as $role)
- <option value="{{$role->id}}">{{$role->cn_title}}</option>
- @endforeach
- </select>
- </div>
- </div>--}}
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" data-id="{{$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>
- $(function () {
- laydate.render({
- elem: '#expireDate', //指定元素
- type: 'datetime'
- });
- });
- var jsSwitch = document.querySelector(".js-switch");
- new Switchery(jsSwitch, {color: "#1AB394", size: 'small'});
- $(document).on('click', '#cancel', function () {
- tips.closeParentLayer();
- });
- $(document).on('click', '#save', function () {
- var data = tips.getFormValues('#form');
- data.id = $(this).data('id');
- data.siteIds = $("#site_ids").val();
- var url = '/admin/message/push/' + data.id;
- var type = 'get';
- 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
|