123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- <style>
- .btn-primary {
- background: #2a94e0 !important;
- border-color: #2a94e0 !important;
- }
- </style>
- @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="row" id="searchForm" onsubmit="units.search();return false;">
- <div class="col-md-4">
- <div class="input-group">
- <span class="input-group-btn">
- <button type="button" class="btn btn-md btn-primary"
- onclick="units.add()"> 添加</button>
- </span>
- </div>
- </div>
- <div class="input-group">
- <select data-placeholder="请选择客服..." class="form-control"
- style="width:150px;float: right"
- name="projectStewardId"
- id="projectStewardId" onchange="tips.selectPage();">
- <option value="" selected>请选择客服</option>
- @foreach ($projectSteward as $key => $value)
- <option value="{{$key}}">{{$value}}</option>
- @endforeach
- </select>
- <select data-placeholder="请选择任务状态..." class="form-control"
- style="width:150px;float: right" name="fulfil" id="fulfil"
- onchange="tips.selectPage();">
- <option value="" selected>请选择任务状态</option>
- <option value="1">未完成</option>
- <option value="2">完成</option>
- </select>
- <select name="status" id="status" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择项目状态</option>
- @foreach(\App\Http\Models\Site::STATUS_MAP as $key=>$item)
- @if(!in_array($key,[5,6]))
- <option value="{{$key}}">{{$item}}</option>
- @endif
- @endforeach
- </select>
- <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
- name="keyword"
- id="keyword" style="width: 200px;float: right">
- <span class="input-group-btn">
- <button type="button" class="btn btn-md btn-primary"
- onclick="units.search()"> 搜索
- </button>
- <button type="button" class="btn btn-md" style="margin-left: 10px"
- name="btnReset"> 重置
- </button>
- </span>
- </div>
- </form>
- <hr>
- <div class="table-responsive">
- <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script>
- var units = {
- search: function () {
- tips.selectPage();
- },
- save: function (siteId, statusId, taskId) {
- tips.ajax({
- url: '/admin/analyze/index/customerServiceTaskCarryOut/type/1/siteId/' + siteId + '/status/' + statusId + '/taskId/' + taskId,
- type: 'get',
- tableRefresh: '#table'
- });
- },
- del: function (siteId, statusId, taskId) {
- layer.confirm('您确定要删除吗?', {icon: 3, title: '删除信息'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/analyze/index/customerServiceTaskCarryOut/type/2/siteId/' + siteId + '/status/' + statusId + '/taskId/' + taskId,
- type: 'get',
- tableRefresh: '#table'
- });
- });
- },
- add: function () {
- layer.open({
- type: 2,
- content: ['/admin/work-task/site-task'],
- area: ['70%', '60%'],
- title: '保存'
- });
- },
- openDetail: function (id, title) {
- tips.page('/admin/sites/' + id + '/overview', title);
- }
- };
- var config = {};
- config.url = '/admin/analyze/index/customerServiceTask';
- config.showColumns = false;
- config.columns = [ //字段
- {
- title: '序号', align: 'center', formatter: function (value, item, index) {
- return index + 1;
- },
- width: '20px'
- },
- {title: '项目名称', field: 'siteName', align: 'center'},
- {title: '项目状态', field: 'status', align: 'center'},
- {title: '任务标题', field: 'title', align: 'center'},
- {title: '任务内容', field: 'data', align: 'center'},
- {title: '是否完成', field: 'fulfil', align: 'center'},
- {title: '安排时间', field: 'initial_date', align: 'center'},
- {title: '完成时间', field: 'flow_except_date', align: 'center'},
- {title: '任务执行人', field: 'user', align: 'center'},
- {
- title: '操作', field: 'id', align: 'center',
- formatter: function (value, rows) {
- var str = '';
- if (rows.fulfil === '未完成') {
- str += '<button onclick="units.save(' + rows.siteId + ',' + rows.statusId + ',' + rows.taskId + ')" class="btn btn-md btn-primary">完成</button> ';
- }
- str += '<button onclick="units.del(' + rows.siteId + ',' + rows.statusId + ',' + rows.taskId + ')" class="btn btn-md btn-danger">删除</button> ';
- str +='<button onclick="units.openDetail(' + rows.siteId + ',\'' + rows.siteName + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button>';
- return str;
- },
- cellStyle: function () {
- return {css: {'display': 'flex'}};
- }
- }
- ];
- tips.bootstrapTable(config);
- </script>
- @endsection
|