add_task.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. @extends('admin/layout')
  2. @section('header')
  3. <link rel="stylesheet" href="{{asset('js/plugins/bootstrap-select-1.13.9/dist/css/bootstrap-select.min.css')}}">
  4. <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
  5. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  6. <link rel="stylesheet"
  7. href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
  8. @endsection
  9. @section('content')
  10. <body class="gray-bg">
  11. <div class="wrapper wrapper-content animated fadeInRight">
  12. <div class="row">
  13. <div class="col-sm-12">
  14. <div class="ibox float-e-margins">
  15. <div class="ibox-content">
  16. <form method="get" class="form-horizontal" id="form">
  17. <input type="hidden" value="{{$role}}" name="role">
  18. <input type="hidden" value="{{$type}}" name="type">
  19. <div class="form-group">
  20. <label class="col-sm-2 control-label" for="cond_id"><span
  21. class="red">* </span>任务类型:</label>
  22. <div class="col-sm-8">
  23. <select class="my-select" name="cond_id" id="cond_id">
  24. @foreach($condList as $key=> $item)
  25. <option value="{{$key}}"
  26. @if(isset($weekTaskInfo->cond_id) && $key==$weekTaskInfo->cond_id??'') selected @endif>{{$item}}</option>
  27. @endforeach
  28. </select>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label class="col-sm-2 control-label" for="describe"><span class="red"></span>
  33. 任务描述:</label>
  34. <div class="col-sm-6">
  35. <textarea type="text" class="form-control" style="width: 200px"
  36. name="describe">{{$weekTaskInfo->describe??''}}</textarea>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="col-sm-2 control-label" for="user_type"><span
  41. class="red"> </span>任务认领人:</label>
  42. <div class="col-sm-8">
  43. <select class="my-select" name="user_type" id="user_type">
  44. @if($role=='wfp-web')
  45. @foreach($web as $key=> $item)
  46. <option value="{{$key}}"
  47. @if(isset($user_id) &&$key==$user_id) selected @endif>{{$item}}
  48. </option>
  49. @endforeach
  50. @endif
  51. @if($role=='wfp-design')
  52. @foreach($design as $key=> $item)
  53. <option value="{{$key}}"
  54. @if(isset($user_id) && $key==$user_id??'') selected @endif>{{$item}}
  55. </option>
  56. @endforeach
  57. @endif
  58. @if($role=='wfp-exam')
  59. @foreach($exam as $key=> $item)
  60. <option value="{{$key}}"
  61. @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
  62. </option>
  63. @endforeach
  64. @endif
  65. @if($role=='wfp-site-exam')
  66. @foreach($siteExam as $key=> $item)
  67. <option value="{{$key}}"
  68. @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
  69. </option>
  70. @endforeach
  71. @endif
  72. @if($role=='wfp-site')
  73. @foreach($site as $key=> $item)
  74. <option value="{{$key}}"
  75. @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
  76. </option>
  77. @endforeach
  78. @endif
  79. @if($role=='wfp-seo')
  80. @foreach($seo as $key=> $item)
  81. <option value="{{$key}}"
  82. @if(isset($user_id) && $key==$user_id) selected @endif>{{$item}}
  83. </option>
  84. @endforeach
  85. @endif
  86. </select>
  87. </div>
  88. </div>
  89. <div class="form-group">
  90. <label class="col-sm-2 control-label" for="day"><span
  91. class="red">* </span>任务日期:</label>
  92. <div class="col-sm-8">
  93. <select class="my-select" name="day" id="day">
  94. <option value="1" @if($day==1) selected @endif>周一</option>
  95. <option value="2" @if($day==2) selected @endif>周二</option>
  96. <option value="3" @if($day==3) selected @endif>周三</option>
  97. <option value="4" @if($day==4) selected @endif>周四</option>
  98. <option value="5" @if($day==5) selected @endif>周五</option>
  99. <option value="6" @if($day==6) selected @endif>周六</option>
  100. <option value="0" @if($day==0) selected @endif>周日</option>
  101. </select>
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <label class="col-sm-2 control-label" for="duty_id"><span
  106. class="red">* </span>项目负责人:</label>
  107. <div class="col-sm-8">
  108. <select class="my-select" name="duty_id" id="duty_id">
  109. @foreach($allUserList as $key=> $item)
  110. <option value="{{$key}}"
  111. @if(isset($weekTaskInfo->duty_id) && $key==$weekTaskInfo->duty_id) selected @endif>{{$item}}</option>
  112. @endforeach
  113. </select>
  114. </div>
  115. </div>
  116. <div class="form-group">
  117. <label class="col-sm-2 control-label" for="design_id"><span
  118. class="red"> </span>设计:</label>
  119. <div class="col-sm-8">
  120. <select class="my-select" name="design_id" id="design_id">
  121. @foreach($design as $key=> $item)
  122. <option value="{{$key}}"
  123. @if(isset($weekTaskInfo->design_id) && $key==$weekTaskInfo->design_id) selected @endif>{{$item}}</option>
  124. @endforeach
  125. </select>
  126. </div>
  127. </div>
  128. <div class="form-group">
  129. <label class="col-sm-2 control-label" for="web_id"><span
  130. class="red"></span>前端:</label>
  131. <div class="col-sm-8">
  132. <select class="my-select" name="web_id" id="web_id">
  133. @foreach($web as $key=> $item)
  134. <option value="{{$key}}"
  135. @if(isset($weekTaskInfo->web_id) && $key==$weekTaskInfo->web_id) selected @endif>{{$item}}</option>
  136. @endforeach
  137. </select>
  138. </div>
  139. </div>
  140. <div class="form-group">
  141. <label class="col-sm-2 control-label" for="check_score"><span
  142. class="red"> </span>检查反馈:</label>
  143. <div class="col-sm-8">
  144. <select class="my-select" name="check_score" id="check_score">
  145. <option value="0"
  146. @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==0) selected @endif>
  147. 请评价
  148. </option>
  149. <option value="1"
  150. @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==1) selected @endif>
  151. 非常满意
  152. </option>
  153. <option value="2"
  154. @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==2) selected @endif>
  155. 满意
  156. </option>
  157. <option value="3"
  158. @if(isset($weekTaskInfo->check_score) && $weekTaskInfo->check_score==3) selected @endif>
  159. 一般
  160. </option>
  161. </select>
  162. </div>
  163. </div>
  164. <div class="form-group">
  165. <label class="col-sm-2 control-label" for="username_new"><span class="red">* </span>
  166. 备注:</label>
  167. <div class="col-sm-6">
  168. <textarea type="text" style="width: 200px" class="form-control"
  169. name="remark">{{$weekTaskInfo->remark??''}}</textarea>
  170. </div>
  171. </div>
  172. <div class="form-group">
  173. <label class="col-sm-2 control-label" for="deadline"><span class="red">* </span>
  174. 最后期限:</label>
  175. <div class="col-sm-6">
  176. <input type="text" style="width: 200px" class="form-control my-date deadline"
  177. name="deadline" id="deadline"
  178. value="{{$weekTaskInfo->deadline??''}}"
  179. @if(!empty($weekTaskInfo->id) && $role_id==14 || $role_id==27) disabled="disabled" @endif >
  180. </div>
  181. </div>
  182. <div class="form-group">
  183. <div class="col-sm-4 col-sm-offset-2">
  184. <button class="btn btn-primary" type="button" data-id="{{$weekTaskInfo->id??0}}"
  185. id="save">
  186. 保存
  187. </button>
  188. <button class="btn btn-white" type="button" id="cancel">取消</button>
  189. </div>
  190. </div>
  191. </form>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </body>
  198. @endsection
  199. @section('footer')
  200. <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
  201. <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
  202. <script src="{{asset('js/plugins/bootstrap-select-1.13.9/dist/js/bootstrap-select.min.js')}}"></script>
  203. <script src="{{asset('js/plugins/layDate-v5.2.1/laydate/laydate.js')}}"></script>
  204. <script src="{{asset('js/jquery-ui-1.10.4.min.js')}}"></script>
  205. <script>
  206. //同时绑定多个
  207. lay('.deadline').each(function () {
  208. laydate.render({
  209. elem: this
  210. , trigger: 'click'
  211. });
  212. });
  213. $(function () {
  214. $('.my-select').selectpicker({
  215. liveSearch: true
  216. });
  217. });
  218. $(document).on('click', '#cancel', function () {
  219. tips.closeParentLayer();
  220. });
  221. $(document).on('click', '#save', function () {
  222. var data = tips.getFormValues('#form');
  223. var id = $(this).data('id');
  224. var url = '/admin/plan/week-task/saveTask/' + id;
  225. var type = 'post';
  226. var ajaxConfig = {
  227. url: url,
  228. type: type,
  229. data: data,
  230. success: function (result) {
  231. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  232. tips.closeParentLayer();
  233. //window.parent.tips.tableRefresh('#table');
  234. window.parent.location.reload();
  235. });
  236. }
  237. };
  238. tips.ajax(ajaxConfig);
  239. });
  240. </script>
  241. @endsection