123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- @extends('admin/layout')
- @section('header')
- <link rel="stylesheet" href="{{asset('js/plugins/bootstrap-select-1.13.9/dist/css/bootstrap-select.min.css')}}">
- <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" value="{{$role}}" name="role">
- <input type="hidden" value="{{$type}}" name="type">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="cond_id"><span
- class="red">* </span>任务类型:</label>
- <div class="col-sm-8">
- <select class="my-select" name="cond_id" id="cond_id">
- @foreach($condList as $key=> $item)
- <option value="{{$key}}"
- @if(isset($weekTaskInfo->cond_id) && $key==$weekTaskInfo->cond_id??'') selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="describe"><span class="red"></span>
- 任务描述:</label>
- <div class="col-sm-6">
- <textarea type="text" class="form-control" style="width: 200px"
- name="describe">{{$weekTaskInfo->describe??''}}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="user_type"><span
- class="red"> </span>任务认领人:</label>
- <div class="col-sm-8">
- <select class="my-select" name="user_type" id="user_type">
- @if($role=='wfp-web')
- @foreach($web as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) &&$key==$user_id) selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- @if($role=='wfp-design')
- @foreach($design as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) && $key==$user_id??'') selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- @if($role=='wfp-exam')
- @foreach($exam as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- @if($role=='wfp-site-exam')
- @foreach($siteExam as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- @if($role=='wfp-site')
- @foreach($site as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- @if($role=='wfp-seo')
- @foreach($seo as $key=> $item)
- <option value="{{$key}}"
- @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
- </option>
- @endforeach
- @endif
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="day"><span
- class="red">* </span>任务日期:</label>
- <div class="col-sm-8">
- <select class="my-select" name="day" id="day">
- <option value="1" @if($day==1) selected @endif>周一</option>
- <option value="2" @if($day==2) selected @endif>周二</option>
- <option value="3" @if($day==3) selected @endif>周三</option>
- <option value="4" @if($day==4) selected @endif>周四</option>
- <option value="5" @if($day==5) selected @endif>周五</option>
- <option value="6" @if($day==6) selected @endif>周六</option>
- <option value="0" @if($day==0) selected @endif>周日</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="duty_id"><span
- class="red">* </span>项目负责人:</label>
- <div class="col-sm-8">
- <select class="my-select" name="duty_id" id="duty_id">
- @foreach($allUserList as $key=> $item)
- <option value="{{$key}}"
- @if(isset($weekTaskInfo->duty_id) && $key==$weekTaskInfo->duty_id) selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="design_id"><span
- class="red"> </span>设计:</label>
- <div class="col-sm-8">
- <select class="my-select" name="design_id" id="design_id">
- @foreach($design as $key=> $item)
- <option value="{{$key}}"
- @if(isset($weekTaskInfo->design_id) && $key==$weekTaskInfo->design_id) selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="web_id"><span
- class="red"></span>前端:</label>
- <div class="col-sm-8">
- <select class="my-select" name="web_id" id="web_id">
- @foreach($web as $key=> $item)
- <option value="{{$key}}"
- @if(isset($weekTaskInfo->web_id) && $key==$weekTaskInfo->web_id) selected @endif>{{$item}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="check_score"><span
- class="red"> </span>检查反馈:</label>
- <div class="col-sm-8">
- <select class="my-select" name="check_score" id="check_score">
- <option value="0"
- @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==0) selected @endif>
- 请评价
- </option>
- <option value="1"
- @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==1) selected @endif>
- 非常满意
- </option>
- <option value="2"
- @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==2) selected @endif>
- 满意
- </option>
- <option value="3"
- @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==3) selected @endif>
- 一般
- </option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="username_new"><span class="red">* </span>
- 备注:</label>
- <div class="col-sm-6">
- <textarea type="text" style="width: 200px" class="form-control"
- name="remark">{{$weekTaskInfo->remark??''}}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="deadline"><span class="red">* </span>
- 最后期限:</label>
- <div class="col-sm-6">
- <input type="text" style="width: 200px" class="form-control my-date deadline"
- name="deadline" id="deadline"
- value="{{$weekTaskInfo->deadline??''}}"
- @if(!empty($weekTaskInfo->id) && $role_id==14 || $role_id==27) disabled="disabled" @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="{{$weekTaskInfo->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/bootstrap-select-1.13.9/dist/js/bootstrap-select.min.js')}}"></script>
- <script src="{{asset('js/plugins/layDate-v5.2.1/laydate/laydate.js')}}"></script>
- <script src="{{asset('js/jquery-ui-1.10.4.min.js')}}"></script>
- <script>
- //同时绑定多个
- lay('.deadline').each(function () {
- laydate.render({
- elem: this
- , trigger: 'click'
- });
- });
- $(function () {
- $('.my-select').selectpicker({
- liveSearch: true
- });
- });
- $(document).on('click', '#cancel', function () {
- tips.closeParentLayer();
- });
- $(document).on('click', '#save', function () {
- var data = tips.getFormValues('#form');
- var id = $(this).data('id');
- var url = '/admin/plan/week-task/saveTask/' + id;
- 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');
- window.parent.location.reload();
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- </script>
- @endsection
|