Parcourir la source

人资系统开发

caipin il y a 7 ans
Parent
commit
bb98ccf526
34 fichiers modifiés avec 8234 ajouts et 455 suppressions
  1. 23 0
      global/css/dataTables.checkboxes.css
  2. 17 30
      global/css/global.css
  3. 3745 0
      global/css/jquery.dataTables.min.css
  4. BIN
      global/images/btn-hover1.gif
  5. BIN
      global/images/btn-normal1.jpg
  6. 1178 0
      global/js/dataTables.checkboxes.js
  7. 35 0
      global/js/dataTables.fixedColumns.min.js
  8. 63 0
      global/js/hr.validator.js
  9. 211 1
      global/js/humanResource.js
  10. 6 0
      protected/config/acl.conf.php
  11. 18 1
      protected/config/routes.conf.php
  12. 1357 98
      protected/controller/HumanResourceController.php
  13. 1 1
      protected/controller/InvoiceController.php
  14. 108 113
      protected/controller/MainController.php
  15. 26 18
      protected/controller/MobileController.php
  16. 21 27
      protected/controller/SettingController.php
  17. 51 0
      protected/model/L_category.php
  18. 1 1
      protected/model/client_staff.php
  19. 10 1
      protected/model/department.php
  20. 1 1
      protected/model/invoice.php
  21. 148 5
      protected/model/staff.php
  22. 67 0
      protected/model/staffLeaveManage.php
  23. 84 0
      protected/model/staffManage.php
  24. 176 0
      protected/model/staffOperationLog.php
  25. 140 0
      protected/view/humanResource/employeeApprovals.html
  26. 164 0
      protected/view/humanResource/hr.html
  27. 57 28
      protected/view/humanResource/hrEmployee.html
  28. 21 15
      protected/view/humanResource/hrMenu.html
  29. 140 0
      protected/view/humanResource/leaveOfficeApprovals.html
  30. 137 1
      protected/view/login.html
  31. 1 1
      protected/view/menu.html
  32. 100 0
      protected/view/setting/settingCredentialInfo.html
  33. 58 113
      protected/view/setting/settingEmployeeInfo.html
  34. 69 0
      protected/view/setting/settingFinanceInfo.html

+ 23 - 0
global/css/dataTables.checkboxes.css

@@ -0,0 +1,23 @@
+table.dataTable.dt-checkboxes-select tbody tr,
+table.dataTable thead th.dt-checkboxes-select-all,
+table.dataTable tbody td.dt-checkboxes-cell {
+  cursor: pointer;
+}
+
+table.dataTable thead th.dt-checkboxes-select-all,
+table.dataTable tbody td.dt-checkboxes-cell {
+  text-align: center;
+}
+
+div.dataTables_wrapper span.select-info,
+div.dataTables_wrapper span.select-item {
+  margin-left: 0.5em;
+}
+
+@media screen and (max-width: 640px) {
+  div.dataTables_wrapper span.select-info,
+  div.dataTables_wrapper span.select-item {
+    margin-left: 0;
+    display: block;
+  }
+}

+ 17 - 30
global/css/global.css

@@ -109,7 +109,6 @@ a.disenable{color:#ccc}
   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;
 }
-
 .colRed {color:#f70000}
 .colOrange {color:#ed8b00}
 .colYel {color:#d9a601}
@@ -474,6 +473,9 @@ table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span
     width: 900px;
   }
 }
+.modal-xlg {
+    width: 1151px;
+  }
 .clearfix:before,
 .clearfix:after,
 .modal-footer:before,
@@ -695,7 +697,7 @@ border-color: #d6e9c6;
 .infoFlowList{
     border-left: 1px solid #BEBEBE;
     margin-left: 25px;
-    padding-bottom: 33px;
+    padding-bottom: 20px;
     padding-left:27px;
     position: relative;
     margin-right:5px
@@ -2027,7 +2029,7 @@ table .taC{
 .saeaList .entry table th .repMark .rmUdone{
   color:#F89406;
 }
-.saeaList td sup {
+.saeaList th sup,.saeaList td sup {
   color:#fff;
   vertical-align: top;
   margin-left: 5px;
@@ -3804,34 +3806,19 @@ td div.dlLev3{
   padding:2px 10px;
   border:1px solid #ccc;
 }
-
-
-.search-dataTablestran{
-  position: absolute ;
-  top:-46px;
-  left:450px;
-}
-.dataTables-label{
-  height:26px;
-  line-height: 26px;
+.staff-detail-con,.staff-detail-side{
+  height: 400px;
+  overflow-y: auto;
 }
-.dataTables-input{
-  width:250px;
-  border:1px solid #ccc;
-  border-radius: 4px;
-  height:26px !important;
-  padding:2px !important;
-  margin-bottom: 2px !important;
+.staff-detail-side {
+  width:324px;
+  padding:0 10px
 }
-
-.search-dataTablesapproval{
-  position: absolute ;
-  top:-46px;
-  left:675px;
+.staff-detail-side .flowList li.item{
+  padding-left:15px
 }
-
-.search-dataTablesinvoicepaper{
-  position: absolute ;
-  top:-46px;
-  left:585px;
+.modal-title{
+  font-size: 14px;
+  font-weight: 600;
+  padding:10px 0;
 }

Fichier diff supprimé car celui-ci est trop grand
+ 3745 - 0
global/css/jquery.dataTables.min.css


BIN
global/images/btn-hover1.gif


BIN
global/images/btn-normal1.jpg


Fichier diff supprimé car celui-ci est trop grand
+ 1178 - 0
global/js/dataTables.checkboxes.js


Fichier diff supprimé car celui-ci est trop grand
+ 35 - 0
global/js/dataTables.fixedColumns.min.js


+ 63 - 0
global/js/hr.validator.js

@@ -0,0 +1,63 @@
+
+$(function () {
+	//添加员工验证
+	$('#staffAdd').validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    
+	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
+	    	nature: 'required;',
+	    	username:'required;',
+	    	cid_did:'required;',
+	    	position:'required;'
+	    	
+	    	,baseWage: 'required; '
+	    	,postWage: 'required; '
+	    	,hiredate: 'required; '
+	    			
+		    ,achievementBonus: 'required; '
+	    }
+	});
+	
+	//更新员工验证
+	
+	$('#staffUpdate').validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    
+	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
+	    	
+	    	username:'required;',
+	    	cid_did:'required;',
+	    	position:'required;'
+	    	,hiredate: 'required; '
+	    	,birthday:'required; '
+		   
+	    }
+	});
+	
+	//申请入职验证
+	$('#appliedEntry').validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    
+	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
+	    	telephone: 'required;',
+	    	qq:'required;',
+	    	wecat:'required;',
+	    	phone:'required;'
+	    	
+	    	,email: 'required; '
+	    	,gender: 'required; '
+	    	,birthday: 'required; '
+	    			
+		    ,qualifications: 'required; '
+		    	
+		    ,marriage: 'required; '
+		    ,nativePlace: 'required; '
+		    ,emergencyContacts: 'required; '
+		    ,living: 'required; '
+	    }
+	});
+	
+})

+ 211 - 1
global/js/humanResource.js

