likeku 8 anni fa
parent
commit
60c47a6f9d

+ 184 - 184
global/css/global.css

@@ -104,7 +104,7 @@ a.disenable{color:#ccc}
 .fL {float:left}
 .fR {float:right}
 :link, *:visited, *:hover, *:active, *:focus {
-    -moz-transition: color 0.2s linear 0s, background-color 0.2s linear 0s, border-color 0.2s linear 0s;
+  -moz-transition: color 0.2s linear 0s, background-color 0.2s linear 0s, border-color 0.2s linear 0s;
   -webkit-transition: color 0.2s linear 0s, background-color 0.2s linear 0s, border-color 0.2s linear 0s;
   transition: color 0.2s linear 0s, background-color 0.2s linear 0s, border-color 0.2s linear 0s;
   -o-transition: color 0.2s linear 0s, background-color 0.2s linear 0s, border-color 0.2s linear 0s;
@@ -127,9 +127,9 @@ a.disenable{color:#ccc}
   font-family: 'ZHcldSystem';
   src:url('fonts/ZHcldSystem.eot');
   src:url('fonts/ZHcldSystem.eot?#iefix') format('embedded-opentype'),
-    url('fonts/ZHcldSystem.ttf') format('truetype'),
-    url('fonts/ZHcldSystem.woff') format('woff'),
-    url('fonts/ZHcldSystem.svg#ZHcldSystem') format('svg');
+  url('fonts/ZHcldSystem.ttf') format('truetype'),
+  url('fonts/ZHcldSystem.woff') format('woff'),
+  url('fonts/ZHcldSystem.svg#ZHcldSystem') format('svg');
   font-weight: normal;
   font-style: normal;
 }
@@ -663,8 +663,8 @@ button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-
 }
 .alert-success {
   color: #468847;
-background-color: #dff0d8;
-border-color: #d6e9c6;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
 }
 .alert-info {
   color: #3a87ad;
@@ -686,96 +686,96 @@ border-color: #d6e9c6;
   margin:0;
 }
 .infoFlowList{
-    border-left: 1px solid #BEBEBE;
-    margin-left: 25px;
-    padding-bottom: 33px;
-    padding-left:27px;
-    position: relative;
-    margin-right:5px
+  border-left: 1px solid #BEBEBE;
+  margin-left: 25px;
+  padding-bottom: 33px;
+  padding-left:27px;
+  position: relative;
+  margin-right:5px
 }
 .dateTitle {
-    left: -21px;
-    overflow: visible;
-    position: absolute;
-    top: 0;
-    width: 42px;
+  left: -21px;
+  overflow: visible;
+  position: absolute;
+  top: 0;
+  width: 42px;
 }
 
 .dateTitle .month {
-    background-color: #999;
-    color: #FFFFFF;
-    float: left;
-    height: 28px;
-    line-height: 1;
-    padding-top: 8px;
-    text-align: center;
-    width: 42px;
-    overflow: hidden;
+  background-color: #999;
+  color: #FFFFFF;
+  float: left;
+  height: 28px;
+  line-height: 1;
+  padding-top: 8px;
+  text-align: center;
+  width: 42px;
+  overflow: hidden;
 }
 .dateTitle .month .num {
-    font-family:"Tahoma";
-    font-size: 18px;
-    font-weight: normal;
-    letter-spacing:-1px;
+  font-family:"Tahoma";
+  font-size: 18px;
+  font-weight: normal;
+  letter-spacing:-1px;
 }
 .dateTitle .month .text {
-    padding-left: 2px;
-    font-family:"Tahoma";
-    font-size:14px
+  padding-left: 2px;
+  font-family:"Tahoma";
+  font-size:14px
 }
 .dateTitle .year {
-    -moz-border-bottom-colors: none;
-    -moz-border-left-colors: none;
-    -moz-border-right-colors: none;
-    -moz-border-top-colors: none;
-    background-color: #FFFFFF;
-    background-image: none;
-    border-color: -moz-use-text-color #BEBEBE #BEBEBE;
-    border-image: none;
-    border-style: none solid solid;
-    border-width: 0 1px 1px;
-    float: left;
-    height: 18px;
-    line-height: 16px;
-    overflow: visible;
-    padding: 0;
-    position: relative;
-    text-align: center;
-    width:40px
+  -moz-border-bottom-colors: none;
+  -moz-border-left-colors: none;
+  -moz-border-right-colors: none;
+  -moz-border-top-colors: none;
+  background-color: #FFFFFF;
+  background-image: none;
+  border-color: -moz-use-text-color #BEBEBE #BEBEBE;
+  border-image: none;
+  border-style: none solid solid;
+  border-width: 0 1px 1px;
+  float: left;
+  height: 18px;
+  line-height: 16px;
+  overflow: visible;
+  padding: 0;
+  position: relative;
+  text-align: center;
+  width:40px
 }
 .dateTitle .year:before,.dateTitle .year:after {
-    border-bottom-colors: none;
-    border-left-colors: none;
-    -moz-border-right-colors: none;
-    -moz-border-top-colors: none;
-    border-color: #222 transparent transparent;
-    border-image: none;
-    border-right: 4px solid transparent;
-    border-style: solid;
-    border-width: 4px;
-    bottom: -8px;
-    content: "";
-    display: block;
-    height: 0;
-    left: 15px;
-    position: absolute;
-    width: 0;
+  border-bottom-colors: none;
+  border-left-colors: none;
+  -moz-border-right-colors: none;
+  -moz-border-top-colors: none;
+  border-color: #222 transparent transparent;
+  border-image: none;
+  border-right: 4px solid transparent;
+  border-style: solid;
+  border-width: 4px;
+  bottom: -8px;
+  content: "";
+  display: block;
+  height: 0;
+  left: 15px;
+  position: absolute;
+  width: 0;
 }
 .dateTitle .year:after {
-    border-top: 4px solid #FFFFFF;
-    bottom: -7px;
-    z-index: 2;
+  border-top: 4px solid #FFFFFF;
+  bottom: -7px;
+  z-index: 2;
 }
 
 .infoFlowList .flowList {
-    background-color:#fff;
-    float: none;
-    padding: 0
+  background-color:#fff;
+  float: none;
+  padding: 0
 }
 .flowList li.item {
-    overflow: hidden;
-    padding: 8px 30px 8px 35px;
-    border-bottom:1px solid #EBEBEB
+  overflow: hidden;
+  padding: 8px 30px 8px 35px;
+  border-bottom:1px solid #EBEBEB
 }
 .flowList li.item:last-child{
   border-bottom:none
@@ -787,19 +787,19 @@ border-color: #d6e9c6;
   overflow: hidden;
 }
 .mainMenu{
-    background:#191818 url(slidebg.png) repeat;
-    bottom: 0;
-    left:50px;
-    margin-left: -50px;
-    position: fixed;
-    top: 0;
-    width:50px;
-    z-index: 1000;
-    display: inline-block;
-    letter-spacing: normal;
-    text-rendering: auto;
-    vertical-align: top;
-    word-spacing: normal
+  background:#191818 url(slidebg.png) repeat;
+  bottom: 0;
+  left:50px;
+  margin-left: -50px;
+  position: fixed;
+  top: 0;
+  width:50px;
+  z-index: 1000;
+  display: inline-block;
+  letter-spacing: normal;
+  text-rendering: auto;
+  vertical-align: top;
+  word-spacing: normal
 }
 .mainMenu .menuItem{
   display:block
@@ -884,21 +884,21 @@ border-color: #d6e9c6;
   width:100%;
 }
 .header {
-    color: #333333;
-    padding:6px 0 6px 12px;
-    background-color:#fff;
-    margin:5px 5px 0 5px;
+  color: #333333;
+  padding:6px 0 6px 12px;
+  background-color:#fff;
+  margin:5px 5px 0 5px;
 }
 .header h1 {
-    font-size: 36px;
-    font-weight: 300;
-    margin:5px 0
+  font-size: 36px;
+  font-weight: 300;
+  margin:5px 0
 }
 .header h1.companyName{
   font-size:18px
 }
 .header h2 {
-    margin: 0
+  margin: 0
 }
 .header h2.cate a{
   padding:0 5px;
@@ -1441,9 +1441,9 @@ border-color: #d6e9c6;
   margin:6px 5px
 }
 .contactPanel h1{
-    font-size: 36px;
-    font-weight: 300;
-    font-size:18px
+  font-size: 36px;
+  font-weight: 300;
+  font-size:18px
 }
 .contactPanel h1 a.clientName{
   font-size:18px;
@@ -1642,15 +1642,15 @@ a.new-ribbon:before{
   margin:0 1px 0 0;
 }
 .contactList .contactsTag:hover{
--webkit-animation:pulse .2s .1s ease both;
--moz-animation:pulse .2s .1s ease both;}
+  -webkit-animation:pulse .2s .1s ease both;
+  -moz-animation:pulse .2s .1s ease both;}
 @-webkit-keyframes pulse{
-0%{-webkit-transform:scale(1)}
-100%{-webkit-transform:scale(1.5)}
+  0%{-webkit-transform:scale(1)}
+  100%{-webkit-transform:scale(1.5)}
 }
 @-moz-keyframes pulse{
-0%{-moz-transform:scale(1)}
-100%{-moz-transform:scale(1.5)}
+  0%{-moz-transform:scale(1)}
+  100%{-moz-transform:scale(1.5)}
 }
 .contactTable {
   width:100%;
@@ -1665,22 +1665,22 @@ a.new-ribbon:before{
   background:#f7f7f7;
 }
 .contactTable td{
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-    font-size: 12px;
-    font-weight: 400;
-    line-height: 16px;
-    padding:10px 5px;
-    position: relative;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  font-size: 12px;
+  font-weight: 400;
+  line-height: 16px;
+  padding:10px 5px;
+  position: relative;
 }
 .contactTable td span.lim,.contactCate .contactTableHead td span.lim{
   display:block;
-    height: 18px;
-    line-height: 18px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    width:inherit
+  height: 18px;
+  line-height: 18px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width:inherit
 }
 .contactTable b.name {
   font-size:16px
@@ -1720,15 +1720,15 @@ a.new-ribbon:before{
   color:#f90000;
 }
 .contactTable i.contactsMark:hover{
--webkit-animation:pulse .2s .1s ease both;
--moz-animation:pulse .2s .1s ease both;}
+  -webkit-animation:pulse .2s .1s ease both;
+  -moz-animation:pulse .2s .1s ease both;}
 @-webkit-keyframes pulse{
-0%{-webkit-transform:scale(1)}
-100%{-webkit-transform:scale(1.5)}
+  0%{-webkit-transform:scale(1)}
+  100%{-webkit-transform:scale(1.5)}
 }
 @-moz-keyframes pulse{
-0%{-moz-transform:scale(1)}
-100%{-moz-transform:scale(1.5)}
+  0%{-moz-transform:scale(1)}
+  100%{-moz-transform:scale(1.5)}
 }
 .changePage{
   line-height: 30px;
@@ -1852,14 +1852,14 @@ a.new-ribbon:before{
   border-top:1px solid #222222
 }
 .subMenu li.news:after {
-    background: none repeat scroll 0 0 #f90000;
-    border-radius: 10px 0 10px 10px;
-    content: "";
-    height: 10px;
-    position: absolute;
-    right: 10px;
-    top: 10px;
-    width: 10px;
+  background: none repeat scroll 0 0 #f90000;
+  border-radius: 10px 0 10px 10px;
+  content: "";
+  height: 10px;
+  position: absolute;
+  right: 10px;
+  top: 10px;
+  width: 10px;
 }
 .adminContent{
   margin:0 0 0 160px;
@@ -2140,11 +2140,11 @@ table .taC{
   color:#373737
 }
 .seCensor .btnList {
-    bottom: 0;
-    position: absolute;
-    right: 0;
-    width:100%;
-    height: 39px
+  bottom: 0;
+  position: absolute;
+  right: 0;
+  width:100%;
+  height: 39px
 }
 .seCensor .btnList a{
   margin:0;
@@ -2340,7 +2340,7 @@ table .taC{
   margin:0;
 }
 .staffList{
- overflow-y: auto;
+  overflow-y: auto;
 }
 .staffItem {
   float:left;
@@ -2507,7 +2507,7 @@ table .taC{
   transition: all 1.5s ease-in-out;
 }
 .down .qrcode:hover .saoma{
- left:240px;
+  left:240px;
   opacity: 1;
 }
 .appDown .downButton{
@@ -2531,23 +2531,23 @@ table .taC{
 }
 /**/
 .inputErrow{
--webkit-animation:shake 1s .2s ease both;
--moz-animation:shake 1s .2s ease both;
-animation:shake 1s .2s ease both;}
+  -webkit-animation:shake 1s .2s ease both;
+  -moz-animation:shake 1s .2s ease both;
+  animation:shake 1s .2s ease both;}
 @-webkit-keyframes shake{
-0%,100%{-webkit-transform:translateX(0);}
-10%,30%,50%,70%, 90%{-webkit-transform:translateX(-10px);}
-20%,40%,60%,80%{-webkit-transform:translateX(10px);}
+  0%,100%{-webkit-transform:translateX(0);}
+  10%,30%,50%,70%, 90%{-webkit-transform:translateX(-10px);}
+  20%,40%,60%,80%{-webkit-transform:translateX(10px);}
 }
 @-moz-keyframes shake{
-0%,100%{-moz-transform:translateX(0);}
-10%,30%,50%,70%, 90%{-moz-transform:translateX(-10px);}
-20%,40%,60%,80%{-moz-transform:translateX(10px);}
+  0%,100%{-moz-transform:translateX(0);}
+  10%,30%,50%,70%, 90%{-moz-transform:translateX(-10px);}
+  20%,40%,60%,80%{-moz-transform:translateX(10px);}
 }
 @keyframes shake{
-0%,100%{transform:translateX(0);}
-10%,30%,50%,70%, 90%{transform:translateX(-10px);}
-20%,40%,60%,80%{transform:translateX(10px);}
+  0%,100%{transform:translateX(0);}
+  10%,30%,50%,70%, 90%{transform:translateX(-10px);}
+  20%,40%,60%,80%{transform:translateX(10px);}
 }
 .indexSportList li {
   display:inline-block;
@@ -2669,23 +2669,23 @@ animation:shake 1s .2s ease both;}
   color:#f90000;
 }
 .remind .animation{
--webkit-animation:swing 2s .3s infinite ease both;
--moz-animation:swing 2s .3s infinite ease both;}
+  -webkit-animation:swing 2s .3s infinite ease both;
+  -moz-animation:swing 2s .3s infinite ease both;}
 @-webkit-keyframes swing{
-20%,40%,60%,80%,100%{-webkit-transform-origin:top center}
-20%{-webkit-transform:rotate(15deg)}
-40%{-webkit-transform:rotate(-10deg)}
-60%{-webkit-transform:rotate(5deg)}
-80%{-webkit-transform:rotate(-5deg)}
-100%{-webkit-transform:rotate(0deg)}
+  20%,40%,60%,80%,100%{-webkit-transform-origin:top center}
+  20%{-webkit-transform:rotate(15deg)}
+  40%{-webkit-transform:rotate(-10deg)}
+  60%{-webkit-transform:rotate(5deg)}
+  80%{-webkit-transform:rotate(-5deg)}
+  100%{-webkit-transform:rotate(0deg)}
 }
 @-moz-keyframes swing{
-20%,40%,60%,80%,100%{-moz-transform-origin:top center}
-20%{-moz-transform:rotate(15deg)}
-40%{-moz-transform:rotate(-10deg)}
-60%{-moz-transform:rotate(5deg)}
-80%{-moz-transform:rotate(-5deg)}
-100%{-moz-transform:rotate(0deg)}
+  20%,40%,60%,80%,100%{-moz-transform-origin:top center}
+  20%{-moz-transform:rotate(15deg)}
+  40%{-moz-transform:rotate(-10deg)}
+  60%{-moz-transform:rotate(5deg)}
+  80%{-moz-transform:rotate(-5deg)}
+  100%{-moz-transform:rotate(0deg)}
 }
 .datetimepicker .glyphicon-arrow-left:before{
   content: "<"
@@ -2717,7 +2717,7 @@ animation:shake 1s .2s ease both;}
   margin: 0
 }
 .groupContent > form {
-    margin: 0px;
+  margin: 0px;
 }
 .groupCate legend{
   margin:0;
@@ -2846,10 +2846,10 @@ animation:shake 1s .2s ease both;}
   z-index: 999
 }
 .demanHeader {
- margin:20px 0;
- background-color: #62AC4D ;
- height: 215px;
- overflow: hidden;
+  margin:20px 0;
+  background-color: #62AC4D ;
+  height: 215px;
+  overflow: hidden;
 
 }
 .demanHeader h1{
@@ -2979,12 +2979,12 @@ animation:shake 1s .2s ease both;}
   color:#fff;
 }
 .demandTab .dTab {
-    background-color:#91d27f;
-    margin: 0px 5px 2px 0px;
-    padding: 0px 3px;
-    color: #666;
-    display: inline-block;
-    color: #fff
+  background-color:#91d27f;
+  margin: 0px 5px 2px 0px;
+  padding: 0px 3px;
+  color: #666;
+  display: inline-block;
+  color: #fff
 }
 .demandTab .dTab:hover{
   background-color: #62AC4D
@@ -3470,10 +3470,10 @@ legend .search{
   border-right: 1px solid #DDD
 }
 .sideSnav .snavLeve0 .num{
-color: #FFF;
-background: #999 none repeat scroll 0% 0%;
-border-radius: 3px;
-padding: 0px 5px;
+  color: #FFF;
+  background: #999 none repeat scroll 0% 0%;
+  border-radius: 3px;
+  padding: 0px 5px;
 }
 .sideMnav .navLeve1,.sideMnav .navLeve2{
   opacity: 0;
@@ -3493,7 +3493,7 @@ padding: 0px 5px;
 }
 .searchItem {
   position: relative;
-  }
+}
 .searchItem .searchFrame{
   margin-right: 473px
 }
@@ -3624,8 +3624,8 @@ padding: 0px 5px;
   border:1px solid transparent;
   border-radius: 4px 4px 0px 0px;
   margin-right: 2px;
-      position: relative;
-    display: block;
+  position: relative;
+  display: block;
 }
 .navTabs > li.active > a, .navTabs > li.active > a:focus, .navTabs > li.active > a:hover {
   color: #555;

+ 1 - 0
protected/config/routes.conf.php

@@ -376,6 +376,7 @@ $route['*']['/delhcsgroup'] = array('AdminController', 'delHolidayCS');
 $route['*']['/holidayadmin'] = array('AdminController', 'HolidayAdmin');
 $route['*']['/addholidayadmin'] = array('AdminController', 'addHolidayAdmin');
 $route['*']['/delholidayadmin'] = array('AdminController', 'delHolidayAdmin');
+$route['*']['/setholidaysee'] = array('AdminController', 'setHolidaySee');
 
 $route['*']['/holidayborad'] = array('HolidayController', 'holidayBorad');
 $route['*']['/holidayallList'] = array('HolidayController', 'allList');

+ 38 - 3
protected/controller/AdminController.php

@@ -420,6 +420,11 @@ class AdminController extends DooController {
 			$staff = new staff ();
 			$staff->sid = $sid;
 			$staff->delete ();
+
+			Doo::loadModel ('holidaystaff');
+			$hstaff = new HStaff();
+			$hstaff->uid = $sid;
+			$hstaff->delete();
 		}
 		return "/adminuser";
 	}
