plan.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <style>
  2. /* 弹层样式 */
  3. .need-pop{
  4. position: fixed;
  5. top: 0;
  6. left: 0;
  7. bottom: 0;
  8. right: 0;
  9. background: rgba(0, 0, 0, 0.5);
  10. }
  11. .need-pop-con{
  12. background: #fff;
  13. width: 510px;
  14. position: absolute;
  15. left: 50%;
  16. top: 50%;
  17. transform: translate(-50%,-50%);
  18. }
  19. .need-pop-top{
  20. line-height: 30px;
  21. font-size: 20px;
  22. font-weight: bold;
  23. padding: 6px 12px;
  24. }
  25. .npt-close{
  26. font-size: 30px;
  27. cursor: pointer;
  28. line-height: 28px;
  29. }
  30. .need-pop-list{
  31. margin: 10px 0;
  32. line-height: 30px;
  33. }
  34. .need-pop-menu{
  35. width: 110px;
  36. text-align: right;
  37. margin-right: 4px;
  38. }
  39. .need-pop-menu b{
  40. color: red;
  41. font-weight: bold;
  42. }
  43. .gray-bg{
  44. background: #F0F0F0;
  45. }
  46. .need-pop-detail{
  47. width: 370px;
  48. line-height: 26px;
  49. }
  50. .need-pop-detail input,.need-pop-detail textarea{
  51. border: 1px solid #ccc;
  52. width: 100%;
  53. }
  54. .need-pop-detail input{
  55. height: 26px;
  56. }
  57. .prev-class{
  58. position: relative;
  59. }
  60. .inp-text {
  61. position: relative;
  62. text-indent: 10px;
  63. width: 100%;
  64. height: 100%;
  65. line-height: 30px;
  66. border: 1px solid #D8D8D8;
  67. cursor: pointer;
  68. }
  69. .select-con {
  70. display: none;
  71. border: 1px solid #ccc;
  72. border-top: none;
  73. position: absolute;
  74. background: #fff;
  75. z-index: 10;
  76. width: 100%;
  77. text-indent: 10px;
  78. line-height: 28px;
  79. }
  80. .select-con li {
  81. list-style: none;
  82. }
  83. .select-con li:hover{background: #2977ff;color: #fff;cursor: pointer;}
  84. .inp-text:after {
  85. content: '';
  86. border-left: 5px solid transparent;
  87. border-right: 5px solid transparent;
  88. border-top: 5px solid #676767;
  89. position: absolute;
  90. right: 10px;
  91. bottom: 12px;
  92. }
  93. .list-half{
  94. width: 49%;
  95. }
  96. .list-half .need-pop-detail{
  97. width: 120px;
  98. }
  99. .need-pop-sub{
  100. display: block;
  101. margin: 20px auto 30px;
  102. color: #fff;
  103. background: #2977ff;
  104. padding: 2px 24px;
  105. border: none;
  106. border-radius: 4px;
  107. cursor: pointer;
  108. }
  109. .gray-font{
  110. color: rgb(153, 153, 153);
  111. }
  112. .need-warn-con{
  113. font-size: 12px;
  114. padding-left: 20px;
  115. }
  116. .add-file{
  117. cursor: pointer;
  118. font-size: 14px;
  119. }
  120. .vtm{
  121. vertical-align: middle;
  122. }
  123. /* 回复样式 */
  124. .title-detail{
  125. background: #EFF5FB;
  126. padding: 20px;
  127. margin: 20px 30px;
  128. color: #000;
  129. }
  130. .title-msg{
  131. font-weight: bold;
  132. margin-bottom: 10px;
  133. }
  134. .tar{
  135. text-align: right;
  136. }
  137. .flex{
  138. display: -webkit-flex;
  139. display: -moz-flex;
  140. display: -ms-flex;
  141. display: -o-flex;
  142. display: flex;
  143. }
  144. .flex-one{
  145. -webkit-flex: 1;
  146. -moz-flex: 1;
  147. -ms-flex: 1;
  148. -o-flex: 1;
  149. flex: 1;
  150. }
  151. .flex-two{
  152. -webkit-flex: 2;
  153. -moz-flex: 2;
  154. -ms-flex: 2;
  155. -o-flex: 2;
  156. flex: 2;
  157. }
  158. .flex-three{
  159. -webkit-flex: 3;
  160. -moz-flex: 3;
  161. -ms-flex: 3;
  162. -o-flex: 3;
  163. flex: 3;
  164. }
  165. .great-num{
  166. margin-left: 10px;
  167. }
  168. .need-list{
  169. border-bottom: 1px solid #ccc;
  170. padding: 4px;
  171. line-height: 22px;
  172. min-height: 44px;
  173. }
  174. .need-list:last-child{
  175. border: none;
  176. }
  177. .need-detail{
  178. margin: 0 30px 20px;
  179. }
  180. .need-list-menu{
  181. width: 110px;
  182. align-self: center;
  183. }
  184. .need-list-main{
  185. align-self: center;
  186. }
  187. .download-file{
  188. color: #2977ff;
  189. cursor: pointer;
  190. }
  191. .great-opt-con{
  192. width: 80px;
  193. text-align: right;
  194. cursor: pointer;
  195. }
  196. .title-msg-con{
  197. position: relative;
  198. padding-right: 16px;
  199. margin-left: 8px;
  200. }
  201. .title-msg-con:after{
  202. content: '';
  203. border-left: 4px solid transparent;
  204. border-right: 4px solid transparent;
  205. border-top: 6px solid #676767;
  206. position: absolute;
  207. right: 0px;
  208. top: 8px;
  209. }
  210. .need-list-top{
  211. margin-bottom: 10px;
  212. }
  213. .great-list-name{
  214. display: inline-block;
  215. overflow: hidden;
  216. width: 36px;
  217. height: 36px;
  218. background: #2977ff;
  219. color: #fff;
  220. border-radius: 50%;
  221. font-size: 12px;
  222. text-align: center;
  223. line-height: 36px;
  224. margin: 6px 6px 0 0;
  225. }
  226. .menu-icon{
  227. width: 18px;
  228. height: auto;
  229. }
  230. .message-name{
  231. font-size: 16px;
  232. font-weight: bold;
  233. margin-right: 20px;
  234. }
  235. .message-list{
  236. margin-bottom: 12px;
  237. }
  238. .message-inp{
  239. width: 100%;
  240. padding: 10px;
  241. }
  242. .reply-btn{
  243. color: #fff;
  244. background: #2977ff;
  245. padding: 2px 24px;
  246. border: none;
  247. border-radius: 4px;
  248. cursor: pointer;
  249. margin-top: 10px;
  250. }
  251. .great-hook.hide{
  252. display: none;
  253. }
  254. /* menu */
  255. .banner-menu{
  256. /*font-size: 0;*/
  257. }
  258. .banner-menu .menu-msg{
  259. display: inline-block;
  260. font-size: 14px;
  261. padding: 4px 22px;
  262. cursor: pointer;
  263. }
  264. .banner-menu .menu-msg.selected{
  265. border-bottom: 3px solid #2977ff;
  266. }
  267. /* 开发计划 */
  268. .layout-margin{
  269. margin: 10px 30px;
  270. }
  271. .time-sel select{
  272. width: 90px;
  273. margin-right: 20px;
  274. }
  275. .back-href{
  276. cursor: pointer;
  277. color: #2977ff;
  278. }
  279. .develop-plan-top{
  280. background: #EFF5FB;
  281. padding: 10px;
  282. line-height: 24px;
  283. }
  284. .develop-plan-status {
  285. }
  286. .dps-list{
  287. display: inline-block;
  288. margin: 0 6px;
  289. cursor: pointer;
  290. }
  291. .dps-list.selected{
  292. color: rgba(52, 167, 255, 0.988235294117647);
  293. }
  294. .end-date b.up{
  295. color: #2977ff;
  296. border-left: 5px solid transparent;
  297. border-right: 5px solid transparent;
  298. border-bottom: 5px solid #676767;
  299. position: relative;
  300. top: -16px;
  301. left: 5px;
  302. }
  303. .end-date b.up.selected{
  304. color: #2977ff;
  305. border-left: 5px solid transparent;
  306. border-right: 5px solid transparent;
  307. border-bottom: 5px solid #2977ff;
  308. }
  309. .end-date b.down{
  310. color: #2977ff;
  311. border-left: 5px solid transparent;
  312. border-right: 5px solid transparent;
  313. border-top: 5px solid #676767;
  314. position: relative;
  315. top: 16px;
  316. left: -5px;
  317. }
  318. .end-date b.down.selected{
  319. color: #2977ff;
  320. border-left: 5px solid transparent;
  321. border-right: 5px solid transparent;
  322. border-top: 5px solid #2977ff;
  323. }
  324. .propose-man{
  325. height: 24px;
  326. border-radius: 12px;
  327. border: 1px solid #ccc;
  328. text-align: center;
  329. width: 140px;
  330. margin-right: 20px;
  331. }
  332. .search-propose-man{
  333. background: #2977ff;
  334. color: #fff;
  335. width: 80px;
  336. height: 24px;
  337. text-align: center;
  338. border-radius: 4px;
  339. border: none;
  340. cursor: pointer;
  341. margin-right: 10px;
  342. }
  343. .tac{
  344. text-align: center;
  345. }
  346. .title-menu-msg{
  347. font-size: 16px;
  348. line-height: 30px;
  349. border-bottom: 1px solid #ccc;
  350. }
  351. .gray-bg{
  352. background: #F2F2F2;
  353. }
  354. .first-level-plan{
  355. position: relative;
  356. }
  357. .first-level-plan:before{
  358. content: '';
  359. border-left: 4px solid transparent;
  360. border-right: 4px solid transparent;
  361. border-top: 5px solid #676767;
  362. position: absolute;
  363. left: 10px;
  364. top: 50%;
  365. transform: translateY(-50%);
  366. }
  367. .plan-detail{
  368. padding: 10px 10px 10px 26px;
  369. align-self: center;
  370. cursor: pointer;
  371. }
  372. .plan-charact{
  373. display: inline-block;
  374. vertical-align: middle;
  375. }
  376. .plan-charact span{
  377. display: inline-block;
  378. }
  379. .need-source,.need-propose{
  380. margin-right: 12px;
  381. }
  382. .end-date-detail{
  383. border: 1px solid #ccc;
  384. padding: 0 14px;
  385. }
  386. .fw{
  387. font-weight: bold;
  388. }
  389. .plan-leader{
  390. align-self: center;
  391. width: 60px;
  392. margin-left: 20px;
  393. color: #36A8FF;
  394. }
  395. .leading-official{
  396. width: 60px;
  397. margin-left: 20px;
  398. }
  399. .finish-progress{
  400. width: 140px;
  401. border: 1px solid #ccc;
  402. background: #fff;
  403. }
  404. .progress-bar{
  405. color: #fff;
  406. background: #36A8FF;
  407. text-align: center;
  408. }
  409. .task-detail{
  410. /* display: none; */
  411. }
  412. .task-list{
  413. margin-left: 40px;
  414. padding: 10px 0;
  415. position: relative;
  416. line-height: 20px;
  417. }
  418. .task-list:before{
  419. content: '';
  420. width: 6px;
  421. height: 6px;
  422. background: #000;
  423. border-radius: 50%;
  424. position: absolute;
  425. left: -12px;
  426. top: 50%;
  427. transform: translateY(-50%);
  428. }
  429. .stage-detail span{
  430. display: inline-block;
  431. background: #E4E4E4;
  432. padding: 0 10px;
  433. border-radius: 10px;
  434. font-size: 12px;
  435. }
  436. .stage-msg.green1{
  437. color: #fff;
  438. background: #2977ff;
  439. }
  440. .stage-msg.orange1 {
  441. color: #fff;
  442. background: #FF9900;
  443. }
  444. </style>
  445. <div class="clearfix delelop-plan-time layout-margin">
  446. <div class="fl time-sel">
  447. <select name="" id="" class="year-sel">
  448. <?php
  449. $nowY=date('Y');
  450. for ($i=2017;$i<=$nowY;$i++){
  451. if(isset($Year) && $Year==$i){
  452. echo '<option value="'.$i.'" selected>'.$i.'年</option>';
  453. }else{
  454. echo '<option value="'.$i.'">'.$i.'年</option>';
  455. }
  456. }
  457. ?>
  458. </select>
  459. <select name="" id="" class="month-sel">
  460. <?php
  461. for ($i=1;$i<=12;$i++){
  462. if(isset($Month) && $Month==$i) {
  463. echo '<option value="' . $i . '" selected>' . $i . '月</option>';
  464. }else{
  465. echo '<option value="' . $i . '">' . $i . '月</option>';
  466. }
  467. }
  468. ?>
  469. </select>
  470. <select name="" id="" class="week-sel">
  471. </select>
  472. </div>
  473. <div class="fr back-href"><a href="<?php echo $this->createUrl('feedback/index')?>">返回需求列表</a></div>
  474. </div>
  475. <div class="clearfix develop-plan-top layout-margin">
  476. <ul class="fl develop-plan-status">
  477. <li class="dps-list <?php if(!isset($urlArr['stage']) || !$urlArr['stage']){ echo 'selected';}?>" rel="0">全部</li>
  478. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==6){ echo 'selected';}?>" rel="6">发布线上</li>
  479. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==4){ echo 'selected';}?>" rel="4">完成开发</li>
  480. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==2){ echo 'selected';}?>" rel="2">完成设计</li>
  481. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==5){ echo 'selected';}?>" rel="5">测试中</li>
  482. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==3){ echo 'selected';}?>" rel="3">开发中</li>
  483. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==1){ echo 'selected';}?>" rel="1">设计中</li>
  484. <li class="dps-list <?php if(isset($urlArr['stage']) && $urlArr['stage']==7){ echo 'selected';}?>" rel="7">暂停中</li>
  485. </ul>
  486. <div class="fr develop-plan-charact">
  487. <form action="" method="get" id="searchForm">
  488. <span class="end-date">截止日期<b class="up"></b><b class="down"></b></span>
  489. <input type="text" name="origin" class="propose-man" value="<?php if(isset($origin) && $origin){ echo $origin;}?>" placeholder="提出人">
  490. <input type="button" class="search-propose-man" value="搜索">
  491. <input type="hidden" name="stage" value="<?php if(isset($urlArr['stage']) && $urlArr['stage'] ){echo $urlArr['stage'];}?>">
  492. <input type="hidden" name="year" value="<?php if(isset($urlArr['year']) && $urlArr['year'] ){echo $urlArr['year'];}?>">
  493. <input type="hidden" name="month" value="<?php if(isset($urlArr['month']) && $urlArr['month'] ){echo $urlArr['month'];}?>">
  494. <input type="hidden" name="week" value="<?php if(isset($urlArr['week']) && $urlArr['week'] ){echo $urlArr['week'];}?>">
  495. <input type="hidden" name="sort" value="<?php if(isset($urlArr['sort']) && $urlArr['sort'] ){echo $urlArr['sort'];}?>">
  496. </form>
  497. </div>
  498. </div>
  499. <div class="flex title-menu-msg layout-margin">
  500. <div class="flex-one gray-font tac">需求及任务</div>
  501. <div class="leading-official gray-font">负责人</div>
  502. </div>
  503. <div class="layout-margin">
  504. <?php
  505. if(isset($data)){
  506. foreach ($data as $val){
  507. ?>
  508. <section class="develop-plan-main">
  509. <artile class="first-level-plan flex">
  510. <div class="flex-one flex plan-detail gray-bg">
  511. <div class="flex-one plan-name"><?php echo $val['title']?></div>
  512. <div class="plan-charact">
  513. <span class="need-source">需求来源:<?php echo $val['origin']?></span>
  514. <span class="need-propose">提出人:<?php echo $val['origin']?></span>
  515. <span class="end-date-detail fw">截止<?php echo $val['endTime']?></span>
  516. <span class="finish-progress">
  517. <span class="progress-bar" style="width: <?php echo $val['percent']?>%;"><?php echo $val['percent']?>%</span>
  518. </span>
  519. </div>
  520. </div>
  521. <div class="plan-leader"><?php echo $val['chargeMan']?></div>
  522. </artile>
  523. <?php
  524. if(isset($val['childs']) && $val['childs']){
  525. echo ' <ul class="task-detail">';
  526. foreach ($val['childs'] as $v){
  527. ?>
  528. <li class="task-list flex">
  529. <div class="flex-one flex">
  530. <div class="flex-one">任务一:<?php echo $v['taskName']?></div>
  531. <div class="stage-detail">
  532. <?php
  533. if(strpos($v['stageName'],'设计')!==false){
  534. ?>
  535. <span class="stage-msg vtm orange1">设计</span>
  536. <img src="/images/arrows.png" alt="" class="vtm">
  537. <span class="stage-msg vtm">开发</span>
  538. <img src="/images/arrows.png" alt="" class="vtm">
  539. <span class="stage-msg vtm">测试</span>
  540. <img src="/images/arrows.png" alt="" class="vtm">
  541. <span class="stage-msg vtm">发布</span>
  542. <?php
  543. }elseif(strpos($v['stageName'],'开发')!==false){
  544. ?>
  545. <span class="stage-msg vtm green1">设计</span>
  546. <img src="/images/arrows.png" alt="" class="vtm">
  547. <span class="stage-msg vtm orange1">开发</span>
  548. <img src="/images/arrows.png" alt="" class="vtm">
  549. <span class="stage-msg vtm">测试</span>
  550. <img src="/images/arrows.png" alt="" class="vtm">
  551. <span class="stage-msg vtm">发布</span>
  552. <?php
  553. }elseif(strpos($v['stageName'],'测试')!==false){
  554. ?>
  555. <span class="stage-msg vtm green1">设计</span>
  556. <img src="/images/arrows.png" alt="" class="vtm">
  557. <span class="stage-msg vtm green1">开发</span>
  558. <img src="/images/arrows.png" alt="" class="vtm">
  559. <span class="stage-msg vtm orange1">测试</span>
  560. <img src="/images/arrows.png" alt="" class="vtm">
  561. <span class="stage-msg vtm">发布</span>
  562. <?php
  563. }elseif(strpos($v['stageName'],'发布')!==false){
  564. ?>
  565. <span class="stage-msg vtm green1">设计</span>
  566. <img src="/images/arrows.png" alt="" class="vtm">
  567. <span class="stage-msg vtm green1">开发</span>
  568. <img src="/images/arrows.png" alt="" class="vtm">
  569. <span class="stage-msg vtm green1">测试</span>
  570. <img src="/images/arrows.png" alt="" class="vtm">
  571. <span class="stage-msg vtm orange1">发布</span>
  572. <?php
  573. }
  574. ?>
  575. </div>
  576. </div>
  577. <div class="plan-leader"><?php echo $v['userName']?></div>
  578. </li>
  579. <?php
  580. echo '</ul>';
  581. }
  582. }
  583. ?>
  584. </section>
  585. <?php
  586. }
  587. }
  588. ?>
  589. </div>
  590. <script>
  591. $(function(){
  592. $('.year-sel').change(function(){
  593. $('.month-sel').val(1);
  594. $('input[name=year]').val($(this).val());
  595. loadWeek($(this).val(),$('.month-sel').val());
  596. });
  597. $('.month-sel').change(function(){
  598. var year=$('.year-sel').val();
  599. var month=$(this).val();
  600. $('input[name=month]').val(month);
  601. loadWeek(year,month);
  602. });
  603. $('.week-sel').change(function(){
  604. $('input[name=week]').val($(this).val());
  605. $('input[name=year]').val($('.year-sel').val());
  606. $('input[name=month]').val($('.month-sel').val());
  607. $('#searchForm').submit();
  608. });
  609. $('.dps-list').click(function(){
  610. var t=$(this).attr('rel');
  611. $('input[name=stage]').val(t);
  612. $('#searchForm').submit();
  613. });
  614. $('.end-date').click(function(){
  615. var sort=$('input[name=sort]').val();
  616. if(sort==0 || sort==2){
  617. $('input[name=sort]').val(1);
  618. }else{
  619. $('input[name=sort]').val(2);
  620. }
  621. $('#searchForm').submit();
  622. });
  623. function loadWeek(year,month){
  624. $.ajax({
  625. url:'<?php echo $this->createUrl('feedback/getweek')?>',
  626. type:'POST',
  627. dataType:'json',
  628. data:{'year':year,'month':month},
  629. success:function(res){
  630. if(res.status==1){
  631. var html='';
  632. var week=parseInt(<?php echo $Week;?>);
  633. for(var i=0;i<res.week.length;i++){
  634. if(week==res.week[i]){
  635. html+='<option selected value="'+res.week[i]+'">第'+res.week[i]+'周</option>';
  636. }else{
  637. html+='<option value="'+res.week[i]+'">第'+res.week[i]+'周</option>';
  638. }
  639. }
  640. $('.week-sel').html(html);
  641. }
  642. }
  643. });
  644. }
  645. <?php
  646. echo 'loadWeek("'.$Year.'","'.$Month.'");';
  647. ?>
  648. });
  649. $('.search-propose-man').click(function(){
  650. //if($('input[name=origin]').val()!=''){
  651. $('#searchForm').submit();
  652. //}
  653. });
  654. </script>