@@ -1,4 +1,214 @@
 $(function() {
+	//工号选择
+	$('select[node-hrNature]').change(function() {
+		 var nature=$(this).val();
+		 if(nature==1){
+			 $('#regularStaff').show();
+			 $('#internStaff').hide();
+		 }else{
+			 $('#internStaff').show();
+			 $('#regularStaff').hide();
+		 }
+	});
 	
+	//审批和抄送的cidKey交互
+	$('a[node-employeeApprovals]').click(function() {
+		$("#cidKey").val($(this).attr("node-cidKey"));
+	});
+	$('a[node-employeeCC]').click(function() {
+		$("#CCcidKey").val($(this).attr("node-cidKey"));
+	});
 	
-})
+	$("input[id^='verify_']").click(function(){
+		
+		var uid=$(this).val();
+		var uname=$(this).attr('data');
+		var ischeck=$(this).attr('checked');
+		
+		if(ischeck==undefined){
+			alert('请清空重新设置审批流程');
+			return ;
+		}else{
+			$(this).attr("disabled","disabled");
+		}
+		
+		var chk_value =[]; 
+		$('input[name="staff[]"]:checked').each(function(){ 
+			chk_value.push($(this).val()); 
+			}); 
+		
+		if(chk_value.length==1){
+			$("#AUTDO").html(uname);
+			$('#uidlist').val(uid);
+		}else{
+			var html2=$("#AUTDO").html();
+			$("#AUTDO").html(html2+'->'+uname);
+			var uil=$('#uidlist').val();
+			$('#uidlist').val(uil+','+uid);
+		}
+		return ;
+	});
+	
+	//设置抄送人员
+	$("input[node-approvalsStaff]").click(function(){
+		var didkey=$(this).attr('node-didkey');
+		var cidkey=$(this).val();
+		if($(this).is(':checked')) {
+			if(didkey=='')
+				$("input[node-cidKey="+cidkey+"]").attr("checked",true);
+			else
+				$("input[node-didKey="+cidkey+"_"+didkey+"]").attr("checked",true);
+		}else{
+			if(didkey=='')
+				$("input[node-cidKey="+cidkey+"]").attr("checked",false);
+			else
+				$("input[node-didKey="+cidkey+"_"+didkey+"]").attr("checked",false);
+		}
+	});
+	
+	//获得审批数据
+	$("a[node-approvals]").click(function(){
+		var sidkey=$(this).attr('node-sidKey');
+		var type='STAFF';
+		
+		var url = "/ajaxGetStaffInfoByType";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : sidkey,
+				type:type
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					$("#sidKey").val(data.sidKey);
+					$("#staffDetailNC").html(data.html);
+
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+				$("div[loading-msg='true']").html("");
+			}
+		});
+	});
+	
+	//获得员工更新数据
+	$("a[node-employeeInfo]").click(function(){
+		var sidkey=$(this).attr('node-sidKey');
+		var type='EMPLOYEE';
+		
+		var url = "/ajaxGetStaffInfoByType";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : sidkey,
+				type:type
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					$("#sidKey").val(data.sidKey);
+					$("#EMPLOYEENC").html(data.html);
+					
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+				$("div[loading-msg='true']").html("");
+			}
+		});
+	});
+	
+	//转职为试用
+	$("a[node-Transfer]").click(function(){
+		var sidkey=$(this).attr('node-sidKey');
+		
+		var url = "/ajaxGetStaffInfoBySid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : sidkey
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+				
+					$("#sidKeyTRIAL").val(data.detail.sidKey);
+					$("#transferJobNumber").html(data.detail.jobNumber);
+					$("#transferUsername").html(data.detail.username);
+					
+					var cateDepart=data.detail.category;
+					if(data.detail.department)
+						cateDepart+=data.detail.department.departmentName;
+					$("#transferCategory").html(cateDepart);
+					
+					$("#transferPosition").html(data.detail.position);
+					$("#transferHiredate").html(data.detail.hiredate);
+					$("#transferHiredate2").html(' 已入职 '+data.detail.workforce+' 天');
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	//转职为正式
+	$("a[node-TransferFORMAL]").click(function(){
+		var sidkey=$(this).attr('node-sidKey');
+		
+		var url = "/ajaxGetStaffInfoBySid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				serial : sidkey
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+				
+					$("#sidKeyREGULARS").val(data.detail.sidKey);
+					$("#formalJobNumber").html(data.detail.jobNumber);
+					$("#formalUsername").html(data.detail.username);
+					
+					var cateDepart=data.detail.category;
+					if(data.detail.department)
+						cateDepart+=data.detail.department.departmentName;
+					$("#formalCategory").html(cateDepart);
+					
+					$("#formalPosition").html(data.detail.position);
+					$("#formalHiredate").html(data.detail.hiredate);
+					$("#formalHiredate2").html(' 已入职 '+data.detail.workforce+' 天');
+					$("#formalProbationaryDate").html(data.detail.probationaryDate);
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	
+})
+
+function CLEARTUIL(){
+	$('input[name="staff[]"]:checked').each(function(){ 
+		$(this).removeAttr("disabled");
+		$(this).attr('checked',false);
+		}); 
+	$("#AUTDO").html('');
+	$('#uidlist').val('');
+}

+ 6 - 0
protected/config/acl.conf.php

@@ -162,4 +162,10 @@ $acl ['纸票管理'] ['allow'] = array (
 		)
 );
 
+//CLD全栏目权限配置
+
+
+
+
+
 ?>

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

@@ -623,9 +623,26 @@ $route['*']['/ajaxSetNotificationConf'] = array('MainController', 'ajaxSetNotifi
 
 //人资系统
 $route['*']['/settingEmployeeInfo'] = array('SettingController', 'settingEmployeeInfo');
-$route['*']['/hrEmployee'] = array('HumanResourceController', 'hrEmployee');
+$route['*']['/settingCredentialInfo'] = array('SettingController', 'settingCredentialInfo');
+$route['*']['/settingFinanceInfo'] = array('SettingController', 'settingFinanceInfo');
 
+$route['*']['/hrEmployee'] = array('HumanResourceController', 'hrEmployee');
 $route['post']['/staffAdd'] = array('HumanResourceController', 'staffAdd');
+$route['post']['/staffUpdate'] = array('HumanResourceController', 'staffUpdate');
+$route['post']['/staffTransfer'] = array('HumanResourceController', 'staffTransfer');
+
+$route['get']['/employeeApprovals'] = array('HumanResourceController', 'employeeApprovals');
+$route['post']['/employeeApprovalsAdd'] = array('HumanResourceController', 'employeeApprovalsAdd');
+$route['post']['/employeeCCAdd'] = array('HumanResourceController', 'employeeCCAdd');
+$route['post']['/employeeApprovalsUpdate'] = array('HumanResourceController', 'employeeApprovalsUpdate');
+
+$route['get']['/leaveOfficeApprovals'] = array('HumanResourceController', 'leaveOfficeApprovals');
+$route['post']['/employeeleaveCCAdd'] = array('HumanResourceController', 'employeeleaveCCAdd');
+$route['post']['/employeeleaveApprovalsAdd'] = array('HumanResourceController', 'employeeleaveApprovalsAdd');
+$route['post']['/appliedEntry'] = array('HumanResourceController', 'appliedEntry');
+$route['get']['/hr'] = array('HumanResourceController', 'hr');
+$route['post']['/ajaxGetStaffInfoByType'] = array('HumanResourceController', 'ajaxGetStaffInfoByType');
+$route['post']['/ajaxGetStaffInfoBySid'] = array('HumanResourceController', 'ajaxGetStaffInfoBySid');
 
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 1357 - 98
protected/controller/HumanResourceController.php


+ 1 - 1
protected/controller/InvoiceController.php

@@ -4877,7 +4877,7 @@ class InvoiceController extends DooController {
 		elseif ($status == 'PARTRECORD')
 			$con .= ' and untreadStatus=0 and printStatus=1 and irid!=""';
 		elseif ($status == 'All') {
-			$con .= ' and ( untreadStatus=2 or untreadStatus=0 or untreadStatus=3 )';
+			$con .= ' and ( untreadStatus=2 or untreadStatus=1 or untreadStatus=0 or untreadStatus=3 )';
 		}
 		$get = "/" . $status . "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
 		

+ 108 - 113
protected/controller/MainController.php

@@ -172,7 +172,18 @@ class MainController extends DooController {
 			}
 		}
 		
-		$data ['staff'] = ""; // $staff->getUser ();
+		// 检测员工状态
+		$data ['application'] = 0;
+		$detail = $staff->getStaffByName ( $uid );
+		if (! empty ( $detail )) {
+			if ($detail ['pendStatus'] == 1) {
+				$data ['application'] = 1;
+			} elseif ($detail ['pendStatus'] == 2) {
+				$data ['application'] = 2;
+			}
+		}
+		
+		$data ['staff'] = $detail; // $staff->getUser ();
 		$data ['login'] = "";
 		if (! empty ( $passwork ))
 			$data ['login'] = "inputErrow";
@@ -1807,57 +1818,47 @@ class MainController extends DooController {
 		$category = $lcategory->getCategoryById ( $this->staff [0] ['cid'], $this->staff [0] ['othercid'] );
 		$cateStr = " cid =0 ";
 		
-		
-		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		
-		$didList=explode(',',  $this->staff [0]['did']);
-		$didList=array_filter($didList);
-		$didListContont=array();
-		if (!empty($didList)){
-			foreach ($didList as $key=>$value){
-				array_push($didListContont, $XDeode->decode ( $value )) ;
+		$didList = explode ( ',', $this->staff [0] ['did'] );
+		$didList = array_filter ( $didList );
+		$didListContont = array ();
+		if (! empty ( $didList )) {
+			foreach ( $didList as $key => $value ) {
+				array_push ( $didListContont, $XDeode->decode ( $value ) );
 			}
-		
-			$data ['district'] = $district->getDistrictInId(implode(',', $didListContont));//$district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
-		}else{
-			$data ['district'] =array();
+			
+			$data ['district'] = $district->getDistrictInId ( implode ( ',', $didListContont ) ); // $district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
+		} else {
+			$data ['district'] = array ();
 		}
 		
-		
-		$sqstr='';
-		if (!empty($didListContont)){
+		$sqstr = '';
+		if (! empty ( $didListContont )) {
 			
 			foreach ( $didListContont as $key => $value ) {
 				if ($key != 0) {
-					$sqstr .= " or district like '" . $value  . ",%'";
+					$sqstr .= " or district like '" . $value . ",%'";
 				}
 			}
-			$cateStr = " ( district like '" . $didListContont [0]  . ",%'" . $sqstr.')';
+			$cateStr = " ( district like '" . $didListContont [0] . ",%'" . $sqstr . ')';
 		}
 		
+		// $list = array ();
+		// foreach ( $category as $key => $value ) {
+		// array_push ( $list, " district like '" . $value ['districtid'] . ",%' " );
+		// }
+		// if ($this->staff [0] ['isadmin'] != 1)
+		// $cateStr = implode ( " or ", $list );
+		// else
+		// $cateStr = " 1";
+		//
 		
+		// if (! empty ( $nature ))
+		// $cateStr = " 1";
 		
-		
-// 		$list = array ();
-// 		foreach ( $category as $key => $value ) {
-// 			array_push ( $list, " district like '" . $value ['districtid'] . ",%' " );
-// 		}
-// 		if ($this->staff [0] ['isadmin'] != 1)
-// 			$cateStr = implode ( " or ", $list );
-// 		else
-// 			$cateStr = " 1";
-// 		
-		
-// 		if (! empty ( $nature ))
-// 			$cateStr = " 1";
-		
-$size = 300;
-	
-			
-			
-			
+		$size = 300;
 		
 		$data ['htmllv2'] = array ();
 		$data ['htmllv3'] = array ();
@@ -1933,18 +1934,11 @@ $size = 300;
 		
 		$data ['company'] = $company->getCompanyByDistrict ( $this->staff [0] ['sid'], $cateStr, $this->staff [0] ['isadmin'], $page, $size, $tagSQL );
 		
-		
-		
-		
-		
-		
-		
-		
-// 		if ($this->staff [0] ['isadmin'] != 1) {
-// 			$data ['district'] = $district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
-// 		} else {
-// 			$data ['district'] = $data ['district2'];
-// 		}
+		// if ($this->staff [0] ['isadmin'] != 1) {
+		// $data ['district'] = $district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
+		// } else {
+		// $data ['district'] = $data ['district2'];
+		// }
 		
 		// 获得标签
 		$ClientTagList = $tagCompanyNexus->getTagClientBySid ( $this->staff [0] ['sid'] );
@@ -2077,7 +2071,6 @@ $size = 300;
 		$this->render ( "/contacts_company", $data );
 	}
 	function contacts() {
-		
 		$data ['memu'] = "contacts";
 		
 		$data ['staff'] = $this->staff;
@@ -2140,57 +2133,56 @@ $size = 300;
 		$linfo = $category->getCategoryById ( $this->staff [0] ['cid'], $this->staff ['0'] ['othercid'] );
 		$staffid = $condition = $a = "";
 		
-		//if ($this->staff [0] ['isadmin'] != 1) {
-			// 加入办事处地区
+		// if ($this->staff [0] ['isadmin'] != 1) {
+		// 加入办事处地区
 		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		
-		$didList=explode(',',  $this->staff [0]['did']);
-		$didList=array_filter($didList);
-		$didListContont=array();
-		if (!empty($didList)){
-			foreach ($didList as $key=>$value){
-				array_push($didListContont, $XDeode->decode ( $value )) ;
+		$didList = explode ( ',', $this->staff [0] ['did'] );
+		$didList = array_filter ( $didList );
+		$didListContont = array ();
+		if (! empty ( $didList )) {
+			foreach ( $didList as $key => $value ) {
+				array_push ( $didListContont, $XDeode->decode ( $value ) );
 			}
 			
-			$data ['district'] = $district->getDistrictInId(implode(',', $didListContont));//$district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
-		}else{
-			$data ['district'] =array();
+			$data ['district'] = $district->getDistrictInId ( implode ( ',', $didListContont ) ); // $district->get_lvByStaffid ( 1, $this->staff [0] ['sid'] );
+		} else {
+			$data ['district'] = array ();
 		}
 		
-			if (! empty ( $search ))
-				$sch = "  and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
-			else {
-				$a ='';
-				$sqstr='';
-				if (!empty($didListContont)){
-					$a ='';
-					foreach ( $didListContont as $key => $value ) {
-						if ($key != 0) {
-							$sqstr .= " or b.district like '" . $value  . ",%'";
-						}
+		if (! empty ( $search ))
+			$sch = "  and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
+		else {
+			$a = '';
+			$sqstr = '';
+			if (! empty ( $didListContont )) {
+				$a = '';
+				foreach ( $didListContont as $key => $value ) {
+					if ($key != 0) {
+						$sqstr .= " or b.district like '" . $value . ",%'";
 					}
-					$a = "and ( b.district like '" . $didListContont [0]  . ",%'" . $sqstr.')';
 				}
-				
-				if (! empty ( $tooltip ))
-					$sch = "";
-				$staffid = $data ['staff'] [0] ['sid'];
-				
+				$a = "and ( b.district like '" . $didListContont [0] . ",%'" . $sqstr . ')';
 			}
 			
-// 		} else {
-// 			$data ['district'] = $data ['district2'];
-// 			if (! empty ( $search ))
-// 				$sch = " and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
-// 			else {
-// 				$sch = " ";
-// 				$search = urldecode ( isset ( $this->params ['search'] ) ? $this->params ['search'] : "" );
-// 				if (! empty ( $search ))
-// 					$sch = "  and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
-// 			}
-// 		}
+			if (! empty ( $tooltip ))
+				$sch = "";
+			$staffid = $data ['staff'] [0] ['sid'];
+		}
+		
+		// } else {
+		// $data ['district'] = $data ['district2'];
+		// if (! empty ( $search ))
+		// $sch = " and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
+		// else {
+		// $sch = " ";
+		// $search = urldecode ( isset ( $this->params ['search'] ) ? $this->params ['search'] : "" );
+		// if (! empty ( $search ))
+		// $sch = " and ( address like '%" . $search . "%' or clientname like '%" . $search . "%' or companyname like '%" . $search . "%' or qq like '%" . $search . "%' or telephone like '%" . $search . "%' or phone like '%" . $search . "%')";
+		// }
+		// }
 		$data ['htmllv2'] = $data ['htmllv3'] = array ();
 		
 		if ($districtLv == 1) {
@@ -2242,8 +2234,12 @@ $size = 300;
 			$condition .= $sch;
 			// if(!empty($tooltip))
 			// $condition.=" and tooltip like '%".$tooltip."%'";
-			$pageinfo =array('lower'=>0,'total_page'=>0,'total_data'=>0);
-		if (!empty($didListContont)||! empty ( $search ))
+		$pageinfo = array (
+				'lower' => 0,
+				'total_page' => 0,
+				'total_data' => 0 
+		);
+		if (! empty ( $didListContont ) || ! empty ( $search ))
 			$pageinfo = $this->get_page ( "CLD_client_staff", $condition, $page, $page_size, "", "", "", $staffid, $search, $tooltip, $this->staff [0] ['cid'], $tagSQL );
 		
 		if ($sortV == "h") { // order by a.cid desc
@@ -2259,28 +2255,28 @@ $size = 300;
 			$limit = "  limit " . $pageinfo ['lower'] . " , " . $page_size . " ";
 		}
 		// 检索是全局
-		//echo $condition;
-		$data ['clientInfo'] =array();
-		if (!empty($didListContont)||! empty ( $search ))
+		// echo $condition;
+		$data ['clientInfo'] = array ();
+		if (! empty ( $didListContont ) || ! empty ( $search ))
 			$data ['clientInfo'] = $client_staff->getClientByStaff ( $condition, $limit, $staffid, $this->staff [0] ['sid'], $search, $tooltip, $this->staff [0] ['cid'], $tagSQL );
-		
-		// 获取其他办事处的客户
-		// if(!empty($districtstr)){
-		// $buclient=$client->getClientByDistrict($districtstr);
-		//
-		// foreach ($buclient as $key=>$vlaue){
-		//
-		// $falg=true;
-		//
-		// foreach ($data['clientInfo'] as $y=>$v){
-		// if($vlaue['clientname']==$v['clientname']&&$vlaue['companyname']==$v['companyname'])
-		// $falg=false;
-		// }
-		// if($falg)
-		// array_push($data['clientInfo'], $vlaue);
-		// }
-		//
-		// }
+			
+			// 获取其他办事处的客户
+			// if(!empty($districtstr)){
+			// $buclient=$client->getClientByDistrict($districtstr);
+			//
+			// foreach ($buclient as $key=>$vlaue){
+			//
+			// $falg=true;
+			//
+			// foreach ($data['clientInfo'] as $y=>$v){
+			// if($vlaue['clientname']==$v['clientname']&&$vlaue['companyname']==$v['companyname'])
+			// $falg=false;
+			// }
+			// if($falg)
+			// array_push($data['clientInfo'], $vlaue);
+			// }
+			//
+			// }
 		
 		$k = "";
 		for($i = 1; $i <= $pageinfo ['total_page']; $i ++) {
@@ -6883,7 +6879,6 @@ $size = 300;
 						'timeout' => 15 * 60 
 				) 
 		); // 超时时间(单位:s)
-
 		
 		$context = stream_context_create ( $options );
 		$result = file_get_contents ( $url, false, $context );

+ 26 - 18
protected/controller/MobileController.php

@@ -7,22 +7,22 @@ class MobileController extends DooController {
 	
 	function __construct() {
 		
-//		Doo::loadCore ( 'uri/DooUriRouter' );
-//		$router = new DooUriRouter ();
-//		$routeRs = $router->execute ( Doo::app ()->route, Doo::conf ()->SUBFOLDER );
-//		 
-//		if($routeRs['1']!="loginHttp"){
-//			if(isset($_COOKIE["staff"])){
-//				if(empty($_COOKIE["staff"])){
-//					setcookie("staff", '', time()+36000,"/");
-//					echo json_encode(array('status'=>3,'msg'=>'请登录'));die;
-//				}
-//			}else{
-//				setcookie("staff", '', time()+36000,"/");
-//				echo json_encode(array('status'=>3,'msg'=>'请登录'));die;
-//			}
-//			
-//		}
+		Doo::loadCore ( 'uri/DooUriRouter' );
+		$router = new DooUriRouter ();
+		$routeRs = $router->execute ( Doo::app ()->route, Doo::conf ()->SUBFOLDER );
+		 
+		if($routeRs['1']!="loginHttp"){
+			if(isset($_COOKIE["staff"])){
+				if(empty($_COOKIE["staff"])){
+					setcookie("staff", '', time()+36000,"/");
+					echo json_encode(array('status'=>3,'msg'=>'请登录'));die;
+				}
+			}else{
+				setcookie("staff", '', time()+36000,"/");
+				echo json_encode(array('status'=>3,'msg'=>'请登录'));die;
+			}
+			
+		}
 	}
 	
 	function loginHttp(){
@@ -153,6 +153,8 @@ class MobileController extends DooController {
 		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
+		//if (!is_numeric($_COOKIE ["staff"]))
+		
 		$sid = $XDeode->decode ( $_COOKIE ["staff"] );
 		
 		$staffDetail=$staff->getOne(array('where'=>'sid='.$sid,'asArray'=>true));
@@ -163,9 +165,10 @@ class MobileController extends DooController {
 			else
 				$districtList=$district->get_lvByStaffid(1,$sid);
 		}else{
+			
 			$districtList=$district->get_lvByid(0,$did);
 		}
-		echo json_encode(array('msg'=>"",'districtList'=>$districtList));
+		echo json_encode(array('msg'=>'','districtList'=>$districtList));
 	}
 	
 	function clientDetailHttp(){
@@ -321,9 +324,14 @@ class MobileController extends DooController {
 		
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
-		$sid = $XDeode->decode ( $_COOKIE ["staff"] );
+		//if (!is_numeric($_COOKIE ["staff"]))
+			$sid = $XDeode->decode ( $_COOKIE ["staff"] );
 		
 		$staffDetail=$staff->getOne(array('where'=>'sid='.$sid,'asArray'=>true));
+		if (empty($staffDetail)){
+			echo json_encode(array('status'=>1,'clientList'=>array(),'count'=>0,'msg'=>''));die;
+		}
+			
 		
 		$condition="";
 		if(!empty($lv1))

+ 21 - 27
protected/controller/SettingController.php

@@ -15,7 +15,7 @@ class SettingController extends DooController {
 				Doo::loadModel ( 'staff' );
 				$staff = new staff ();
 	
-				$this->staff = $staff->getUserByIdList ( $_COOKIE ["staff"] );
+				$this->staff= $staff->getStaffBySid( $_COOKIE ["staff"] );
 				return "/";
 			}
 		}
@@ -34,39 +34,33 @@ class SettingController extends DooController {
 	 * 员工信息
 	 */
 	function settingEmployeeInfo(){
+		$this->data ['staff'] = $this->staff;
+		$this->data ['memu'] = "adminmyinfo";
+		$this->data ['hrMemu'] = "settingEmployeeInfo";
 		
-		$data ['staff'] = $this->staff;
-		
-		$birArray = explode ( '-', $this->staff [0] ['birthday'] );
-		
-		$data ['year'] = $birArray [0];
-		
-		$year = date ( 'Y' );
-		$yearHtml = "";
-		for(; $year >= 1900; $year --) {
-			$yearHtml .= '<option ';
-			if ($data ['year'] == $year)
-				$yearHtml .= 'selected';
-				$yearHtml .= ' value="' . $year . '">' . $year . '</option>';
-		}
-		$data ['yearHtml'] = $yearHtml;
-		$data ['month'] = 01;
-		$data ['day'] = 01;
-		if (isset ( $birArray [1] )) {
-			$data ['month'] = $birArray [1];
-			$data ['day'] = $birArray [2];
-		}
-		$data ['msg'] = urldecode ( $this->params ['msg'] );
-		
-		
+		$this->render ( "/setting/settingEmployeeInfo", $this->data );
+	}
+	/**
+	 * 证件信息
+	 */
+	function settingCredentialInfo(){
+		$this->data ['staff'] = $this->staff;
+		$this->data ['memu'] = "adminmyinfo";
+		$this->data ['hrMemu'] = "settingEmployeeInfo";
 		
+		$this->render ( "/setting/settingCredentialInfo", $this->data );
+	}
+	/**
+	 * 财务信息
+	 */
+	function settingFinanceInfo(){
+		$this->data ['staff'] = $this->staff;
 		$this->data ['memu'] = "adminmyinfo";
 		$this->data ['hrMemu'] = "settingEmployeeInfo";
 		
-		$this->render ( "/setting/settingEmployeeInfo", $this->data );
+		$this->render ( "/setting/settingFinanceInfo", $this->data );
 	}
 	
-	
 	/**
 	 * 获取get或者POST值
 	 *

+ 51 - 0
protected/model/L_category.php

@@ -50,6 +50,8 @@ class L_category extends DooModel {
 	public function getCategory() {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'department' );
+		$department = new department ();
 		
 		$list = $this->find ( array (
 				'asc' => 'cid',
@@ -58,10 +60,59 @@ class L_category extends DooModel {
 		
 		foreach ( $list as $key => $value ) {
 			$list [$key] ['cidKey'] = $XDeode->encode ( $value ['cid'] );
+			$list [$key] ['department'] =$department->getDepartmentBycid($value ['cid']);
 		}
 		
 		return $list;
 	}
+	
+	/**
+	 * 获得办事处和部门
+	 * @return unknown
+	 */
+	public function getCategoryDepartment(){
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'department' );
+		$department = new department ();
+		$categorylist2 = $this->find ( array (
+				'desc' => 'cid',
+				'asArray' => TRUE
+		) );
+		
+		$categorylist3=$categorylist2;
+		$bakCategory = array ();
+		foreach ( $categorylist3 as $key => $value ) {
+			$departList = $department->getDepartmentBycid ( $value ['cid'] );
+			if (! empty ( $departList )) {
+				array_unshift ( $bakCategory, $value );
+				
+				unset ( $categorylist2 [$key] );
+				foreach ( $departList as $v ) {
+					array_unshift ( $bakCategory, array (
+							'cid' => $v ['cid'],
+							'cidKey'=> $XDeode->encode ( $v ['cid'] ),
+							'title' => $value ['title'],
+							'did' => $v ['did'],
+							'didKey'=>$XDeode->encode ( $v ['did'] ),
+							'departmentName' => $v ['departmentName']
+					) );
+				}
+			}
+		}
+		
+		foreach ( $bakCategory as $value ) {
+			array_unshift ( $categorylist2, $value );
+		}
+		
+		foreach ($categorylist2 as $key=>$value){
+			$categorylist2 [$key]['cidKey']=$XDeode->encode ( $value ['cid'] );
+		}
+		
+		return $categorylist2;
+	}
+	
+	
 	public function getUserByIdList($puid) {
 		return $this->find ( array (
 				'where' => "uid= '" . $puid . "'",

+ 1 - 1
protected/model/client_staff.php

@@ -23,7 +23,7 @@ class client_staff extends DooModel {
 		return $result;
     }
     
-	function getClientByStaff($condition="",$limit,$staffid="",$sid,$search,$tooltip,$cateid,$tagSQL){
+	function getClientByStaff($condition="",$limit,$staffid="",$sid,$search,$tooltip,$cateid,$tagSQL=''){
     	
 		if (!empty($staffid)){
 			//$staffid="and a.sid= '".$staffid."'";

+ 10 - 1
protected/model/department.php

@@ -12,10 +12,19 @@ class department extends DooModel {
 			'did' 
 	);
 	public function getDepartmentBycid($cid = 0) {
-		return $this->find ( array (
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		$list=$this->find ( array (
 				'where' => "cid= '" . $cid . "' ",
 				'asArray' => TRUE 
 		) );
+		
+		foreach ($list as $key=>$value){
+			$list [$key] ['didKey'] = $XDeode->encode ( $value ['did'] );
+		}
+		
+		return $list;
 	}
 	public function getDepartmentByDid($did = 0) {
 		return $this->getOne ( array (

+ 1 - 1
protected/model/invoice.php

@@ -774,7 +774,7 @@ class invoice extends DooModel {
 				'limit' => $limit,
 				$desc => 'approvalTime',
 				'asArray' => TRUE 
-		) );
+		) );//echo $con;
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		Doo::loadModel ( 'invoiceReceivables' );

+ 148 - 5
protected/model/staff.php

@@ -4,6 +4,7 @@ class staff extends DooModel {
 	public $sid;
 	public $username;
 	public $passwork;
+	public $staffManage;
 	public $isadmin;
 	public $cid;
 	public $othercid;
@@ -20,21 +21,42 @@ class staff extends DooModel {
 	public $appDate;
 	public $hiredate;
 	public $wxid;
+	public $wecat;
 	public $nature;
 	public $remittanceName;
 	public $bankName;
 	public $bankNumber;
 	public $coupletNumber;
 	public $remittanceBankType;
+	
+	public $living;
+	public $nativePlace;
+	public $emergencyContacts;
+	
 	public $did;
 	public $didName;
 	public $jobNumber;
+	public $baseWage;
+	public $postWage;
+	public $achievementBonus;
+	public $pendingApprovals;
+	public $processApprovals;
+	public $InductionDate;
+	public $pendStatus;
+	public $updateDate;
+	
+	public $probationaryDate;
+	public $regularsDate;
+	
+	public $qualifications;
+	public $marriage;
 	
 	public $_table = 'CLD_staff';
 	public $_primarykey = 'sid';
 	public $_fields = array (
 			'sid',
 			'username',
+			'staffManage',
 			'birthday',
 			'position',
 			'passwork',
@@ -60,6 +82,26 @@ class staff extends DooModel {
 			'coupletNumber',
 			'did',
 			'jobNumber',
+			'baseWage',
+			'postWage',
+			'achievementBonus',
+			'pendingApprovals',
+			'processApprovals',
+			'InductionDate',
+			'pendStatus',
+			'wecat',
+			'updateDate',
+			
+			'qualifications',
+			'marriage',
+			
+			'living',
+			'nativePlace',
+			'emergencyContacts',
+			
+			'probationaryDate',
+			'regularsDate',
+			
 			'didName'
 	);
 	public function checkUser($uid, $passwork) {
@@ -70,15 +112,21 @@ class staff extends DooModel {
 		) );
 	}
 	public function getStaffByName($username = '') {
-		
-		return $this->getOne ( array (
+		$detail=$this->getOne ( array (
 				'asc' => 'sid',
 				'where' => "username= '" . $username . "'",
 				'asArray' => TRUE 
 		) );
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		if (!empty($detail))
+			$detail['sidKey'] = $XDeode->encode ( $detail ['sid'] );
+		return $detail;
 	}
 	
 	
+	
 	/**
 	 * 
 	 * @return string
@@ -90,13 +138,13 @@ class staff extends DooModel {
 		$department = new department ();
 		
 		$condition = array (
-				'asc' => 'jobNumber',
+				'desc' => 'jobNumber',
 				'asArray' => TRUE 
 		);
 		
 		if ($admin)
 			$condition += array (
-					'where' => "isadmin = 0",
+					'where' => "username != 'admin'",
 			);
 		
 		$list = $this->find ( $condition);
@@ -107,6 +155,10 @@ class staff extends DooModel {
 			}
 			
 			$list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
+			$list [$key] ['cidKey'] = $XDeode->encode ( $value ['cid'] );
+			$list [$key] ['didKey'] = '';
+			if (!empty($value ['departmentID']))
+				$list [$key] ['didKey'] = $XDeode->encode ( $value ['departmentID'] );
 		}
 		
 		return $list;
@@ -141,6 +193,64 @@ class staff extends DooModel {
 		
 		return $list;
 	}
+	
+	/**
+	 * 获得审批中员工
+	 */
+	public function getStaffByApplied($sid=0){
+		$list = $this->find ( array (
+				'asc' => 'sid',
+				'where' => "pendStatus= '2' and pendingApprovals ='" . $sid . "'",
+				'asArray' => TRUE
+		) );
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
+		}
+		
+		return $list;
+	}
+	
+	/**
+	 * 获得最近审批通过的员工
+	 * @return string
+	 */
+	public function getStaffByApprovals(){
+		$list = $this->find ( array (
+				'asc' => 'InductionDate',
+				'where' => "username!= 'admin' and pendStatus=0 and InductionDate!=0",
+				'limit' => 10,
+				'asArray' => TRUE
+		) );
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
+		}
+		
+		return $list;
+	}
+	
+	/**
+	 * 获得最近更新的员工
+	 */
+	public function getStaffByUpdateDate(){
+		$list = $this->find ( array (
+				'asc' => 'updateDate',
+				'where' => "username!= 'admin'",
+				'limit' => 10,
+				'asArray' => TRUE
+		) );
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
+		}
+		
+		return $list;
+	}
+	
 	public function getUserById($sid = 0) {
 		
 		$list =$this->find ( array (
@@ -175,6 +285,22 @@ class staff extends DooModel {
 	}
 	
 	/**
+	 * 根据参数字段更新相应字段(主键ID必须传)
+	 * @param array $item 相关需要更新的字段信息
+	 * @return number 返回员工ID
+	 */
+	public function setStaffByCondition($item = array()) {
+		$lid = 0;
+		if (is_array ( $item ) && ! empty ( $item )) {
+			foreach ( $item as $key => $value ) {
+				$this->$key = $value;
+			}
+			$lid = $this->update ();
+		}
+		return $lid;
+	}
+	
+	/**
 	 * 
 	 * @param number $nature
 	 */
@@ -193,12 +319,29 @@ class staff extends DooModel {
 	 * @param number $sid 用户ID
 	 */
 	public function getStaffBySid($sid = 0) {
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		if (!is_numeric($sid)){
+			
+			$sid = $XDeode->decode ( $sid );
+		}
+		
 		$detail = array ();
-		if (! empty ( $sid ))
+		if (! empty ( $sid )){
 			$detail = $this->getOne ( array (
 					'where' => "sid= '" . $sid . "'",
 					'asArray' => TRUE 
 			) );
+			Doo::loadModel ( 'department' );
+			$department = new department ();
+			$detail ['department'] =$department->getDepartmentByDid($detail['departmentID']);
+			
+			$d1 = strtotime($detail['hiredate']);//过去的某天,你来设定
+			$d2 = 1 + ceil((time()-$d1)/60/60/24);
+			$detail['workforce']=$d2;
+			
+			$detail['sidKey']=$XDeode->encode ( $detail ['sid'] );
+		}
 		return $detail;
 	}
 	public function getStaffByWxid($wxid = '') {

+ 67 - 0
protected/model/staffLeaveManage.php

@@ -0,0 +1,67 @@
+<?php
+Doo::loadCore ( 'db/DooModel' );
+/**
+ * 
+ * @author CP.
+ * @version 1.0
+ * @namespace invoice
+ * @package invoiceModel
+ */
+class staffLeaveManage extends DooModel {
+	/**
+	 *
+	 * @var integer $iid 管理组ID
+	 */
+	public $icid;
+	/**
+	 *
+	 * @var string $staff 管理组人员
+	 */
+	public $staff;
+	public $category;
+	public $cid;
+	public $CC;
+	
+	public $_table = 'CLD_staffLeaveManage';
+	public $_primarykey = 'icid';
+	public $_fields = array (
+			'icid',
+			'staff',
+			'category',
+			'CC',
+			'cid'
+	);
+	
+	/**
+	 * 获得查看人员
+	 * @param number $icid
+	 */
+	public function getInvoiceCMByIcid($icid=0){
+		$lsit=array();
+		if (! empty ( $icid ))
+			$lsit = $this->getOne ( array (
+					'where' => 'icid='.$icid,
+					'asArray' => TRUE
+			) );
+		
+		return $lsit;
+	}
+	
+	/**
+	 * 是否有该用户在权限列表中
+	 * @param number $sid
+	 */
+	public function getInvoiceCMByStaff($sid = 0) {
+		$lsit=array();
+		if (! empty ( $sid ))
+			$lsit = $this->find ( array (
+					'select'=>'cid',
+					'where' => 'staff like "%[\"' . $sid . '\",%"',
+					'asArray' => TRUE
+			) );
+	
+			return $lsit;
+	}
+}
+
+// ?>

+ 84 - 0
protected/model/staffManage.php

@@ -0,0 +1,84 @@
+<?php
+Doo::loadCore ( 'db/DooModel' );
+/**
+ *
+ * @author CP.
+ * @version 1.0
+ * @namespace invoice
+ * @package invoiceModel
+ */
+class staffManage extends DooModel {
+	/**
+	 *
+	 * @var integer $iid 管理组ID
+	 */
+	public $icid;
+	/**
+	 *
+	 * @var string $staff 管理组人员
+	 */
+	public $staff;
+	public $category;
+	public $cid;
+	public $CC;
+	public $_table = 'CLD_staffManage';
+	public $_primarykey = 'icid';
+	public $_fields = array (
+			'icid',
+			'staff',
+			'category',
+			'CC',
+			'cid' 
+	);
+	
+	/**
+	 * 获得查看人员
+	 * @param number $icid
+	 */
+	public function getInvoiceCMByIcid($icid = 0) {
+		$lsit = array ();
+		if (! empty ( $icid ))
+			$lsit = $this->getOne ( array (
+					'where' => 'icid=' . $icid,
+					'asArray' => TRUE 
+			) );
+		
+		return $lsit;
+	}
+	
+	/**
+	 * 是否有该用户在权限列表中
+	 * @param number $sid
+	 */
+	public function getInvoiceCMByStaff($sid = 0) {
+		$lsit = array ();
+		if (! empty ( $sid ))
+			$lsit = $this->find ( array (
+					'select' => 'cid',
+					'where' => 'staff like "%[\"' . $sid . '\",%"',
+					'asArray' => TRUE 
+			) );
+		
+		return $lsit;
+	}
+	
+	/**
+	 * 根据cid获得审批组
+	 * @param string $cidMode
+	 */
+	public function getStaffManageByCid($cidMode = '') {
+		$detail = array ();
+		if (! empty ( $cidMode ))
+			$detail = $this->getOne ( array (
+					'where' => 'cid ="' . $cidMode . '" ',
+					'asArray' => true 
+			) );
+		if (empty ( $detail ['staff'] ))
+			$detail ['staffList'] = array ();
+		else
+			$detail ['staffList'] = json_decode ( $detail ['staff'], true );
+		return $detail;
+	}
+}
+
+// ?>

+ 176 - 0
protected/model/staffOperationLog.php

@@ -0,0 +1,176 @@
+<?php
+Doo::loadCore ( 'db/DooModel' );
+
+/**
+ * 开票操作日志 业务逻辑
+ *
+ * @author CP.
+ * @version 1.0
+ * @namespace invoice
+ * @package invoiceModel
+ */
+class staffOperationLog extends DooModel {
+	
+	/**
+	 *
+	 * @var integer $lid 操作日志ID
+	 */
+	public $lid;
+	/**
+	 *
+	 * @var string $username 操作员相关:名称
+	 */
+	public $username;
+	/**
+	 *
+	 * @var string $category 办事处
+	 */
+	public $category;
+	/**
+	 *
+	 * @var string $img 操作员相关:头像
+	 */
+	public $img;
+	/**
+	 *
+	 * @var integer $uid 用户ID
+	 */
+	public $uid;
+	/**
+	 * 操作时间
+	 * @var datetime
+	 */
+	public $date;
+	/**
+	 * 操作动作
+	 * @var string
+	 */
+	public $operation;
+	
+	/**
+	 * 开票ID
+	 * @var integer
+	 */
+	public $sid;
+	/**
+	 * 发票操作时的状态
+	 * @var integer
+	 */
+	public $status;
+	/**
+	 * 表名
+	 * @var string
+	 */
+	public $_table = 'CLD_staffOperationLog';
+	/**
+	 * 表主键
+	 * @var string
+	 */
+	public $_primarykey = 'lid';
+	/**
+	 * 表字段
+	 * @var array
+	 */
+	public $_fields = array (
+			'lid',
+			'username',
+			'uid',
+			'category',
+			'date',
+			'operation',
+			'img',
+			'sid',
+			'status' 
+	);
+	public function __construct() {
+		parent::setupModel ( __CLASS__ );
+	}
+	/**
+	 * 添加相关开票操作日志
+	 *
+	 * @param array $item 要记录的相关发票操作数据
+	 * @return integer|0 返回操作ID
+	 */
+	public function setInvoiceOperationLog($item = array()) {
+		$lid = 0;
+		if (is_array ( $item ) && ! empty ( $item )) {
+			foreach ( $item as $key => $value ) {
+				$this->$key = $value;
+			}
+			$lid = $this->insert ();
+		}
+		return $lid;
+	}
+	/**
+	 * 根据发票ID获取操作日志数据
+	 *
+	 * @param integer $iid 发票ID
+	 * @param integer $desc 获得一条操作日志最新或者最旧
+	 * @return array|array() 发票审批操作日志数据集
+	 */
+	public function getInvoiceOperationLogByUid($iid = 0, $desc = '') {
+		$list = array ();
+		if (! empty ( $iid ) && is_numeric ( $iid ) )
+			$list = $this->find ( array (
+					'where' => ' uid=' . $iid,
+					$desc => 'lid',
+					'asArray' => true 
+			) );
+		
+		return $list;
+	}
+	/**
+	 * 获得一条最新的退回操作记录
+	 * @param number $iid
+	 * @param string $desc
+	 * @return unknown
+	 */
+	public function getInvoiceOperationByDropped($iid = 0, $desc = 'desc') {
+		$list = $this->getOne ( array (
+				'where' => ' iid=' . $iid . ' and status=3',
+				$desc => 'lid',
+				'asArray' => true 
+		) );
+		return $list;
+	}
+	
+	public function getInvoiceOperationInStatus($iid = 0, $status = '0'){
+		$list = $this->getOne ( array (
+				'where' => 'iid=' . $iid . ' and status in(' . $status.')',
+				'desc' => 'lid',
+				'asArray' => true
+		) );
+		return $list;
+	}
+	
+	/**
+	 * 根据状态和发票ID获得一条最新的操作日志
+	 * @param number $iid
+	 * @param number $status
+	 * @param string $desc
+	 * @return unknown
+	 */
+	public function getInvoiceOperationByStatus($iid = 0, $status = 0, $desc = 'desc') {
+		$list = $this->getOne ( array (
+				'where' => 'iid=' . $iid . ' and status=' . $status,
+				$desc => 'lid',
+				'asArray' => true 
+		) );
+		return $list;
+	}
+	
+	/**
+	 * 根据sql执行
+	 * @param string $sql
+	 * @return boolean
+	 */
+	function setInvoiceOperationLogBySql($sql = "") {
+		if (empty ( $sql ))
+			return false;
+		$query = Doo::db ()->query ( $sql );
+		
+		return true;
+	}
+}
+
+?>

+ 140 - 0
protected/view/humanResource/employeeApprovals.html

@@ -0,0 +1,140 @@
+<!-- include '../header' -->
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/humanResource.js"></script>
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../menu' -->
+				</ul>
+			</div>
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include 'hrMenu' -->
+				</div>
+			</div>
+			<div class="adminContent autoHeight">
+				<legend>审批流程设置</legend>
+				<div class="subNav">
+		    	<ul class="navTabs">
+					  <li class="active"><a href="#">入职审批</a></li>
+					  <li><a href="/leaveOfficeApprovals">离职审批</a></li>
+					</ul>
+				</div>
+				<!--入职审批-->
+				<table class="table table-striped">
+              <thead>
+                <tr>
+                  <th>办事处</th>
+                  <th>入职审批流程</th>
+                  <th>抄送</th>
+                </tr>
+              </thead>
+              <tbody>
+              
+              <!-- loop categoryList  -->
+                <tr>
+                  <td>{{categoryList' value.title}}<!-- if isset({{categoryList' value.did}})  -->
+						- {{categoryList' value.departmentName}}
+						<!-- endif --></td>
+                  <td>{{categoryList' value.employeeApprovals}} <a href="#view" node-employeeApprovals node-cidKey="{{categoryList' value.cidKey}}<!-- if isset({{categoryList' value.did}})  -->_{{categoryList' value.didKey}}<!-- endif -->" data-toggle="modal">编辑</a></td>
+                  <td>{{categoryList' value.CC}}  <a href="#person" node-employeeCC node-cidKey="{{categoryList' value.cidKey}}<!-- if isset({{categoryList' value.did}})  -->_{{categoryList' value.didKey}}<!-- endif -->" data-toggle="modal">编辑</a></td>
+                </tr>
+               <!-- endloop -->
+                
+              </tbody>
+          	</table>
+			</div>
+		</div>
+	</div>
+	
+	
+	
+	
+	
+	
+<div class="modal fade" id="person" >
+<form method="post" action="/employeeCCAdd" name="group">
+ <input type="hidden" name="cidKey" id="CCcidKey" value="">
+	<div class="modal-dialog">
+		<div class="modal-content">
+	    <div class="modal-header">
+	    	<h3>设置入职抄送</h3>
+	    </div>
+	    <div class="modal-body saeaList">
+	    	
+	    		<div class="modal-title">勾选办事处选中该办事处成员</div>
+	    		<div class="controls">
+	    		<!-- loop categoryList -->
+	    		<label style="display:inline">
+			       <input type="checkbox" node-approvalsStaff node-didkey="<!-- if isset({{categoryList' value.didKey}}) -->{{categoryList' value.didKey}}<!-- endif -->"  value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}<!-- if isset({{categoryList' value.did}})  -->-{{categoryList' value.departmentName}}
+						<!-- endif -->
+			       </label>
+	    		<!-- endloop -->
+	    		</div>
+	    	
+	    	
+	    	  <div class="modal-title">打勾为抄送对象</div>
+				<div class="controls">
+				<!-- loop staffList -->
+			       <label style="display:inline">
+			       <input type="checkbox" name="staff[]" node-didKey="{{staffList' value.cidKey}}_<!-- if isset({{categoryList' value.didKey}}) -->{{staffList' value.didKey}}<!-- endif -->" node-cidKey="{{staffList' value.cidKey}}" data='{{staffList' value.username}}'  value="{{staffList' value.sid}}:{{staffList' value.username}}:{{staffList' value.avatar}}">{{staffList' value.username}}
+			       </label>
+			   	<!-- endloop -->
+			    </div>
+				
+			 
+	    </div>
+			<div class="modal-footer">
+				<input type="submit" class="button" vlaue="确定">
+			  <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+		</div>
+	</div>
+	</form>
+</div>
+	
+	
+	
+	
+<!--弹出设置审批人-->
+<div class="modal fade" id="view">
+
+<form method="post" action="/employeeApprovalsAdd" name="group">
+    <input type="hidden" name="cidKey" id="cidKey" value="">
+    <input type="hidden" name="uidlist" id="uidlist" value="">
+	<div class="modal-dialog">
+		<div class="modal-content">
+	    <div class="modal-header">
+	    	<h3>设置入职审批</h3>
+	    </div>
+	    <div class="modal-body saeaList">
+				<div class="controls">
+				
+				<!-- loop staffList -->
+			       <label class="checkbox inline">
+			       <input type="checkbox" name="staff[]" id="verify_{{staffList' value.sid}}" data='{{staffList' value.username}}'  value="{{staffList' value.sid}}:{{staffList' value.username}}:{{staffList' value.avatar}}">{{staffList' value.username}}
+			       </label>
+			   <!-- endloop -->
+				 		
+				 		
+				 		 <label class="controls colRed" id="AUTDO">
+					   		
+					   		</label>
+				 			  <a href="javascript:void(0)" onclick="CLEARTUIL()">清除</a>            
+			   </div>
+	    </div>
+			<div class="modal-footer">
+				<input type="submit" class="button" vlaue="确定">
+			  <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+		</div>
+	</div>
+	</form>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+
+</body>

+ 164 - 0
protected/view/humanResource/hr.html

@@ -0,0 +1,164 @@
+<!-- include '../header' -->
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/humanResource.js"></script>
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css"> 
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/hr.validator.js"></script>
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../menu' -->
+				</ul>
+			</div>
+			
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include 'hrMenu' -->
+				</div>
+			</div>
+			<div class="adminContent autoHeight">
+				<div class="saea-borad">
+					<div class="borad-menu">
+
+					</div>
+					<div class="borad-news">
+						<div class="saeaList">
+							<div class="clearfix">
+								<legend><div class="fR"></div>需要您处理</legend>
+								<table class="table table-bordered table-condensed">
+									<tbody>
+									<tr><th class="taC" width="140">员工名称</th><th class="taC">办事处/部门</th><th class="taC">岗位</th><th class="taC">状态</th><th class="taC" width="120">操作</th></tr>
+									<!-- loop staffList -->
+									<tr>
+									<td><a href="#employeeInfo" node-employeeInfo node-sidKey="{{staffList' value.sidKey}}" data-toggle="modal">{{staffList' value.username}}</a></td>
+									<td>{{staffList' value.category}}</td>
+									<td>{{staffList' value.position}}</td>
+									<td>
+									<!-- if {{staffList' value.pendStatus}}==2 -->
+									待入职
+									<!-- elseif {{staffList' value.pendStatus}}==3 -->
+									待离职
+									<!-- endif -->
+									</td>
+									<td>
+									<!-- if {{staffList' value.pendStatus}}==2 -->
+									<a class="button btn-block" node-approvals node-sidKey="{{staffList' value.sidKey}}" href="#approval" data-toggle="modal">入职审批</a>
+									<!-- elseif {{staffList' value.pendStatus}}==3 -->
+									<a class="button btn-block" href="#approval2" data-toggle="modal">离职审批</a>
+									<!-- endif -->
+									</td>
+									</tr>
+									<!-- endloop -->
+									
+									
+									</tbody>
+								</table>
+							</div>
+							<div class="clearfix">
+								<legend><div class="fR"></div>最近变动</legend>
+								<table class="table table-bordered table-condensed">
+									<tbody>
+									<tr><th class="taC" width="140">员工名称</th><th class="taC">办事处/部门</th><th class="taC">岗位</th><th class="taC">状态</th><th class="taC" width="120">时间</th></tr>
+									<!-- loop staffNew -->
+									<tr>
+									<td><a href="#detail" data-toggle="modal">{{staffList' value.username}}</a></td>
+									<td>{{staffList' value.category}}</td>
+									<td>{{staffList' value.position}}</td>
+									<td>
+										<!-- if {{staffList' value.pendStatus}}==0 -->
+										入职
+										<!-- elseif {{staffList' value.pendStatus}}==4 -->
+										离职
+										<!-- endif -->
+									</td>
+									<td width="120">2018-06-07</td>
+									</tr>
+									<!-- endloop -->
+									
+									
+									</tbody>
+								</table>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	
+	
+	
+	
+	
+	
+	<!--弹出(审批员工入职)-->
+	<div class="modal hide fade" id="approval">
+	<form method="post" action="/employeeInductionApprovals" name="group">
+	<input type="hidden" name="sidKey" id='sidKey'  value="">
+		
+		<div class="modal-dialog modal-xlg">
+			<div class="modal-content">
+			<div id='staffDetailNC'>
+			</div>
+			
+			
+			<div class="modal-footer">
+				<input type="submit" class="button" value="审批通过">
+				<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+			
+			</div>
+		</div>
+		</form>
+	</div>
+	
+	<!--弹出(更新员工信息)-->
+	<div class="modal hide fade" id="employeeInfo">
+	<form method="post" action="/staffUpdate" id="staffUpdate">
+	<input type="hidden" name="sidKey" id='sidKey'  value="">
+	<input type="hidden" name="employeeInfo"   value="employeeInfo">
+		<div class="modal-dialog modal-xlg">
+			<div class="modal-content">
+			<div id='EMPLOYEENC'>
+			</div>
+			
+			<div class="modal-footer">
+				<input type="submit" class="button" value="确定更新">
+				<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+			
+			</div>
+		</div>
+		</form>
+	</div>
+	
+	
+	
+	
+	
+	
+	
+	<!--弹出(员工详情)-->
+	<div class="modal hide fade" id="detail">
+		<div class="modal-dialog modal-xlg">
+			<div class="modal-content">
+				
+				
+				
+				
+				<div class="modal-footer">
+					<a href="#" class="button">确定更新</a>
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				</div>
+			</div></div>
+	</div>
+	
+	
+	
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 57 - 28
protected/view/humanResource/hrEmployee.html

@@ -1,5 +1,9 @@
 <!-- include '../header' -->
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/humanResource.js"></script>
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css"> 
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/hr.validator.js"></script>
 <body>
 	<div class="mainLayout">
 		<div class="mainMenu">
@@ -81,20 +85,32 @@
 						</td>
 						<td>{{stafflist' value.position}}</td>
 						<td>
+							
 							<!-- if {{stafflist' value.nature}}==1 -->
 							正式
 							<!-- elseif {{stafflist' value.nature}}==2 -->
 							实习
+							<!-- elseif {{stafflist' value.nature}}==3 -->
+							试用
 							<!-- endif -->
+							
 						</td>
 						<td>{{stafflist' value.hiredate}}</td>
 						<td>
-						<!-- if {{stafflist' value.nature}}==1 -->
-						<a href="#do-dismiss" data-toggle="modal">离职(点我)</a>
-						<!-- elseif {{stafflist' value.nature}}==2 -->
-						<a href="#do-probation" data-toggle="modal">转试用(点我)</a>
-						<!-- elseif {{stafflist' value.nature}}==3 -->
-						<a href="#do-return" data-toggle="modal">再入职(点我)</a>
+						<!-- if {{stafflist' value.pendStatus}}==0 -->
+							<!-- if {{stafflist' value.nature}}==1 -->
+							<a href="#do-dismiss" data-toggle="modal">离职</a>
+							<!-- elseif {{stafflist' value.nature}}==2 -->
+							<a href="#do-probation" node-Transfer node-sidKey="{{stafflist' value.sidKey}}" data-toggle="modal">转试用</a>
+							<!-- elseif {{stafflist' value.nature}}==3 -->
+							<a href="#do-hire" node-TransferFORMAL node-sidKey="{{stafflist' value.sidKey}}" data-toggle="modal">转正式</a>
+							<!-- elseif {{stafflist' value.nature}}==4 -->
+							<a href="#do-return" data-toggle="modal">再入职</a>
+							<!-- endif -->
+						<!-- elseif {{stafflist' value.pendStatus}}==2 -->
+							待入职
+						<!-- elseif {{stafflist' value.pendStatus}}==3 -->
+							待离职
 						<!-- endif -->
 						</td>
 						</tr>
@@ -288,7 +304,7 @@
 	</div>
 	<!--弹出(添加员工)-->
 	<div class="modal hide fade" id="add-employee">
-		<form  action="/staffAdd" method="post" id="staff" >
+		<form  action="/staffAdd" method="post" id="staffAdd" >
 		<div class="modal-dialog modal-lg">
 			<div class="modal-content">
 				<div class="modal-header">
@@ -299,7 +315,7 @@
 							<tbody>
 							<tr>
 								<th class="taC" width="150">聘用状态</th><td width="260">
-								<select name='nature' id='nature' >
+								<select name='nature' id='nature' node-hrNature >
 								<option value='2'>实习</option>
 								<option value='3'>试用</option>
 								<option value='1'>正式</option>
@@ -326,10 +342,9 @@
 								<th class="taC" width="150">办事处/部门</th>
 								<td>
 								<select name='cid_did' id='cid_did'>
-								<option value=''>请选择办事处/部门</option>
-								<option>总部</option>
-								<option>总部-研究中心</option>
-								<option>广东办</option>
+								<!-- loop categoryList -->
+								<option value="{{categoryList' value.cidKey}}_<!-- if !empty({{categoryList' value.did}}) -->{{categoryList' value.didKey}}<!-- endif -->">{{categoryList' value.title}}<!-- if !empty({{categoryList' value.did}}) -->/{{categoryList' value.departmentName}}<!-- endif --></option>
+								<!-- endloop -->
 								</select>
 								</td>
 								<th class="taC" width="150">岗位</th>
@@ -348,13 +363,13 @@
 						<table class="table table-bordered table-condensed">
 							<tr>
 								<th class="taC" width="150">基本工资</th>
-								<td width="210"><input name='baseWage' value="" type="number"></td>
+								<td width="210"><input name='baseWage' id='baseWage' value="" type="number"></td>
 								<th class="taC" width="150">岗位工资</th>
-								<td><input name='postWage' value="" type="number"></td>
+								<td><input name='postWage' id='postWage' value="" type="number"></td>
 							</tr>
 							<tr>
 								<th class="taC" width="150">绩效奖金</th>
-								<td width="210"><input name='achievementBonus' value="" type="number"></td>
+								<td width="210"><input name='achievementBonus' id='achievementBonus' value="" type="number"></td>
 								<th class="taC" width="150"></th><td></td>
 							</tr>
 						</table>
@@ -370,6 +385,9 @@
 	</div>
 	<!--弹出(实习转试用)-->
 	<div class="modal hide fade" id="do-probation">
+	<form  action="/staffTransfer" method="post" id="staffTransfer" >
+	<input type="hidden" name="sidKey" id='sidKeyTRIAL'  value="">
+	<input type="hidden" name="nature" id='nature'  value="TRIAL">
 		<div class="modal-dialog">
 			<div class="modal-content">
 				<div class="modal-header">
@@ -378,32 +396,39 @@
 				<div class="modal-body saeaList">
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="100">工号</th><td>C001</td>
+							<th class="taC" width="100">工号</th><td id="transferJobNumber" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">姓名</th><td>张三</td>
+							<th class="taC" width="100">姓名</th><td id="transferUsername" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">办事处/部门</th><td>总部</td>
+							<th class="taC" width="100">办事处/部门</th><td id="transferCategory"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">岗位</th><td>文员</td>
+							<th class="taC" width="100">岗位</th><td id="transferPosition"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">入职日期</th><td>2013-06-01 <span class="colGray">已入职 40天</span></td>
+							<th class="taC" width="100">入职日期</th>
+							<td ><span id="transferHiredate"></span><span class="colGray" id="transferHiredate2" ></span></td>
 						</tr>
 					</table>
 					<p class="alert">确认该员工实习转试用。</p>
 				</div>
 				<div class="modal-footer">
-					<a href="#" class="button">确定</a>
+					<input type="submit" class="button" value="确定">
 					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
 				</div>
 			</div>
 		</div>
+		
+		</form>
 	</div>
 	<!--弹出(试用转正式)-->
 	<div class="modal hide fade" id="do-hire">
+	
+	<form  action="/staffTransfer" method="post" id="staffTransfer" >
+	<input type="hidden" name="sidKey" id='sidKeyREGULARS'  value="">
+	<input type="hidden" name="nature" id='nature'  value="REGULARS">
 		<div class="modal-dialog">
 			<div class="modal-content">
 				<div class="modal-header">
@@ -412,32 +437,36 @@
 				<div class="modal-body saeaList">
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="100">工号</th><td>Z0001</td>
+							<th class="taC" width="100">工号</th><td id="formalJobNumber" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">姓名</th><td>张三</td>
+							<th class="taC" width="100">姓名</th><td id="formalUsername"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">办事处/部门</th><td>总部</td>
+							<th class="taC" width="100">办事处/部门</th><td id="formalCategory"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">岗位</th><td>文员</td>
+							<th class="taC" width="100">岗位</th><td id="formalPosition"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">入职日期</th><td>2013-06-01 <span class="colGray">已入职 40天</span></td>
+							<th class="taC" width="100">入职日期</th>
+							<td ><span id="formalHiredate"></span><span class="colGray" id="formalHiredate2" ></span></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">试用日期</th><td>2013-07-01</td>
+							<th class="taC" width="100">试用日期</th><td id="formalProbationaryDate"></td>
 						</tr>
 					</table>
 					<p class="alert">确认该员工试用转正式。</p>
 				</div>
 				<div class="modal-footer">
-					<a href="#" class="button">确定</a>
+					<input type="submit" class="button" value="确定">
 					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
 				</div>
 			</div>
 		</div>
+		
+		</form>
+		
 	</div>
 	<!--弹出(员工离职)-->
 	<div class="modal hide fade" id="do-dismiss">

+ 21 - 15
protected/view/humanResource/hrMenu.html

@@ -1,16 +1,22 @@
 <ul>
-						<li class="staffTitle">人资管理</li>
-						<li><a href="staff-home.html">首页</a></li>
-						<li><a href="staff-organization.html">组织</a></li>
-						<li><a href="/hrEmployee" <!-- if {{hrMemu}}=="hrEmployeeInfo" --> class="selected" <!-- endif --> >员工</a></li>
-						<li><a href="staff-payroll.html">工资</a></li>
-						<li><a href="staff-insurance.html">社保公积金</a></li>
-						<li><a href="staff-attendance.html">考勤</a></li>
-						<li><a href="staff-commission.html">提成</a></li>
-						<li><a href="staff-affixation.html">附加收支项</a></li>
-						<li class="topLine"><a href="staff-set-payroll.html">工资设置</a></li>
-						<li><a href="staff-set-insurance.html">社保设置</a></li>
-						<li><a href="staff-input-set-welfare.html">福利设置</a></li>
-						<li><a href="staff-srt-commission.html">提成设置</a></li>
-						<li><a href="staff-set-approval.html">审批流程设置</a></li>
-					</ul>
+	<li class="staffTitle">人资管理</li>
+	<li><a <!-- if {{hrMemu}}=="hr" --> class="selected" <!-- endif --> href="/hr">首页</a></li>
+	<li><a href="staff-organization.html">组织</a></li>
+	<li><a href="/hrEmployee"
+			<!-- if {{hrMemu}}=="hrEmployeeInfo" --> class="selected" <!-- endif -->
+			>员工
+	</a></li>
+	<li><a href="staff-payroll.html">工资</a></li>
+	<li><a href="staff-insurance.html">社保公积金</a></li>
+	<li><a href="staff-attendance.html">考勤</a></li>
+	<li><a href="staff-commission.html">提成</a></li>
+	<li><a href="staff-affixation.html">附加收支项</a></li>
+	<li class="topLine"><a href="staff-set-payroll.html">工资设置</a></li>
+	<li><a href="staff-set-insurance.html">社保设置</a></li>
+	<li><a href="staff-input-set-welfare.html">福利设置</a></li>
+	<li><a href="staff-srt-commission.html">提成设置</a></li>
+	<li><a href="/employeeApprovals"
+			<!-- if {{hrMemu}}=="employeeApprovals" --> class="selected" <!-- endif -->
+			>审批流程设置
+	</a></li>
+</ul>

+ 140 - 0
protected/view/humanResource/leaveOfficeApprovals.html

@@ -0,0 +1,140 @@
+<!-- include '../header' -->
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/humanResource.js"></script>
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../menu' -->
+				</ul>
+			</div>
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include 'hrMenu' -->
+				</div>
+			</div>
+			<div class="adminContent autoHeight">
+				<legend>审批流程设置</legend>
+				<div class="subNav">
+		    	<ul class="navTabs">
+					  <li ><a href="/employeeApprovals">入职审批</a></li>
+					  <li class="active"><a  href="#">离职审批</a></li>
+					</ul>
+				</div>
+				<!--入职审批-->
+				<table class="table table-striped">
+              <thead>
+                <tr>
+                  <th>办事处</th>
+                  <th>离职审批流程</th>
+                  <th>抄送</th>
+                </tr>
+              </thead>
+              <tbody>
+              
+              <!-- loop categoryList  -->
+                <tr>
+                  <td>{{categoryList' value.title}}<!-- if isset({{categoryList' value.did}})  -->
+						- {{categoryList' value.departmentName}}
+						<!-- endif --></td>
+                  <td>{{categoryList' value.employeeApprovals}} <a href="#view" node-employeeApprovals node-cidKey="{{categoryList' value.cidKey}}<!-- if isset({{categoryList' value.did}})  -->_{{categoryList' value.didKey}}<!-- endif -->" data-toggle="modal">编辑</a></td>
+                  <td>{{categoryList' value.CC}}  <a href="#person" node-employeeCC node-cidKey="{{categoryList' value.cidKey}}<!-- if isset({{categoryList' value.did}})  -->_{{categoryList' value.didKey}}<!-- endif -->" data-toggle="modal">编辑</a></td>
+                </tr>
+               <!-- endloop -->
+                
+              </tbody>
+          	</table>
+			</div>
+		</div>
+	</div>
+	
+	
+	
+	
+	
+	
+<div class="modal fade" id="person" >
+<form method="post" action="/employeeleaveCCAdd" name="group">
+ <input type="hidden" name="cidKey" id="CCcidKey" value="">
+	<div class="modal-dialog">
+		<div class="modal-content">
+	    <div class="modal-header">
+	    	<h3>设置离职抄送</h3>
+	    </div>
+	    <div class="modal-body saeaList">
+	    	
+	    		<div class="modal-title">勾选办事处选中该办事处成员</div>
+	    		<div class="controls">
+	    		<!-- loop categoryList -->
+	    		<label style="display:inline">
+			       <input type="checkbox" node-approvalsStaff node-didkey="<!-- if isset({{categoryList' value.didKey}}) -->{{categoryList' value.didKey}}<!-- endif -->"  value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}<!-- if isset({{categoryList' value.did}})  -->-{{categoryList' value.departmentName}}
+						<!-- endif -->
+			       </label>
+	    		<!-- endloop -->
+	    		</div>
+	    	
+	    	
+	    	  <div class="modal-title">打勾为抄送对象</div>
+				<div class="controls">
+				<!-- loop staffList -->
+			       <label style="display:inline">
+			       <input type="checkbox" name="staff[]" node-didKey="{{staffList' value.cidKey}}_<!-- if isset({{categoryList' value.didKey}}) -->{{staffList' value.didKey}}<!-- endif -->" node-cidKey="{{staffList' value.cidKey}}" data='{{staffList' value.username}}'  value="{{staffList' value.sid}}:{{staffList' value.username}}:{{staffList' value.avatar}}">{{staffList' value.username}}
+			       </label>
+			   	<!-- endloop -->
+			    </div>
+				
+			 
+	    </div>
+			<div class="modal-footer">
+				<input type="submit" class="button" vlaue="确定">
+			  <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+		</div>
+	</div>
+	</form>
+</div>
+	
+	
+	
+	
+<!--弹出设置审批人-->
+<div class="modal fade" id="view">
+
+<form method="post" action="/employeeleaveApprovalsAdd" name="group">
+    <input type="hidden" name="cidKey" id="cidKey" value="">
+    <input type="hidden" name="uidlist" id="uidlist" value="">
+	<div class="modal-dialog">
+		<div class="modal-content">
+	    <div class="modal-header">
+	    	<h3>设置离职审批</h3>
+	    </div>
+	    <div class="modal-body saeaList">
+				<div class="controls">
+				
+				<!-- loop staffList -->
+			       <label class="checkbox inline">
+			       <input type="checkbox" name="staff[]" id="verify_{{staffList' value.sid}}" data='{{staffList' value.username}}'  value="{{staffList' value.sid}}:{{staffList' value.username}}:{{staffList' value.avatar}}">{{staffList' value.username}}
+			       </label>
+			   <!-- endloop -->
+				 		
+				 		
+				 		 <label class="controls colRed" id="AUTDO">
+					   		
+					   		</label>
+				 			  <a href="javascript:void(0)" onclick="CLEARTUIL()">清除</a>            
+			   </div>
+	    </div>
+			<div class="modal-footer">
+				<input type="submit" class="button" vlaue="确定">
+			  <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+			</div>
+		</div>
+	</div>
+	</form>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+
+</body>

+ 137 - 1
protected/view/login.html

@@ -1,5 +1,25 @@
 <!-- include 'header' -->
-<!--<script src="http://qdgl.ynglzj.com/yn2/api/synlogin/cp123456"></script>-->
+<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css"> 
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
+<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/hr.validator.js"></script>
+
+<style>
+#animation{
+-webkit-animation:infinite pulse 4s 1s ease both;
+-moz-animation:infinite pulse 4s 1s ease both;}
+@-webkit-keyframes pulse{
+0%{-webkit-transform:scale(1)}
+50%{-webkit-transform:scale(1.1)}
+100%{-webkit-transform:scale(1)}
+}
+@-moz-keyframes pulse{
+0%{-moz-transform:scale(1)}
+50%{-moz-transform:scale(1.1)}
+100%{-moz-transform:scale(1)}
+}
+</style>
+
 <body class="loginBg">
 	<div class="loginIndex">
 		<div class="loginPanel {{login}}">
@@ -15,6 +35,7 @@
 					<input type="password" class="text" name="passwork">
 				</div>
 				<div class="formLine clearfix">
+				
 					<input type="submit" value="登录" class="button"><span class="submitSus"></span>
 				</div>
 				</form>
@@ -22,4 +43,119 @@
 			<p class="formLink"><a href="http://smartcost.com.cn" target="_blabk">公司主页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://h.smartcost.com.cn" target="_blabk">内部论坛</a>&nbsp;&nbsp;</p>
 		</div>
 	</div>
+	
+	<div class="modal hide fade " aria-hidden="false"  id="welcome">
+	<form method="post" action="/appliedEntry" id='appliedEntry' >
+		<input type="hidden" name="sidKey"  value="{{staff.sidKey}}">
+	
+		<div class="modal-backdrop fade in"></div>
+		<div class="modal-dialog modal-lg">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>欢迎加入纵横,请认真填写以下内容</h3>
+				</div>
+				<div class="modal-body saeaList">
+					<table class="table table-bordered table-condensed">
+						<tbody>
+							<tr>
+								<th class="taC" width="150">工号</th><td width="260">{{staff.jobNumber}}</td>
+								<th class="taC" width="150">姓名</th><td><input type="text" value="{{staff.username}}" disabled></td>
+							</tr>
+							<tr>
+								<th class="taC" width="150">办事处/部门</th>
+								<td>
+								<select disabled>
+								<option>{{staff.category}}</option>
+								</select></td>
+								<th class="taC" width="150">岗位</th><td><input type="text" value="{{staff.position}}" disabled></td>
+							</tr>
+							<tr>
+								<th class="taC" width="150">入职日期</th><td><input type="date" value='{{staff.hiredate}}' disabled></td>
+								<th class="taC" width="150">手机</th><td><input type="text" name='telephone' id='telephone' value="{{staff.telephone}}"></td>
+							</tr>
+							<tr>
+								<th class="taC">QQ</th><td><input type="text" name='qq' id='qq' value="{{staff.qq}}"  data-placement="bottom" data-toggle="ctooltip" data-original-title="填写您的工作QQ"></td>
+								<th class="taC">微信</th><td><input type="text" name='wecat' id='wecat' value="{{staff.wecat}}" data-placement="bottom" data-toggle="ctooltip" data-original-title="如微信已绑定手机号,填手机号即可"></td>
+							</tr>
+							<tr>
+								<th class="taC">电话</th><td><input type="text" name='phone' id='phone' value="{{staff.phone}}" data-placement="bottom" data-toggle="ctooltip" data-original-title="填写办事处电话/分机号"></td>
+								<th class="taC">邮箱</th><td><input type="text" name='email' id='email' value="{{staff.email}}"></td>
+							</tr>
+						</tbody>
+					</table>
+					<table class="table table-bordered table-condensed">
+						<tr>
+							<th class="taC" width="150">性别</th>
+							<td width="260">
+							<label class="radio inline"><input type="radio" name='gender' id='gender' data-rule="checked" value='男'>男</label>
+							 <label class="radio inline"><input type="radio" name='gender' id='gender' value='女'>女</label>
+							 </td>
+							<th class="taC" width="150">出生日期</th><td><input type="date" name='birthday' id='birthday' value='{{staff.birthday}}'></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">最高学历</th>
+							<td><select name='qualifications' id='qualifications'>
+							<option value=''>请选择</option>
+							<option value='初中'>初中</option>
+							<option value='高中'>高中</option>
+							<option value='中专'>中专</option>
+							<option value='大专'>大专</option>
+							<option value='本科'>本科</option>
+							<option value='硕士'>硕士</option>
+							</select>
+							</td>
+							<th class="taC" width="150">婚姻状况</th>
+							<td>
+							<select name='marriage' id='marriage'>
+							<option value=''>请选择</option>
+							<option value='1'>已婚</option>
+							<option value='0'>未婚</option>
+							</select></td>
+						</tr>
+					</table>
+					<table class="table table-bordered table-condensed">
+						<tr>
+							<th class="taC" width="150">籍贯</th>
+							<td width="260">
+							<input type="text" name='nativePlace' id='nativePlace' value='' data-placement="bottom" data-toggle="ctooltip" data-original-title="例:广东省珠海市" />
+							</td>
+							<th class="taC" width="150">紧急联系人</th>
+							<td>
+							<input name='emergencyContacts' id='emergencyContacts' type="text" value data-placement="bottom" data-toggle="ctooltip" data-original-title="例:张三(老婆)15003850888"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">现居住地址</th>
+							<td colspan="3"><input type="text" name='living' id='living' style="width:500px"></td>
+						</tr>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<input type="submit" class="button" vlaue="申请入职">
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				
+				</div>
+			</div></div>
+			</form>
+	</div>
+	<div class="modal hide fade" id="appliedMsg">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>温馨提示:</h3>
+				</div>
+				<div class="modal-body">
+					<p class="alert alert-">您的申请正在审批中,请耐心等候!</p>
+				</div>
+				<div class="modal-footer">
+					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确定</a>
+				</div>
+			</div></div>
+	</div>
+	
+	
+	<!-- if {{application}}==1 -->
+	<script type="text/javascript">$('#welcome').modal('show')</script>
+	<!-- elseif {{application}}==2 -->
+	<script type="text/javascript">$('#appliedMsg').modal('show')</script>
+	<!-- endif -->
 </body>

+ 1 - 1
protected/view/menu.html

@@ -13,7 +13,7 @@
 
 <li data-placement="right" data-toggle="ctooltip" <!-- if isInvoiceNew() --> class="news" <!-- endif --> data-original-title="发票申请"><a href="/invoice" class="icon- <!-- if {{memu}}=="invoice" --> selected <!-- endif -->">D</a></li>
 
-<li data-placement="right" data-toggle="ctooltip" data-original-title="人资管理"><a href="/hrEmployee" class="icon- <!-- if {{memu}}=="HumanResource" --> selected <!-- endif -->">m</a></li>
+<li data-placement="right" data-toggle="ctooltip" data-original-title="人资管理"><a href="/hr" class="icon- <!-- if {{memu}}=="HumanResource" --> selected <!-- endif -->">m</a></li>
 
 <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
 <a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>

+ 100 - 0
protected/view/setting/settingCredentialInfo.html

@@ -0,0 +1,100 @@
+<!-- include '../header' -->
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../menu' -->
+				</ul>
+			</div>
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include 'settingMenu' -->
+				</div>
+			</div>
+			
+			
+			<div class="adminContent autoHeight">
+				<div class="subNav">
+		    	<ul class="navTabs">
+					  <li ><a href="/settingEmployeeInfo">基本信息</a></li>
+					  <li class="active" ><a href="#">证件信息</a></li>
+					  <li><a href="/settingFinanceInfo">财务信息</a></li>
+					</ul>
+				</div>
+				
+				
+				
+				
+				
+				
+				<!--证件信息-->
+				<div class="saeaList" style="width:900px">
+					<table class="table table-bordered table-condensed">
+						<tr>
+							<th class="taC" width="150">身份证号码</th><td colspan="3"><input type="text" value="440476528372638192"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">正面(国徽)</th><td width="260"><input type="file"></td>
+							<td colspan="2">
+								<p>
+									正面(国徽) <a href="#" target="_blank">查看</a>
+								</p>
+							</td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">反面(照片)</th><td width="260"><input type="file"></td>
+							<td colspan="2">
+								<p>
+									正面(照片) <a href="#" target="_blank">查看</a>
+								</p>
+							</td>
+						</tr>
+					</table>
+					<table class="table table-bordered table-condensed">
+						<tr>
+							<th class="taC" width="150">毕业证书</th><td width="260"><input type="file"></td>
+							<td colspan="2">
+								<p>
+									毕业证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+								</p>
+							</td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">学位证书</th><td width="260"><input type="file"></td>
+							<td colspan="2">
+								<p>
+									学位证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+								</p>
+							</td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">职称证书</th><td width="260"><input type="file"></td>
+							<td colspan="2">
+								<p>
+									职称证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+								</p>
+								<p>
+									职称证书2 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+								</p>
+							</td>
+						</tr>
+					</table>
+					<div class="control-group">
+						<div class="controls">
+							<button type="submit" class="button">确认修改</button>
+						</div>
+					</div>
+				</div>
+				
+				
+
+			</div>
+		</div>
+	</div>
+	
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 58 - 113
protected/view/setting/settingEmployeeInfo.html

@@ -21,155 +21,100 @@
 				<div class="subNav">
 		    	<ul class="navTabs">
 					  <li class="active"><a href="#">基本信息</a></li>
-					  <li><a href="#">证件信息</a></li>
-					  <li><a href="#">财务信息</a></li>
+					  <li><a href="/settingCredentialInfo">证件信息</a></li>
+					  <li><a href="/settingFinanceInfo">财务信息</a></li>
 					</ul>
 				</div>
 				<!--基本信息-->
 				<div class="saeaList" style="width:900px">
+				
+				<form method="post" action="/staffUpdate"  >
+				<input type="hidden" name="sidKey" id='sidKey'  value="{{staff.sidKey}}">
+				<input type="hidden" name="employeeInfo"   value="settingEmployeeInfo">
 					<table class="table table-bordered table-condensed">
 						<tbody>
 						<tr>
-							<th class="taC" width="150">工号</th><td width="260">Z0001</td>
-							<th class="taC" width="150">姓名</th><td><input type="text" value="张三" disabled></td>
+							<th class="taC" width="150">工号</th><td width="260">{{staff.jobNumber}}</td>
+							<th class="taC" width="150">姓名</th><td><input type="text" value="{{staff.username}}" disabled></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">办事处/部门</th><td><select disabled><option>总部</option><option>总部-研究中心</option><option>广东办</option></select></td>
-							<th class="taC" width="150">岗位</th><td><input type="text" value="程序员" disabled></td>
+							<th class="taC" width="150">办事处/部门</th>
+							<td>
+							{{staff.category}}<!-- if !empty({{staff.departmentID}}) -->/{{staff.department.departmentName}}<!-- endif -->
+							</td>
+							<th class="taC" width="150">岗位</th><td><input type="text" value="{{staff.position}}" disabled></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">入职日期</th><td><input type="date" disabled></td>
-							<th class="taC" width="150">手机</th><td><input type="text" value="1234567890"></td>
+							<th class="taC" width="150">入职日期</th><td><input type="date" value="{{staff.hiredate}}" disabled></td>
+							<th class="taC" width="150">手机</th><td><input type="text" name='telephone' value="{{staff.telephone}}"></td>
 						</tr>
 						<tr>
-							<th class="taC">QQ</th><td><input type="text" value="12345678"></td>
-							<th class="taC">微信</th><td><input type="text" value="12345678"></td>
+							<th class="taC">QQ</th><td><input type="text" name='qq' value="{{staff.qq}}"></td>
+							<th class="taC">微信</th><td><input type="text" name='wecat' value="{{staff.wecat}}"></td>
 						</tr>
 						<tr>
-							<th class="taC">电话</th><td><input type="text" value="12345678"></td>
-							<th class="taC">邮箱</th><td><input type="text" value="12345678"></td>
+							<th class="taC">电话</th><td><input type="text" name='phone' value="{{staff.phone}}"></td>
+							<th class="taC">邮箱</th><td><input type="text" name='email' value="{{staff.email}}"></td>
 						</tr>
 						</tbody>
 					</table>
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="150">性别</th><td width="260"><label class="radio inline"><input type="radio">男</label> <label class="radio inline"><input type="radio">女</label></td>
-							<th class="taC" width="150">出生日期</th><td><input type="date"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">最高学历</th><td><select><option>初中</option><option>高中</option><option>中专</option><option>大专</option><option>本科</option><option>硕士</option></select></td>
-							<th class="taC" width="150">婚姻状况</th><td><select><option>已婚</option><option>未婚</option></select></td>
-						</tr>
-					</table>
-					<table class="table table-bordered table-condensed">
-						<tr>
-							<th class="taC" width="150">现居住地</th><td colspan="3"><input type="text" style="width:500px"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">籍贯</th><td width="260"><input type="text" data-placement="bottom" data-toggle="ctooltip" data-original-title="例:广东省珠海市" /></td>
-							<th class="taC" width="150">紧急联系人</th><td><input data-placement="bottom" data-toggle="ctooltip" data-original-title="例:张三(老婆)15003850888" type="text"></td>
-						</tr>
-					</table>
-					<div class="control-group">
-						<div class="controls">
-							<a href="#resignation" data-toggle="modal" class="button fR">离职申请</a>
-							<button type="submit" class="button">确认修改</button>
-						</div>
-					</div>
-				</div>
-				
-				<!--证件信息-->
-				<div class="saeaList" style="width:900px">
-					<table class="table table-bordered table-condensed">
-						<tr>
-							<th class="taC" width="150">身份证号码</th><td colspan="3"><input type="text" value="440476528372638192"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">正面(国徽)</th><td width="260"><input type="file"></td>
-							<td colspan="2">
-								<p>
-									正面(国徽) <a href="#" target="_blank">查看</a>
-								</p>
-							</td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">反面(照片)</th><td width="260"><input type="file"></td>
-							<td colspan="2">
-								<p>
-									正面(照片) <a href="#" target="_blank">查看</a>
-								</p>
-							</td>
-						</tr>
-					</table>
-					<table class="table table-bordered table-condensed">
-						<tr>
-							<th class="taC" width="150">毕业证书</th><td width="260"><input type="file"></td>
-							<td colspan="2">
-								<p>
-									毕业证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
-								</p>
+							<th class="taC" width="150">性别</th>
+							<td width="260">
+							<label class="radio inline"><input type="radio" name='gender' <!-- if {{staff.gender}}=='男' -->checked<!-- endif --> value="男">男</label> 
+							<label class="radio inline"><input type="radio" name='gender' <!-- if {{staff.gender}}=='女' -->checked<!-- endif --> value="女">女</label>
 							</td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">学位证书</th><td width="260"><input type="file"></td>
-							<td colspan="2">
-								<p>
-									学位证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
-								</p>
+							<th class="taC" width="150">出生日期</th>
+							<td><input type="date" name='birthday' value="{{staff.birthday}}"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">最高学历</th>
+							<td>
+							<select name='qualifications' id='qualifications'>
+							<option <!-- if {{staff.qualifications}}=='初中' -->selected<!-- endif --> value='初中'>初中</option>
+							<option <!-- if {{staff.qualifications}}=='高中' -->selected<!-- endif --> value='高中'>高中</option>
+							<option <!-- if {{staff.qualifications}}=='中专' -->selected<!-- endif --> value='中专'>中专</option>
+							<option <!-- if {{staff.qualifications}}=='大专' -->selected<!-- endif --> value='大专'>大专</option>
+							<option <!-- if {{staff.qualifications}}=='本科' -->selected<!-- endif --> value='本科'>本科</option>
+							<option <!-- if {{staff.qualifications}}=='硕士' -->selected<!-- endif --> value='硕士'>硕士</option>
+							</select>
 							</td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">职称证书</th><td width="260"><input type="file"></td>
-							<td colspan="2">
-								<p>
-									职称证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
-								</p>
-								<p>
-									职称证书2 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
-								</p>
+							<th class="taC" width="150">婚姻状况</th>
+							<td>
+							<select name='marriage' id='marriage'>
+							<option <!-- if {{staff.marriage}}=='' -->selected<!-- endif --> value=''>请选择</option>
+							<option <!-- if {{staff.marriage}}=='1' -->selected<!-- endif --> value='1'>已婚</option>
+							<option <!-- if {{staff.marriage}}=='0中' -->selected<!-- endif --> value='0'>未婚</option>
+							</select>
 							</td>
 						</tr>
 					</table>
-					<div class="control-group">
-						<div class="controls">
-							<button type="submit" class="button">确认修改</button>
-						</div>
-					</div>
-				</div>
-				
-				<!--财务信息-->
-				<div class="saeaList" style="width:900px">
 					<table class="table table-bordered table-condensed">
 						<tr>
-								<th colspan="4" class="taC">报销收款帐号</th>
+							<th class="taC" width="150">现居住地</th>
+							<td colspan="3"><input type="text" name='living' value="{{staff.living}}" style="width:500px"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">汇款人户名</th><td width="260"><input type="text"></td>
-							<th class="taC" width="150">汇款银行</th><td><select><option>其他</option><option>公司广发</option></select></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">汇款开户银行名称</th><td width="260"><input type="text"></td>
-							<th class="taC" width="150">汇款帐号</th><td><input type="text"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">联行号</th><td colspan="3"><input type="text"></td>
-						</tr>
-					</table>
-					<table class="table table-bordered table-condensed">
-						<tr>
-								<th colspan="4" class="taC">工资卡</th>
-						</tr>
-						<tr>
-							<th class="taC" width="150">银行卡号</th><td width="260"><input type="text"></td>
-							<th class="taC" width="150">开户行</th><td><input type="text"><p class="colGray">请详细至具体支行</p></td>
+							<th class="taC" width="150">籍贯</th>
+							<td width="260"><input type="text" name='nativePlace' value="{{staff.nativePlace}}" data-placement="bottom" data-toggle="ctooltip" data-original-title="例:广东省珠海市" /></td>
+							<th class="taC" width="150">紧急联系人</th>
+							<td><input data-placement="bottom" name='emergencyContacts' value="{{staff.emergencyContacts}}" data-toggle="ctooltip" data-original-title="例:张三(老婆)15003850888" type="text"></td>
 						</tr>
 					</table>
 					<div class="control-group">
 						<div class="controls">
-				 			<button type="submit" class="button">确认修改</button>
+							<a href="#resignation" data-toggle="modal" class="button fR">离职申请</a>
+							<input type="submit" class="button" value="确认修改">
 						</div>
 					</div>
+					</form>
+					
 				</div>
+				
+				
+				
+				
 
 			</div>
 		</div>

+ 69 - 0
protected/view/setting/settingFinanceInfo.html

@@ -0,0 +1,69 @@
+<!-- include '../header' -->
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../menu' -->
+				</ul>
+			</div>
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include 'settingMenu' -->
+				</div>
+			</div>
+			
+			
+			<div class="adminContent autoHeight">
+				<div class="subNav">
+		    	<ul class="navTabs">
+					  <li ><a href="/settingEmployeeInfo">基本信息</a></li>
+					  <li><a href="/settingCredentialInfo">证件信息</a></li>
+					  <li class="active"><a href="/#">财务信息</a></li>
+					</ul>
+				</div>
+				
+				
+				<!--财务信息-->
+				<div class="saeaList" style="width:900px">
+					<table class="table table-bordered table-condensed">
+						<tr>
+								<th colspan="4" class="taC">报销收款帐号</th>
+						</tr>
+						<tr>
+							<th class="taC" width="150">汇款人户名</th><td width="260"><input type="text"></td>
+							<th class="taC" width="150">汇款银行</th><td><select><option>其他</option><option>公司广发</option></select></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">汇款开户银行名称</th><td width="260"><input type="text"></td>
+							<th class="taC" width="150">汇款帐号</th><td><input type="text"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">联行号</th><td colspan="3"><input type="text"></td>
+						</tr>
+					</table>
+					<table class="table table-bordered table-condensed">
+						<tr>
+								<th colspan="4" class="taC">工资卡</th>
+						</tr>
+						<tr>
+							<th class="taC" width="150">银行卡号</th><td width="260"><input type="text"></td>
+							<th class="taC" width="150">开户行</th><td><input type="text"><p class="colGray">请详细至具体支行</p></td>
+						</tr>
+					</table>
+					<div class="control-group">
+						<div class="controls">
+				 			<button type="submit" class="button">确认修改</button>
+						</div>
+					</div>
+				</div>
+
+			</div>
+		</div>
+	</div>
+	
+<script type="text/javascript">autoFlashHeight();</script>
+</body>