@@ -1351,6 +1356,8 @@ class AdminController extends DooController {
 	public function holidayGroup(){
 		Doo::loadModel('staff');
 		Doo::loadModel("holidayacman");
+		Doo::loadModel('L_category');
+		$L_category = new L_category();
 		$acman=new HACMan();
 		$staff=new staff();
 
@@ -1359,8 +1366,21 @@ class AdminController extends DooController {
 		if(!empty($acmanlist)){
 			foreach($acmanlist as $k => $v){
 				$acmanlist[$k]['name'] = implode('->', explode(' ', $v['name']));
+				$category = explode(',',$v['category']);
+				$categoryname = array();
+				if(!empty($category)){
+					foreach($category as $key => $value){
+						$name = $L_category->getOne(array('where' => 'cid="'.$value.'"', 'asArray' => TRUE));
+						array_push($categoryname,$name['title']);
+					}
+				}
+				$acmanlist[$k]['categoryname'] = implode(',',$categoryname);
 			}
 		}
+
+		//获取办事处列表
+
+		$data['category']=$L_category->getCategory();
 		$data['acmanlist'] = $acmanlist;
 		$data['staff']=$this->staff;
 		$data['memu'] = 'holiday';
@@ -1407,6 +1427,20 @@ class AdminController extends DooController {
 		return '/holidaygroup';
 	}
 
+	public function setHolidaySee(){
+		if(!isset($_POST['groupid']) || empty($_POST['groupid']) || !is_numeric($_POST['groupid'])){
+			exit('审批组id出错');
+		}
+		$category = !empty($_POST['category']) ? implode(',', $_POST['category']) : '';
+		Doo::loadModel('holidayacman');
+		$acman = new HACMan();
+		$acman->id = $_POST['groupid'];
+		$acman->category = $category;
+		$acman->update();
+
+		return '/holidaygroup';
+	}
+
 	public function delHolidayGroup(){
 		if(!isset($_POST['approvalid']) || empty($_POST['approvalid']) || !is_numeric($_POST['approvalid'])){
 			exit('审批组id出错');
@@ -1648,10 +1682,11 @@ class AdminController extends DooController {
 		$hstaff = new HStaff();
 		$hstaffmsg = $hstaff->getOne(array('where' => 'uid='.$staff['sid'],'asArray' => TRUE));
 		$hiredate = $staff['hiredate'];
-		if(intval((time()-strtotime($hiredate))/(86400*365)) != $hstaffmsg['hadyear'] && $staff['nature'] == 1 ){
+		$hadyear = intval((time()-strtotime($hiredate))/(86400*365));
+		if($hadyear != $hstaffmsg['hadyear']){
 			$hstaff->uid = $staff['sid'];
-			$hstaff->hadyear = intval((time()-strtotime($hiredate))/(86400*365));
-			$hstaff->yearnum = intval((time()-strtotime($hiredate))/(86400*365)) != 0 ? 5 : 0;
+			$hstaff->hadyear = $hadyear;
+			$hstaff->yearnum = $hadyear == 0 ? 0 : (($hadyear < 10 && $hadyear >= 1) ? 5 : (($hadyear >= 10 && $hadyear < 20) ? 10 : 15));
 			$hstaff->update();
 		}
 	}

+ 3 - 3
protected/controller/HolidayController.php

@@ -703,7 +703,7 @@ class HolidayController extends DooController {
 						$cidstafflist[$ck]['chanjianum'] = $hstaffmsg['chanjianum'] != 0.0 ? floatval($hstaffmsg['chanjianum']) : '';
 						$cidstafflist[$ck]['sangjianum'] = $hstaffmsg['sangjianum'] != 0.0 ? floatval($hstaffmsg['sangjianum']) : '';
 						$cidstafflist[$ck]['gongjianum'] = $hstaffmsg['gongjianum'] != 0.0 ? floatval($hstaffmsg['gongjianum']) : '';
-						$cidstafflist[$ck]['yearround'] = $this->getYearRoundtime($hstaffmsg['hadyear'],$cv['hiredate']);
+						$cidstafflist[$ck]['yearround'] = $cv['nature'] == 1 ? $this->getYearRoundtime($hstaffmsg['hadyear'],$cv['hiredate']) : '';
 						$cidstafflist[$ck]['first'] = $ck == 0 ? 1 : ''; // 是否第一个
 					}
 					$stafflist[0]['cidstafflist'] = $cidstafflist;
@@ -723,7 +723,7 @@ class HolidayController extends DooController {
 					$cidstafflist[$ck]['chanjianum'] = $hstaffmsg['chanjianum'] != 0.0 ? floatval($hstaffmsg['chanjianum']) : '';
 					$cidstafflist[$ck]['sangjianum'] = $hstaffmsg['sangjianum'] != 0.0 ? floatval($hstaffmsg['sangjianum']) : '';
 					$cidstafflist[$ck]['gongjianum'] = $hstaffmsg['gongjianum'] != 0.0 ? floatval($hstaffmsg['gongjianum']) : '';
-					$cidstafflist[$ck]['yearround'] = $this->getYearRoundtime($hstaffmsg['hadyear'],$cv['hiredate']);
+					$cidstafflist[$ck]['yearround'] = $cv['nature'] == 1 ? $this->getYearRoundtime($hstaffmsg['hadyear'],$cv['hiredate']) : '';
 					$cidstafflist[$ck]['first'] = $ck == 0 ? 1 : ''; // 是否第一个
 				}
 				$stafflist[$k]['cidstafflist'] = $cidstafflist;
@@ -858,7 +858,7 @@ class HolidayController extends DooController {
 		$date = date('d', strtotime($hiredate));
 		$monthday = intval($month).'月'.intval($date).'日';
 		$year = date('Y',time());
-		if(strtotime($hiredate)+(86400*365*$hadyear) < time()){
+		if(date('Y',(strtotime($hiredate)+(86400*365*$hadyear))) < $year){
 			$lastyear = intval($year)-1;
 			return intval($lastyear).'年'.$monthday.'~'.intval($year).'年'.$monthday;
 		}else{

+ 2 - 1
protected/model/holidayacman.php

@@ -10,10 +10,11 @@ class HACMan extends DooModel {
 	public $name;
 	public $pinyinname;
 	public $type;
+	public $category;
 
 	public $_table = 'holiday_acman';
 	public $_primarykey = 'id';
-	public $_fields = array ('id', 'typename', 'idname', 'name', 'pinyinname', 'type' );
+	public $_fields = array ('id', 'typename', 'idname', 'name', 'pinyinname', 'type', 'category' );
 
 	public function getPinYinNamebyid($id){
 		$result = $this->getOne(array('select' => 'pinyinname', 'where' => 'id='.$id, 'asArray' => TRUE));

+ 46 - 0
protected/view/admin/admin_holidayGroup.html

@@ -62,6 +62,7 @@
                 <tr>
                   <th>组描述</th>
                   <th>成员</th>
+				  <th>可见</th>
                   <th>审批组操作</th>
                 </tr>
               </thead>
@@ -71,6 +72,7 @@
                 <tr>
                   <td>{{acmanlist' value.typename}}</td>
                   <td>{{acmanlist' value.name}}</td>
+				  <td>{{acmanlist' value.categoryname}} <a href="#view" data-toggle="modal" onclick="setgroupsee('{{acmanlist' value.id}}', '{{acmanlist' value.category}}');">编辑</a></td>
                   <td><a href="#del" data-toggle="modal" onclick='delapprovalid("{{acmanlist' value.id}}")'>删除审批组</a></td>
                 </tr>
 			  <!-- endloop -->
@@ -81,6 +83,36 @@
 		</div>
 	</div>
 
+	<!--弹出(编辑可见)-->
+	<div class="modal hide fade" id="view">
+
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>设置审批组可见</h3>
+				</div>
+				<form method="post" action="/setholidaysee" >
+				<input id="holidaygroupid" type="hidden" name="groupid" value="">
+				<div class="modal-body">
+					<div class="control-group">
+						<div class="controls">
+							<style>
+								.controls > .checkbox{margin-left: 10px}
+							</style>
+							<!-- loop category -->
+							<label class="checkbox inline"><input type="checkbox" value="{{category' value.cid}}" name="category[]" >{{category' value.title}}</label>
+							<!-- endloop -->
+						</div>
+					</div>
+				</div>
+				<div class="modal-footer">
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+					<button class="button" type="submit">确定</button>
+				</div>
+				</form>
+			</div>
+		</div>
+	</div>
 <!--弹出(删除组)-->
 <div class="modal hide fade" id="del">
 
@@ -120,6 +152,20 @@
 		$('#delapporval').val(id);
 	}
 
+	function setgroupsee(id,cate){
+		$('#holidaygroupid').val(id);
+		var category = cate.split(',');
+		$("[name=category[]]:checkbox").attr("checked", false);
+		$.each(category,function(k,v){
+			var num = document.getElementsByName("category[]");
+			for(var i=0;i<num.length;i++){
+				if(num[i].value == v){
+					num[i].checked = true;
+				}
+			}
+		})
+	}
+
 	$(function(){
 		$('.controls label').live('click',function(e){
 			if($(e.target).is('label')){

+ 2 - 2
protected/view/admin/admin_menu.html

@@ -7,6 +7,6 @@
 <li><a href="/adminuser" <!-- if {{memu}}=="adminuser" --> class="selected" <!-- endif -->>员工列表</a></li>
 <li><a href="/adminproduct" <!-- if {{memu}}=="adminproduct" --> class="selected" <!-- endif -->>产品列表</a></li>
 <li><a href="/adminverify" <!-- if {{memu}}=="verify" --> class="selected" <!-- endif -->>报销审查组</a></li>
-<li><a  href="/adminInvoice" <!-- if {{memu}}=="invoice" --> class="selected" <!-- endif -->>发票管理</a></li>
-<li><a style="display:none" href="/holidaygroup" <!-- if {{memu}}=="holiday" --> class="selected" <!-- endif -->>假期审查组</a></li>
+<li><a style="display: none" href="/adminInvoice" <!-- if {{memu}}=="invoice" --> class="selected" <!-- endif -->>发票管理</a></li>
+<li><a href="/holidaygroup" <!-- if {{memu}}=="holiday" --> class="selected" <!-- endif -->>假期审查组</a></li>
 <!-- endif -->

+ 1 - 1
protected/view/holiday-borad.html

@@ -20,7 +20,7 @@
 			<div class="adminContent autoHeight" style="height: 821px;">
 				<div class="saea-borad">
 					<div class="borad-menu">
-						<a href="javascript:;" class="holiday" style="cursor: no-drop" disabled>请假申请</a>
+						<!--<a href="javascript:;" class="holiday" style="cursor: no-drop" disabled>请假申请</a>-->
 					</div>
 					<div class="borad-news">
 						<div class="saeaList">

+ 1 - 1
protected/view/menu.html

@@ -12,7 +12,7 @@
 <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
 <a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>
 
-<li style="display:none" data-placement="right" data-toggle="ctooltip" data-original-title="假期管理">
+<li data-placement="right" data-toggle="ctooltip" data-original-title="假期管理">
     <a href="/myList" class="icon- <!-- if {{memu}}=="holiday" --> selected <!-- endif -->">X</a></li>
 <li data-placement="right" data-toggle="ctooltip" class="topLine" data-original-title="APP" >
 <a href="/app" class="icon- <!-- if {{memu}}=="app" --> selected <!-- endif -->">Y</a></li>