caipin пре 7 година
родитељ
комит
73b3c95efc

+ 11 - 1
global/js/hr.validator.js

@@ -27,7 +27,6 @@ $(function () {
 	    
 	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
 	    	
-	    	username:'required;',
 	    	cid_did:'required;',
 	    	position:'required;'
 	    	,hiredate: 'required; '
@@ -60,4 +59,15 @@ $(function () {
 	    }
 	});
 	
+	//申请离职验证
+	$('#appliedDimission').validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
+	    	dimissionReason: 'required;',
+	    	
+	    }
+	});
+	
+	
 })

+ 117 - 2
global/js/humanResource.js

@@ -66,7 +66,7 @@ $(function() {
 		}
 	});
 	
-	//获得审批数据
+	//获得入职审批数据
 	$("a[node-approvals]").click(function(){
 		var sidkey=$(this).attr('node-sidKey');
 		var type='STAFF';
@@ -96,6 +96,35 @@ $(function() {
 		});
 	});
 	
+	//获得离职审批数据
+	$("a[node-approvalsDimission]").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) {
+					$("#sidKeyDimission").val(data.sidKey);
+					$("#staffDetailAD").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');
@@ -114,7 +143,7 @@ $(function() {
 			global : true,
 			success : function(data) {
 				if (data.status == 1) {
-					$("#sidKey").val(data.sidKey);
+					$("#sidKeyEmployeeInfo").val(data.sidKey);
 					$("#EMPLOYEENC").html(data.html);
 					
 				} else
@@ -201,7 +230,93 @@ $(function() {
 		});
 	});
 	
+	//转职为离职
+	$("a[node-TransferDimission]").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) {
+				
+					$("#sidKeyDismiss").val(data.detail.sidKey);
+					$("#DimissionJobNumber").html(data.detail.jobNumber);
+					$("#DimissionUsername").html(data.detail.username);
+					
+					var cateDepart=data.detail.category;
+					if(data.detail.department)
+						cateDepart+=data.detail.department.departmentName;
+					$("#DimissionCategory").html(cateDepart);
+					
+					$("#DimissionPosition").html(data.detail.position);
+					$("#DimissionHiredate").html(data.detail.hiredate);
+					$("#DimissionHiredate2").html(' 已入职 '+data.detail.workforce+' 天');
+					
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	//在入职
+	$("a[node-TransferReentry]").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) {
+				
+					$("#sidKeyReentry").val(data.detail.sidKey);
+					$("#ReentryJobNumber").html(data.detail.jobNumber);
+					$("#ReentryUsername").html(data.detail.username);
+					
+					var cateDepart=data.detail.category;
+					if(data.detail.department)
+						cateDepart+=data.detail.department.departmentName;
+					$("#ReentryCategory").html(cateDepart);
+					
+					$("#ReentryPosition").html(data.detail.position);
+					$("#ReentryHiredate").html(data.detail.hiredate);
+					$("#ReentryHiredate2").html(' 已离职 '+data.detail.workforceDimission+' 天');
+					
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
 	
+	//员工的筛选
+	$('select[node-pendStatus]').change(function() {
+		 $('#hrEmployee').submit();
+	});
+	$('select[node-nature]').change(function() {
+		 $('#hrEmployee').submit();
+	});
+	$('select[node-cid_did]').change(function() {
+		 $('#hrEmployee').submit();
+	});
+	//
 })
 
 function CLEARTUIL(){

+ 2 - 2
global/js/index.js

@@ -1218,8 +1218,8 @@ function clientEdit(cid){
 				//$html+='<tbody><tr><th>单位全称</th><td colspan="5"><input type="text" name="unit" id="unit" value="'+data.html.unit+'"> </td></tr>';
 				$html+='<tr><th>客户地区</th><td colspan="5">';
 				$html+='<select name="lv21" id="lv31" onchange="dislv(\'lv31\',\'32\');">'+data.html.districtLv1+'</select>';
-				$html+='<span id="mlv32"><select id="lv32" name="lv22"><option value="'+data.html.districtList[1]['id']+'">'+data.html.districtList[1]['name']+'</option></select></span>';
-				$html+='<span id="mlv33"><select id="lv33" name="lv23"><option value="'+data.html.districtList[2]['id']+'">'+data.html.districtList[2]['name']+'</option></select></span>';
+				$html+='<span id="mlv32"><select id="lv32" onchange="dislv(\'lv32\',\'33\',\''+data.html.districtList[1]['id']+'\');" name="lv22">'+data.html.districtLv2+'</select></span>';
+				$html+='<span id="mlv33"><select id="lv33" name="lv23">'+data.html.districtLv3+'</select></span>';
 				$html+='</td></tr>';
 					
 				$html+='<tr><th>客户地址</th><td colspan="5"><input type="text" id="address" value="'+data.html.address+'" name="address"> </td></tr>';

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

@@ -626,6 +626,10 @@ $route['*']['/settingEmployeeInfo'] = array('SettingController', 'settingEmploye
 $route['*']['/settingCredentialInfo'] = array('SettingController', 'settingCredentialInfo');
 $route['*']['/settingFinanceInfo'] = array('SettingController', 'settingFinanceInfo');
 
+$route['*']['/appliedDimission'] = array('HumanResourceController', 'appliedDimission');
+$route['*']['/employeeDismiss'] = array('HumanResourceController', 'employeeDismiss');
+$route['post']['/employeeReentry'] = array('HumanResourceController', 'employeeReentry');
+
 $route['*']['/hrEmployee'] = array('HumanResourceController', 'hrEmployee');
 $route['post']['/staffAdd'] = array('HumanResourceController', 'staffAdd');
 $route['post']['/staffUpdate'] = array('HumanResourceController', 'staffUpdate');
@@ -634,7 +638,8 @@ $route['post']['/staffTransfer'] = array('HumanResourceController', 'staffTransf
 $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['post']['/employeeInductionApprovals'] = array('HumanResourceController', 'employeeInductionApprovals');
+$route['post']['/employeeDimissionApprovals'] = array('HumanResourceController', 'employeeDimissionApprovals');
 
 $route['get']['/leaveOfficeApprovals'] = array('HumanResourceController', 'leaveOfficeApprovals');
 $route['post']['/employeeleaveCCAdd'] = array('HumanResourceController', 'employeeleaveCCAdd');
@@ -647,6 +652,7 @@ $route['post']['/ajaxGetStaffInfoBySid'] = array('HumanResourceController', 'aja
 
 
 
+
 //假期管理
 $route['*']['/myList'] = array('HolidayController', 'myList');
 $route['*']['/myList/:yearnum'] = array('HolidayController', 'myList');

+ 425 - 88
protected/controller/HumanResourceController.php

@@ -62,7 +62,6 @@ class HumanResourceController extends DooController {
 		Doo::loadModel ( 'staffManage' );
 		$staffManage = new staffManage ();
 		
-		
 		$sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
 		
 		$sid = $XDeode->decode ( $sidKey );
@@ -118,14 +117,16 @@ class HumanResourceController extends DooController {
 		}
 		
 		$staff->updateDate = date ( "Y-m-d H:i:s" );
-		// $staff->update ( array ('where' => 'sid=' . $sid ) );
+		$staff->update ( array (
+				'where' => 'sid=' . $sid 
+		) );
 		
 		// 操作日志
 		Doo::loadModel ( 'staffOperationLog' );
 		$staffOperationLog = new staffOperationLog ();
 		$item = array (
 				'date' => date ( "Y-m-d H:i:s" ),
-				'operation' => $this->staff ['username'] . "审批通过" . $staffDetail ['username'],
+				'operation' => $this->staff ['username'] . "入职  审批通过" . $staffDetail ['username'],
 				'status' => 1,
 				'img' => $staffDetail ['avatar'],
 				'username' => $staffDetail ['username'],
@@ -138,21 +139,176 @@ class HumanResourceController extends DooController {
 	}
 	
 	/**
+	 * 离职人员审批
+	 */
+	function employeeDimissionApprovals() {
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'staffLeaveManage' );
+		$staffLeaveManage = new staffLeaveManage ();
+		
+		$sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
+		$sid = $XDeode->decode ( $sidKey );
+		if (! is_numeric ( $sid ) || empty ( $sid ))
+			die ( 'illegal request' );
+		
+		$staffDetail = $staff->getOne ( array (
+				'where' => 'pendStatus=3 and sid=' . $sid . ' and pendingApprovalsLeave=' . $this->staff ['sid'],
+				'asArray' => true 
+		) );
+		
+		if (empty ( $staffDetail ))
+			die ( 'illegal request' );
+		
+		$processApprovals = json_decode ( $staffDetail ['processApprovalsLeave'], true );
+		$invoiceManage = json_decode ( $staffDetail ['staffManageLeave'], true );
+		
+		$staff = new staff ();
+		if (empty ( $processApprovals )) {
+			$processApprovals = array (
+					$this->staff ['sid'] => array (
+							'date' => date ( "Y-m-d H:i:s" ) 
+					) 
+			);
+			$nextInvoiceManage = next ( $invoiceManage );
+			
+			if ($nextInvoiceManage !== false)
+				$staff->pendingApprovalsLeave = $nextInvoiceManage [0];
+			$staff->processApprovalsLeave = json_encode ( $processApprovals );
+		} else {
+			$processApprovals [$this->staff ['sid']] = array (
+					'date' => date ( "Y-m-d H:i:s" ) 
+			);
+			
+			$pendingApprovals = 0;
+			foreach ( $invoiceManage as $key => $value ) {
+				if ($value [0] == $this->staff ['sid']) {
+					if (isset ( $invoiceManage [$key + 1] ))
+						$pendingApprovals = $invoiceManage [$key + 1] [0];
+					break;
+				}
+			}
+			
+			if (! empty ( $pendingApprovals ))
+				$staff->pendingApprovalsLeave = $pendingApprovals;
+			$staff->processApprovalsLeave = json_encode ( $processApprovals );
+		}
+		
+		if (count ( $processApprovals ) == count ( $invoiceManage )) {
+			$staff->pendStatus = 4;
+			$staff->pendingApprovalsLeave = 0;
+		}
+		
+		$staff->updateDate = date ( "Y-m-d H:i:s" );
+		$staff->update ( array (
+				'where' => 'sid=' . $sid 
+		) );
+		
+		// 操作日志
+		Doo::loadModel ( 'staffOperationLog' );
+		$staffOperationLog = new staffOperationLog ();
+		$item = array (
+				'date' => date ( "Y-m-d H:i:s" ),
+				'operation' => $this->staff ['username'] . "离职 审批通过" . $staffDetail ['username'],
+				'status' => 2,
+				'img' => $staffDetail ['avatar'],
+				'username' => $staffDetail ['username'],
+				'uid' => $staffDetail ['sid'],
+				'category' => $staffDetail ['category'] 
+		);
+		$staffOperationLog->setInvoiceOperationLog ( $item );
+		
+		return '/hr';
+	}
+	
+	/**
 	 * 员工信息
 	 */
 	function hrEmployee() {
+		$pendStatus = $this->get_args ( 'pendStatus' ) ? $this->get_args ( 'pendStatus' ) : "ALL";
+		$nature = $this->get_args ( 'nature' ) ? $this->get_args ( 'nature' ) : 'ALL';
+		$cid_did = $this->get_args ( 'cid_did' ) ? $this->get_args ( 'cid_did' ) : 'ALL';
+		$MebSea = $this->get_args ( 'MebSea' ) ? $this->get_args ( 'MebSea' ) : '';
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		$con = '  username != "admin" ';
+		if ($pendStatus == 'ALL')
+			$con .= ' and (pendStatus=0 or pendStatus=4) ';
+		elseif ($pendStatus == 'OTJOB')
+			$con .= ' and pendStatus=0 ';
+		elseif ($pendStatus == 'LVJOB')
+			$con .= ' and pendStatus=4 ';
+		
+		if ($nature == 'ALL')
+			$con .= ' and (nature=1 or nature=2 or nature=3 or nature=4) ';
+		elseif ($nature == 'FORMAL')
+			$con .= ' and  nature=1';
+		elseif ($nature == 'TRIAL')
+			$con .= ' and  nature=2';
+		elseif ($nature == 'PRACTICE')
+			$con .= ' and  nature=3';
+		
+		if ($cid_did != 'ALL') {
+			$department = explode ( '_', $cid_did );
+			$cid = $XDeode->decode ( $department [0] );
+			$departmentID = false;
+			if (! empty ( $department [1] )) {
+				$departmentID = $XDeode->decode ( $department [1] );
+			}
+			if (is_numeric ( $cid ) && is_numeric ( $departmentID ))
+				$con .= ' and  cid=' . $cid . ' and departmentID=' . $departmentID;
+			elseif (is_numeric ( $cid ) && ! is_numeric ( $departmentID ))
+				$con .= ' and  cid=' . $cid;
+		}
+		
+		if (! empty ( $MebSea ))
+			$con .= ' and ( username like "%' . $MebSea . '%" or jobNumber like "%' . $MebSea . '%" )';
+		
 		Doo::loadModel ( 'staff' );
 		$staff = new staff ();
 		Doo::loadModel ( 'L_category' );
 		$L_category = new L_category ();
 		
-		$stafflist = $staff->getStaff ( true );
+		$stafflist = $staff->getStaffByCondition ( $con );
+		
+		$monthstart = date ( 'Y-m-d 00:00:00', mktime ( 0, 0, 0, date ( 'm' ), 1, date ( 'Y' ) ) );
+		$monthend = date ( 'Y-m-d 23:59:59', mktime ( 0, 0, 0, date ( 'm' ) + 1, 0, date ( 'Y' ) ) );
+		
+		// 本月在职 入职 离职人员数量
+		$onJobCount = $staff->count ( array (
+				'where' => 'pendStatus=0 and username!="admin"' 
+		) );
+		$inJobCount = $staff->count ( array (
+				'where' => 'pendStatus=0 and username!="admin" and (InductionDate>="' . $monthstart . '" and InductionDate<="' . $monthend . '" )' 
+		) );
+		$leaveJobCount = $staff->count ( array (
+				'where' => 'pendStatus=4 and username!="admin" and (dimissionDate>="' . $monthstart . '" and dimissionDate<="' . $monthend . '" )' 
+		) );
 		
 		// 生成工号
 		$jobNumber = $this->createJobNumber ();
 		// 获得办事和部门
 		$categoryList = $L_category->getCategoryDepartment ();
 		
+		$monthstart = date ( 'm.d', mktime ( 0, 0, 0, date ( 'm' ), 1, date ( 'Y' ) ) );
+		$monthend = date ( 'm.d', mktime ( 0, 0, 0, date ( 'm' ) + 1, 0, date ( 'Y' ) ) );
+		
+		$this->data ['onJobCount'] = $onJobCount;
+		$this->data ['inJobCount'] = $inJobCount;
+		$this->data ['leaveJobCount'] = $leaveJobCount;
+		
+		$this->data ['monthstart'] = $monthstart;
+		$this->data ['monthend'] = $monthend;
+		
+		$this->data ['pendStatus'] = $pendStatus;
+		$this->data ['nature'] = $nature;
+		$this->data ['MebSea'] = $MebSea;
+		$this->data ['cid_did'] = $cid_did;
+		
 		$this->data ['categoryList'] = $categoryList;
 		$this->data ['jobNumber'] = $jobNumber;
 		$this->data ['stafflist'] = $stafflist;
@@ -245,6 +401,14 @@ class HumanResourceController extends DooController {
 			
 			// 抄送组
 			$staff->processCC = $staffManageDetail ['CC'];
+			// 工龄记录
+			$seniorityFormula = array ();
+			array_push ( $seniorityFormula, array (
+					'InductionDate' => $hiredate,
+					'dimissionDate' => '' 
+			) );
+			$staff->seniorityFormula = json_encode ( $seniorityFormula );
+			
 			$id = $staff->insert ();
 			
 			// 更新假期相关信息
@@ -278,9 +442,9 @@ class HumanResourceController extends DooController {
 		$position = $this->get_args ( 'position' ) ? $this->get_args ( 'position' ) : '';
 		$hiredate = $this->get_args ( 'hiredate' ) ? $this->get_args ( 'hiredate' ) : '';
 		$telephone = $this->get_args ( 'telephone' ) ? $this->get_args ( 'telephone' ) : '';
-// 		$baseWage = is_numeric ( $this->get_args ( 'baseWage' ) ) ? $this->get_args ( 'baseWage' ) : 0;
-// 		$postWage = is_numeric ( $this->get_args ( 'postWage' ) ) ? $this->get_args ( 'postWage' ) : 0;
-// 		$achievementBonus = is_numeric ( $this->get_args ( 'achievementBonus' ) ) ? $this->get_args ( 'achievementBonus' ) : 0;
+		// $baseWage = is_numeric ( $this->get_args ( 'baseWage' ) ) ? $this->get_args ( 'baseWage' ) : 0;
+		// $postWage = is_numeric ( $this->get_args ( 'postWage' ) ) ? $this->get_args ( 'postWage' ) : 0;
+		// $achievementBonus = is_numeric ( $this->get_args ( 'achievementBonus' ) ) ? $this->get_args ( 'achievementBonus' ) : 0;
 		$gender = $this->get_args ( 'gender' ) ? $this->get_args ( 'gender' ) : '';
 		
 		$qq = is_numeric ( $this->get_args ( 'qq' ) ) ? $this->get_args ( 'qq' ) : 0;
@@ -301,9 +465,12 @@ class HumanResourceController extends DooController {
 		$bankName = $this->get_args ( 'bankName' ) ? $this->get_args ( 'bankName' ) : '';
 		$bankNumber = $this->get_args ( 'bankNumber' ) ? $this->get_args ( 'bankNumber' ) : '';
 		
+		$salaryCard = $this->get_args ( 'salaryCard' ) ? $this->get_args ( 'salaryCard' ) : '';
+		$salaryBank = $this->get_args ( 'salaryBank' ) ? $this->get_args ( 'salaryBank' ) : '';
+		
 		$employeeInfo = $this->get_args ( 'employeeInfo' ) ? $this->get_args ( 'employeeInfo' ) : 'employeeInfo';
 		
-		if (! empty ( $sidKey )  ) {
+		if (! empty ( $sidKey )) {
 			
 			Doo::loadClass ( 'XDeode' );
 			$XDeode = new XDeode ( 5 );
@@ -317,23 +484,23 @@ class HumanResourceController extends DooController {
 			$staffManage = new staffManage ();
 			
 			// 用户名检测
-			if(!empty($username)){
-				$detail=$staff->getStaffByName($username);
-				if (empty($detail))
+			if (! empty ( $username )) {
+				$detail = $staff->getStaffByName ( $username );
+				if (empty ( $detail ))
 					die ( 'illegal request' );
 			}
-			$detail=$staff->getStaffBySid($sidKey);
-			if (empty($detail))
+			$detail = $staff->getStaffBySid ( $sidKey );
+			if (empty ( $detail ))
 				die ( 'illegal request' );
+				// if (!empty($username))
+				// $staff->username = $username;
+			if (! empty ( $hiredate ))
+				$staff->hiredate = $hiredate;
+			if (! empty ( $position ))
+				$staff->position = $position;
 				
-			$staff->username = $username;
-			if (!empty($hiredate))
-			$staff->hiredate = $hiredate;
-			if (!empty($position))
-			$staff->position = $position;
-			
-			//办事处-部门
-			if (!empty($cid_did)){
+				// 办事处-部门
+			if (! empty ( $cid_did )) {
 				$department = explode ( '_', $cid_did );
 				$cid = $XDeode->decode ( $department [0] );
 				// 加入默认总部分类
@@ -351,58 +518,64 @@ class HumanResourceController extends DooController {
 				$staff->category = $cagegory [0] ['title'];
 			}
 			
-			if (!empty($telephone))
-			$staff->telephone = $telephone;
-// 			if (!empty($baseWage))
-// 			$staff->baseWage = $baseWage;
-// 			if (!empty($postWage))
-// 			$staff->postWage = $postWage;
-// 			if (!empty($achievementBonus))
-// 			$staff->achievementBonus = $achievementBonus;
-			if (!empty($gender))
-			$staff->gender = $gender;
+			if (! empty ( $telephone ))
+				$staff->telephone = $telephone;
+				// if (!empty($baseWage))
+				// $staff->baseWage = $baseWage;
+				// if (!empty($postWage))
+				// $staff->postWage = $postWage;
+				// if (!empty($achievementBonus))
+				// $staff->achievementBonus = $achievementBonus;
+			if (! empty ( $gender ))
+				$staff->gender = $gender;
+			
+			if (! empty ( $qq ))
+				$staff->qq = $qq;
+			if (! empty ( $phone ))
+				$staff->phone = $phone;
+			if (! empty ( $wecat ))
+				$staff->wecat = $wecat;
+			if (! empty ( $email ))
+				$staff->email = $email;
+			if (! empty ( $birthday ))
+				$staff->birthday = $birthday;
+			if (! empty ( $$qualifications ))
+				$staff->qualifications = $qualifications;
+			if (! empty ( $marriage ))
+				$staff->marriage = $marriage;
+			if (! empty ( $IDcards ))
+				$staff->IDcards = $IDcards;
+			if (! empty ( $living ))
+				$staff->living = $living;
+			if (! empty ( $nativePlace ))
+				$staff->nativePlace = $nativePlace;
+			if (! empty ( $emergencyContacts ))
+				$staff->emergencyContacts = $emergencyContacts;
+			if (! empty ( $coupletNumber ))
+				$staff->coupletNumber = $coupletNumber;
+			if (! empty ( $bankName ))
+				$staff->bankName = $bankName;
+			if (! empty ( $bankNumber ))
+				$staff->bankNumber = $bankNumber;
+			if (! empty ( $remittanceName ))
+				$staff->remittanceName = $remittanceName;
 			
-			if (!empty($qq))
-			$staff->qq = $qq;
-			if (!empty($phone))
-			$staff->phone = $phone;
-			if (!empty($wecat))
-			$staff->wecat = $wecat;
-			if (!empty($email))
-			$staff->email = $email;
-			if (!empty($birthday))
-			$staff->birthday = $birthday;
-			if (!empty($$qualifications))
-			$staff->qualifications = $qualifications;
-			if (!empty($marriage))
-			$staff->marriage = $marriage;
-			if (!empty($IDcards))
-			$staff->IDcards = $IDcards;
-			if (!empty($living))
-			$staff->living = $living;
-			if (!empty($nativePlace))
-			$staff->nativePlace = $nativePlace;
-			if (!empty($emergencyContacts))
-			$staff->emergencyContacts = $emergencyContacts;
-			if (!empty($coupletNumber))
-			$staff->coupletNumber = $coupletNumber;
-			if (!empty($bankName))
-			$staff->bankName = $bankName;
-			if (!empty($bankNumber))
-			$staff->bankNumber = $bankNumber;
-			if (!empty($remittanceName))
-			$staff->remittanceName = $remittanceName;
+			if (! empty ( $salaryCard ))
+				$staff->salaryCard = $salaryCard;
+			if (! empty ( $salaryBank ))
+				$staff->salaryBank = $salaryBank;
 			
 			$staff->update ( array (
-					'where' => 'sid=' . $detail['sid']
+					'where' => 'sid=' . $detail ['sid'] 
 			) );
 			
-			if($employeeInfo=='employeeInfo'){
+			if ($employeeInfo == 'employeeInfo') {
 				return '/hr';
-			}elseif($employeeInfo=='settingEmployeeInfo'){
+			} elseif ($employeeInfo == 'settingEmployeeInfo') {
 				return '/settingEmployeeInfo';
+			} elseif ($employeeInfo == 'settingFinanceInfo') {
+				return '/settingFinanceInfo';
 			}
-			
 		}
 		die ( 'illegal request' );
 	}
@@ -410,36 +583,36 @@ class HumanResourceController extends DooController {
 	/**
 	 * 员工转职
 	 */
-	function staffTransfer(){
+	function staffTransfer() {
 		$sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
 		$nature = $this->get_args ( 'nature' ) ? $this->get_args ( 'nature' ) : '';
 		
-		if(!empty($sidKey)&&!empty($nature)){
+		if (! empty ( $sidKey ) && ! empty ( $nature )) {
 			Doo::loadClass ( 'XDeode' );
 			$XDeode = new XDeode ( 5 );
 			Doo::loadModel ( 'staff' );
 			$staff = new staff ();
 			
 			$sid = $XDeode->decode ( $sidKey );
-			$staffDetail=$staff->getStaffBySid ( $sid );
+			$staffDetail = $staff->getStaffBySid ( $sid );
 			
 			$item = array (
-					'sid' => $sid
+					'sid' => $sid 
 			);
-			if ($nature=='TRIAL')
+			if ($nature == 'TRIAL')
 				$item += array (
 						// 试用
 						'nature' => 3,
-						'probationaryDate' => date ( "Y-m-d H:i:s" )
+						'probationaryDate' => date ( "Y-m-d H:i:s" ) 
 				);
-			if($nature=='REGULARS'){
+			if ($nature == 'REGULARS') {
 				// 生成工号
 				$jobNumber = $this->createJobNumber ();
 				$item += array (
-						//正式
+						// 正式
 						'nature' => 1,
-						'jobNumber'=>$jobNumber ['regularStaff'],
-						'regularsDate' => date ( "Y-m-d H:i:s" )
+						'jobNumber' => $jobNumber ['regularStaff'],
+						'regularsDate' => date ( "Y-m-d H:i:s" ) 
 				);
 			}
 			$staff->setStaffByCondition ( $item );
@@ -453,17 +626,17 @@ class HumanResourceController extends DooController {
 					'img' => $staffDetail ['avatar'],
 					'username' => $staffDetail ['username'],
 					'uid' => $staffDetail ['sid'],
-					'category' => $staffDetail ['category']
+					'category' => $staffDetail ['category'] 
 			);
-			if ($nature=='TRIAL')
+			if ($nature == 'TRIAL')
 				$item += array (
 						// 试用
-						'operation' => "员工  实习转试用",
+						'operation' => "员工  实习转试用" 
 				);
-			if($nature=='REGULARS')
+			if ($nature == 'REGULARS')
 				$item += array (
-						//正式
-						'operation' => "员工  试用转正式",
+						// 正式
+						'operation' => "员工  试用转正式" 
 				);
 			$staffOperationLog->setInvoiceOperationLog ( $item );
 			
@@ -519,6 +692,19 @@ class HumanResourceController extends DooController {
 					'pendStatus' => 2 
 			);
 			$staff->setStaffByCondition ( $item );
+			// 操作日志
+			Doo::loadModel ( 'staffOperationLog' );
+			$staffOperationLog = new staffOperationLog ();
+			$item = array (
+					'date' => date ( "Y-m-d H:i:s" ),
+					'status' => 3,
+					'img' => $this->staf ['avatar'],
+					'username' => $this->staf ['username'],
+					'operation' => "申请入职",
+					'uid' => $this->staf ['sid'],
+					'category' => $this->staf ['category'] 
+			);
+			$staffOperationLog->setInvoiceOperationLog ( $item );
 			
 			return '/login';
 		}
@@ -526,6 +712,158 @@ class HumanResourceController extends DooController {
 	}
 	
 	/**
+	 * 申请离职
+	 */
+	function appliedDimission() {
+		$dimissionReason = $this->get_args ( 'dimissionReason' ) ? $this->get_args ( 'dimissionReason' ) : '';
+		if (empty ( $dimissionReason ))
+			die ( 'illegal request' );
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		Doo::loadModel ( 'staffLeaveManage' );
+		$staffLeaveManage = new staffLeaveManage ();
+		
+		$item = array (
+				'sid' => $this->staff ['sid'],
+				'dimissionReason' => $dimissionReason,
+				// 状态改成离职申请
+				'pendStatus' => 3 
+		);
+		$staff->setStaffByCondition ( $item );
+		// 操作日志
+		Doo::loadModel ( 'staffOperationLog' );
+		$staffOperationLog = new staffOperationLog ();
+		$item = array (
+				'date' => date ( "Y-m-d H:i:s" ),
+				'status' => 3,
+				'img' => $this->staff ['avatar'],
+				'username' => $this->staff ['username'],
+				'operation' => "申请离职",
+				'uid' => $this->staff ['sid'],
+				'category' => $this->staff ['category'] 
+		);
+		$staffOperationLog->setInvoiceOperationLog ( $item );
+		
+		// 离职审批组
+		// 获得审批组KEY
+		$staff = new staff ();
+		$cidMode = $this->staff ['cid'];
+		if (! empty ( $this->staff ['departmentID'] ))
+			$cidMode = $this->staff ['cid'] . '_' . $this->staff ['departmentID'];
+		
+		$staffManageDetail = $staffLeaveManage->getStaffManageByCid ( $cidMode );
+		if (empty ( $staffManageDetail ))
+			die ( 'illegal request' );
+		
+		$pendingApprovalsSid = current ( $staffManageDetail ['staffList'] ) [0];
+		$staff->pendingApprovalsLeave = $pendingApprovalsSid;
+		$staff->staffManageLeave = $staffManageDetail ['staff'];
+		$staff->sid = $this->staff ['sid'];
+		
+		// 抄送组
+		$staff->processLeaveCC = $staffManageDetail ['CC'];
+		$staff->update ();
+		
+		return '/settingEmployeeInfo';
+	}
+	
+	/**
+	 * 确认离职
+	 */
+	function employeeDismiss() {
+		$sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
+		
+		if (! empty ( $sidKey )) {
+			
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			Doo::loadModel ( 'staff' );
+			$staff = new staff ();
+			
+			$sid = $XDeode->decode ( $sidKey );
+			
+			$detail = $staff->getStaffBySid ( $sid );
+			if (empty ( $detail ))
+				die ( 'illegal request' );
+				
+			//工龄记录
+			$seniorityFormula=json_decode($detail['seniorityFormula']);
+			$arr = array_keys($seniorityFormula);
+			$key=end($arr);
+			
+			if (empty($seniorityFormula[$key]['dimissionDate']))
+				$seniorityFormula[$key]['dimissionDate']=date ( "Y-m-d H:i:s" );
+			else 
+				die ( 'illegal request' );
+			
+			$staff->seniorityFormula = json_encode ( $seniorityFormula );
+			
+			$item = array (
+					'sid' => $sid,
+					'nature' => 4,
+					'pendStatus' => 4,
+					'seniorityFormula'=>json_encode($seniorityFormula),
+					'dimissionDate' => date ( "Y-m-d H:i:s" ) 
+			);
+			$staff->setStaffByCondition ( $item );
+			
+			return '/hrEmployee';
+		}
+		die ( 'illegal request' );
+	}
+	
+	/**
+	 * 确认在入职
+	 */
+	function employeeReentry() {
+		$sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
+		
+		if (! empty ( $sidKey )) {
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			Doo::loadModel ( 'staff' );
+			$staff = new staff ();
+			
+			$sid = $XDeode->decode ( $sidKey );
+			
+			$detail = $staff->getStaffBySid ( $sid );
+			if (empty ( $detail ))
+				die ( 'illegal request' );
+			//工龄记录
+			$seniorityFormula=json_decode($detail['seniorityFormula']);
+			
+			array_push ( $seniorityFormula, array (
+					'InductionDate' => date ( "Y-m-d H:i:s" ) ,
+					'dimissionDate' => ''
+			) );
+			
+			$item = array (
+					'sid' => $sid,
+					'nature' => 1,
+					'pendStatus' => 0,
+					'seniorityFormula'=>json_encode($seniorityFormula),
+					'hiredate' => date ( "Y-m-d H:i:s" ) 
+			);
+			$staff->setStaffByCondition ( $item );
+			// 更新假期相关信息
+			Doo::loadModel ( 'holidaystaff' );
+			$holidaystaff = new HStaff ();
+			$holidaystaff->delete ( array (
+					'where' => 'uid=' . $sid 
+			) );
+			$holidaystaff = new HStaff ();
+			$holidaystaff->uid = $sid;
+			$holidaystaff->insert ();
+			$staff = new staff ();
+			$staffmsg = $staff->getUserById ( $sid );
+			$this->updateAnnualLeave ( $staffmsg [0] );
+			
+			return '/hrEmployee';
+		}
+		die ( 'illegal request' );
+	}
+	
+	/**
 	 * 员工审批流程
 	 */
 	function employeeApprovals() {
@@ -884,12 +1222,12 @@ class HumanResourceController extends DooController {
 	/**
 	 * 获得员工信息(未编写html)
 	 */
-	function ajaxGetStaffInfoBySid(){
+	function ajaxGetStaffInfoBySid() {
 		$serial = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
 		if (empty ( $serial )) {
 			echo json_encode ( array (
 					'status' => 2,
-					'msg' => 'illegal request'
+					'msg' => 'illegal request' 
 			) );
 			die ();
 		}
@@ -904,7 +1242,7 @@ class HumanResourceController extends DooController {
 		
 		echo json_encode ( array (
 				'status' => 1,
-				'detail' => $detail
+				'detail' => $detail 
 		) );
 		die ();
 	}
@@ -941,9 +1279,7 @@ class HumanResourceController extends DooController {
 			else {
 				$html = '
 							
-				<div class="modal-header">
-					<h3>员工入职审批</h3>
-				</div>
+				
 				<div class="modal-body saeaList">
 					<div class="fL staff-detail-con">
 						<table class="table table-bordered table-condensed">
@@ -1076,7 +1412,7 @@ class HumanResourceController extends DooController {
 						<tbody>
 						<tr>
 							<th class="taC" width="150">工号</th><td width="210">' . $detail ['jobNumber'] . '</td>
-							<th class="taC" width="150">姓名</th><td><input type="text" name="username" id="username" value="' . $detail ['username'] . '"></td>
+							<th class="taC" width="150">姓名</th><td>' . $detail ['username'] . '</td>
 						</tr>
 						<tr>
 							<th class="taC" width="150">办事处/部门</th><td>
@@ -1262,6 +1598,7 @@ class HumanResourceController extends DooController {
 			
 			echo json_encode ( array (
 					'status' => 1,
+					'sidKey' => $serial,
 					'html' => $html 
 			) );
 			die ();

+ 24 - 4
protected/controller/MainController.php

@@ -4933,18 +4933,38 @@ class MainController extends DooController {
 			$district = new district ();
 			$districtLv1 = $district->get_lv ( 1 );
 			
-			$info ['districtList'] = $district->getbyidlist ( $info ['district'] );
 			
+			$info ['districtList'] = $district->getbyidlist ( $info ['district'] );
 			$optionHtml = '<option vlaue="0">请选择</option>';
-			
 			foreach ( $districtLv1 as $key => $value ) {
-				if ($value ['name'] == $info ['districtList'] [0] ['name'])
+				if ($value ['name'] == $info ['districtList'] [0] ['name']){
 					$optionHtml .= '<option selected value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
-				else
+				}else
 					$optionHtml .= '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
 			}
 			
+			
+			
+			$districtLv2 = $district->get_lvByid ( 2,$info ['districtList'][0]['id'] );
+			$optionHtml2 = '';
+			foreach ( $districtLv2 as $key => $value ) {
+				if ($value ['name'] == $info ['districtList'] [1] ['name'])
+					$optionHtml2 .= '<option selected value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
+				else
+					$optionHtml2 .= '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
+			}
+			$districtLv3 = $district->get_lvByid ( 2,$info ['districtList'][1]['id'] );
+			$optionHtml3 = '';
+			foreach ( $districtLv3 as $key => $value ) {
+				if ($value ['name'] == $info ['districtList'] [2] ['name'])
+					$optionHtml3 .= '<option selected value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
+				else
+					$optionHtml3 .= '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
+			}
+			
 			$info ['districtLv1'] = $optionHtml;
+			$info ['districtLv2'] = $optionHtml2;
+			$info ['districtLv3'] = $optionHtml3;
 			
 			$info ['companyInfo'] = $cinfo;
 			

+ 7 - 1
protected/controller/MobileController.php

@@ -1469,6 +1469,7 @@ class MobileController extends DooController {
 		$DATE=$this->get_args('date')?$this->get_args('date'):date("Y-m-d");
 		//$month=$this->get_args('month')?$this->get_args('month'):date('m');
 		$status=$this->get_args('status')?$this->get_args('status'):0;
+		$dateType=$this->get_args('dateType')?$this->get_args('dateType'):0;
 		
 		Doo::loadModel('action_log');
 		$action_log=new action_log();
@@ -1487,8 +1488,13 @@ class MobileController extends DooController {
 			$condition.=" and sid=".$sid;
 		if (!empty($status))
 			$condition.=" and status in (".$status.")";
+		if(empty($dateType))
+			$condition.=' and date(updatetime) >= date_sub("'.$DATE.'",interval 30 day) and date(updatetime) <=  date_sub("'.$DATE.'",interval 0 day)';
+		else 
+			$condition.=' and updatetime = '.$DATE.' ';
+			
 			
-		$actionLogList=$action_log->find(array('where'=>' 1 '.$condition.' and date(updatetime) >= date_sub("'.$DATE.'",interval 30 day) and date(updatetime) <=  date_sub("'.$DATE.'",interval 0 day) ','desc'=>'aid','asArray'=>true));
+		$actionLogList=$action_log->find(array('where'=>' 1 '.$condition.'  ','desc'=>'aid','asArray'=>true));
 		  
 		//抽取日期 ,'groupby'=>'updatetime'
 		$dateLog=$action_log->find(array('select'=>'updatetime','where'=>' 1 '.$condition.' and date(updatetime) >= date_sub("'.$DATE.'",interval 30 day) and date(updatetime) <=  date_sub("'.$DATE.'",interval 0 day)   ','limit'=>50,'desc'=>'aid','asArray'=>true));

+ 3 - 0
protected/model/L_category.php

@@ -107,6 +107,9 @@ class L_category extends DooModel {
 		
 		foreach ($categorylist2 as $key=>$value){
 			$categorylist2 [$key]['cidKey']=$XDeode->encode ( $value ['cid'] );
+			if(!isset($categorylist2 [$key]['didKey'])||empty($categorylist2 [$key]['didKey']))
+				$categorylist2 [$key]['didKey']='';
+			
 		}
 		
 		return $categorylist2;

+ 67 - 3
protected/model/staff.php

@@ -41,6 +41,8 @@ class staff extends DooModel {
 	public $achievementBonus;
 	public $pendingApprovals;
 	public $processApprovals;
+	public $processCC;
+	
 	public $InductionDate;
 	public $pendStatus;
 	public $updateDate;
@@ -51,6 +53,18 @@ class staff extends DooModel {
 	public $qualifications;
 	public $marriage;
 	
+	public $salaryCard;
+	public $salaryBank;
+	
+	public $pendingApprovalsLeave;
+	public $processApprovalsLeave;
+	public $processLeaveCC;
+	public $staffManageLeave;
+	public $dimissionDate;
+	public $dimissionReason;
+	public $seniorityFormula;
+	
+	
 	public $_table = 'CLD_staff';
 	public $_primarykey = 'sid';
 	public $_fields = array (
@@ -87,11 +101,23 @@ class staff extends DooModel {
 			'achievementBonus',
 			'pendingApprovals',
 			'processApprovals',
+			'processCC',
+			
+			
+			'pendingApprovalsLeave',
+			'processApprovalsLeave',
+			'processLeaveCC',
+			'staffManageLeave',
+			
 			'InductionDate',
 			'pendStatus',
 			'wecat',
 			'updateDate',
 			
+			'dimissionReason',
+			
+			'salaryCard',
+			'salaryBank',
 			'qualifications',
 			'marriage',
 			
@@ -101,7 +127,8 @@ class staff extends DooModel {
 			
 			'probationaryDate',
 			'regularsDate',
-			
+			'dimissionDate',
+			'seniorityFormula',
 			'didName'
 	);
 	public function checkUser($uid, $passwork) {
@@ -128,7 +155,6 @@ class staff extends DooModel {
 	
 	
 	/**
-	 * 
 	 * @return string
 	 */
 	public function getStaff($admin=false) {
@@ -163,6 +189,40 @@ class staff extends DooModel {
 		
 		return $list;
 	}
+	
+	/**
+	 * 根据条件获得查询内容
+	 * @param string $con
+	 * @return string
+	 */
+	public function getStaffByCondition($con=''){
+		if ( empty ( $con ))
+			return array ();
+		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'department' );
+		$department = new department ();
+		$list = $this->find ( array (
+				'where' => $con,
+				'desc' => 'jobNumber',
+				'asArray' => TRUE
+		) );
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['departmentName'] ='';
+			if($value['departmentID']!=0){
+				$list [$key] ['departmentName'] =$department->getDepartmentByDid($value['departmentID']);
+			}
+				
+			$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;
+	}
+	
 	public function getStaffInCid($cid = '') {
 		if (empty ( $cid ))
 			return array ();
@@ -200,7 +260,7 @@ class staff extends DooModel {
 	public function getStaffByApplied($sid=0){
 		$list = $this->find ( array (
 				'asc' => 'sid',
-				'where' => "pendStatus= '2' and pendingApprovals ='" . $sid . "'",
+				'where' => "(pendStatus= '2' or pendStatus='3') and (pendingApprovals ='" . $sid . "' or pendingApprovalsLeave='" . $sid . "')",
 				'asArray' => TRUE
 		) );
 		Doo::loadClass ( 'XDeode' );
@@ -340,6 +400,10 @@ class staff extends DooModel {
 			$d2 = 1 + ceil((time()-$d1)/60/60/24);
 			$detail['workforce']=$d2;
 			
+			$d1 = strtotime($detail['dimissionDate']);//离职到今天
+			$d2 = 1 + ceil((time()-$d1)/60/60/24);
+			$detail['workforceDimission']=$d2;
+			
 			$detail['sidKey']=$XDeode->encode ( $detail ['sid'] );
 		}
 		return $detail;

+ 19 - 0
protected/model/staffLeaveManage.php

@@ -62,6 +62,25 @@ class staffLeaveManage extends DooModel {
 	
 			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;
+	}
+	
 }
 
 // ?>

+ 1 - 1
protected/view/humanResource/employeeApprovals.html

@@ -89,7 +89,7 @@
 			 
 	    </div>
 			<div class="modal-footer">
-				<input type="submit" class="button" vlaue="确定">
+				<input type="submit" class="button" value="确定">
 			  <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
 			</div>
 		</div>

+ 29 - 22
protected/view/humanResource/hr.html

@@ -49,7 +49,7 @@
 									<!-- 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>
+									<a class="button btn-block" node-approvalsDimission node-sidKey="{{staffList' value.sidKey}}" href="#approvalDimission" data-toggle="modal">离职审批</a>
 									<!-- endif -->
 									</td>
 									</tr>
@@ -103,6 +103,9 @@
 		
 		<div class="modal-dialog modal-xlg">
 			<div class="modal-content">
+			<div class="modal-header">
+					<h3>员工入职审批</h3>
+				</div>
 			<div id='staffDetailNC'>
 			</div>
 			
@@ -117,10 +120,34 @@
 		</form>
 	</div>
 	
+	<!--弹出(审批员工离职)-->
+	<div class="modal hide fade" id="approvalDimission">
+	<form method="post" action="/employeeDimissionApprovals" name="group">
+	<input type="hidden" name="sidKey" id='sidKeyDimission'  value="">
+		
+		<div class="modal-dialog modal-xlg">
+			<div class="modal-content">
+			<div class="modal-header">
+					<h3>员工离职审批</h3>
+				</div>
+			<div id='staffDetailAD'>
+			</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="sidKey" id='sidKeyEmployeeInfo'  value="">
 	<input type="hidden" name="employeeInfo"   value="employeeInfo">
 		<div class="modal-dialog modal-xlg">
 			<div class="modal-content">
@@ -140,25 +167,5 @@
 	
 	
 	
-	
-	
-	
-	<!--弹出(员工详情)-->
-	<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>

+ 76 - 195
protected/view/humanResource/hrEmployee.html

@@ -24,40 +24,42 @@
 			<div class="adminContent autoHeight">
 				<legend>员工列表</legend>
 				<div class="demandCate">
+				
+				<form action="/hrEmployee" id="hrEmployee" method="get" >
 					<ul class="cateList">
 						<li>
-							<select class="select">
-								<option>在职</option>
-								<option>离职</option>
-								<option>全部</option>
+							<select name="pendStatus" node-pendStatus  class="select">
+								<option <!-- if {{pendStatus}} == 'OTJOB'  --> selected <!-- endif --> value="OTJOB">在职</option>
+								<option <!-- if {{pendStatus}} == 'LVJOB'  --> selected <!-- endif --> value="LVJOB" >离职</option>
+								<option <!-- if {{pendStatus}} == 'ALL'  --> selected <!-- endif --> value="ALL" >全部</option>
 							</select>
 						</li>
 						<li>
-							<select class="select">
-								<option>全部</option>
-								<option>正式</option>
-								<option>试用</option>
-								<option>实习</option>
+							<select name="nature" node-nature class="select">
+								<option <!-- if {{pendStatus}} == 'ALL'  --> selected <!-- endif --> value="ALL">全部</option>
+								<option <!-- if {{pendStatus}} == 'FORMAL'  --> selected <!-- endif --> value="FORMAL">正式</option>
+								<option <!-- if {{pendStatus}} == 'TRIAL'  --> selected <!-- endif --> value="TRIAL">试用</option>
+								<option <!-- if {{pendStatus}} == 'PRACTICE'  --> selected <!-- endif --> value="PRACTICE">实习</option>
 							</select>
 						</li>
 						<li>
-							<select class="select">
-								<option>所有组织</option>
-								<option>总部</option>
-								<option>总部-研究中心</option>
-								<option>广东办</option>
+							<select name='cid_did'  node-cid_did class="select">
+								<option <!-- if 'ALL' == {{cid_did}}  --> selected <!-- endif --> value="ALL">所有组织</option>
+								<!-- loop categoryList -->
+								<option <!-- if {{categoryList' value.cidKey}}.'_'.{{categoryList' value.didKey}} == {{cid_did}}  --> selected <!-- endif -->  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>
 						</li>
 						<li>
 							<div class="search">
 								<div class="input-append">
-									<input class="span3" placeholder="姓名、工号" type="text" style="width:100px">
-									<button class="btn btn-small" type="button">搜索</button>
+									<input class="span3" name="MebSea" value='{{MebSea}}' placeholder="姓名、工号" type="text" style="width:100px">
+									<button class="btn btn-small" node-irmmebsea="" type="submit">搜索</button>
 								</div>
 							</div>
 						</li>
 						<li>
-							本月(05.01-05.31):在职 89&nbsp;入职&nbsp;<a href="#">5</a>&nbsp;离职&nbsp;<a>4</a>
+							本月({{monthstart}}-{{monthend}}):在职{{onJobCount}}&nbsp;入职&nbsp;<a href="#">{{inJobCount}}</a>&nbsp;离职&nbsp;<a>{{leaveJobCount}}</a>
 						</li>
 						<li>
 							<label class="checkbox"><input type="checkbox"> 设置权限</label>
@@ -66,7 +68,10 @@
 							<a href="#add-employee" data-toggle="modal" class="button">+员工</a>
 						</li>
 	  			</ul>
+	  			</form>
+	  			
 	  		</div>
+	  		
 				<div class="saeaList">
 					<table class="table table-hover">
 						<tbody>
@@ -75,7 +80,7 @@
 						<!-- loop stafflist -->
 						<tr>
 						<td>{{stafflist' value.jobNumber}}</td>
-						<td><a href="#detail" data-toggle="modal">{{stafflist' value.username}}</a></td>
+						<td><a href="#employeeInfo" node-employeeInfo node-sidKey="{{staffList' value.sidKey}}" data-toggle="modal">{{stafflist' value.username}}</a></td>
 						<td>{{stafflist' value.telephone}}</td>
 						<td>{{stafflist' value.qq}}</td>
 						<td>{{stafflist' value.category}}
@@ -92,44 +97,37 @@
 							实习
 							<!-- elseif {{stafflist' value.nature}}==3 -->
 							试用
+							<!-- elseif {{stafflist' value.nature}}==4 -->
+							离职
 							<!-- endif -->
 							
 						</td>
 						<td>{{stafflist' value.hiredate}}</td>
 						<td>
 						<!-- if {{stafflist' value.pendStatus}}==0 -->
-							<!-- if {{stafflist' value.nature}}==1 -->
-							<a href="#do-dismiss" data-toggle="modal">离职</a>
-							<!-- elseif {{stafflist' value.nature}}==2 -->
+							<!-- if {{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 -->
+							<!-- if {{stafflist' value.nature}}!=4 -->
+							<a href="#do-dismiss" node-TransferDimission node-sidKey="{{stafflist' value.sidKey}}" data-toggle="modal">离职</a>
 							<!-- endif -->
 						<!-- elseif {{stafflist' value.pendStatus}}==2 -->
 							待入职
 						<!-- elseif {{stafflist' value.pendStatus}}==3 -->
 							待离职
+						<!-- elseif {{stafflist' value.pendStatus}}==4 -->
+							<!-- if {{stafflist' value.nature}}==1 -->
+							<a href="#do-dismiss" node-TransferDimission node-sidKey="{{stafflist' value.sidKey}}" data-toggle="modal">离职</a>
+							<!-- elseif {{stafflist' value.nature}}==4 -->
+							<a href="#do-return" node-TransferReentry node-sidKey="{{stafflist' value.sidKey}}" data-toggle="modal">再入职</a>
+							<!-- endif -->
 						<!-- endif -->
 						</td>
 						</tr>
 						<!-- endloop -->
 						
-						<tr><td>Z0002</td><td><a href="#">王五</a></td><td>12345678901</td><td>12345678</td><td>总部/研究中心</td><td>测试</td><td>试用</td><td>2017-05-30</td><td><a href="#do-hire" data-toggle="modal">转正式(点我)</a>&nbsp;<a href="#">离职</a></td></tr>
-						<tr><td>C001</td><td><a href="#">李四</a></td><td>12345678901</td><td>12345678</td><td>总部</td><td>测试</td><td>实习</td><td>2017-05-30</td><td><a href="#do-probation" data-toggle="modal">转试用(点我)</a>&nbsp;<a href="#">离职</a></td></tr>
-						<tr><td>C001</td><td><a href="#">李四</a></td><td>12345678901</td><td></td><td>总部</td><td>测试</td><td>实习</td><td>2017-05-30</td><td>待入职</td></tr>
-						<tr><td>C001</td><td><a href="#">李四</a></td><td>12345678901</td><td></td><td>总部</td><td>测试</td><td>实习</td><td>2017-05-30</td><td>待离职</td></tr>
-						</tbody>
-					</table>
-					<!--离职-->
-					<table class="table table-hover">
-						<tbody>
-						<tr class="thead"><th width="80">工号</th><th>姓名</th><th>手机</th><th>QQ</th><th>办事处/部门</th><th>岗位</th><th>聘用状态</th><th>入职时间</th><th>离职时间</th><th>操作</th></tr>
-						<tr><td>Z0001</td><td><a href="">张三</a></td><td>12345678901</td><td>12345678</td><td>总部</td><td>测试</td><td>正式</td><td>2017-05-30</td><td>2018-01-13</td><td><a href="#do-return" data-toggle="modal">再入职(点我)</a></td></tr>
-						<tr><td>Z0002</td><td><a href="#">王五</a></td><td>12345678901</td><td>12345678</td><td>总部/研究中心</td><td>测试</td><td>试用</td><td>2017-05-30</td><td>2017-06-30</td><td><a href="#">再入职</a></td></tr>
-						</tbody>
-					</table>
 					<!--权限-->
 					<table class="table table-hover">
 						<tbody>
@@ -153,155 +151,27 @@
 			</div>
 		</div>
 	</div>
-	<!--弹出(员工详情)-->
-	<div class="modal hide fade" id="detail">
+	<!--弹出(更新员工信息)-->
+	<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 class="modal-header">
-					<h3>员工详情</h3>
-				</div>
-				<div class="modal-body saeaList" style="overflow:hidden;margin:0">
-					<div class="fL staff-detail-con">
-						<table class="table table-bordered table-condensed">
-						<tbody>
-						<tr>
-							<th class="taC" width="150">工号</th><td width="210">Z0001</td>
-							<th class="taC" width="150">姓名</th><td><input type="text" value="张三"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">办事处/部门</th><td><select><option>总部</option><option>总部-研究中心</option><option>广东办</option></select></td>
-							<th class="taC" width="150">岗位</th><td><input type="text" value="程序员"></td>
-						</tr>
-						<tr>
-							<th class="taC" width="150">入职日期</th><td><input type="date"></td>
-							<th class="taC" width="150">手机</th><td><input type="text" value="1234567890"></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>
-						</tr>
-						<tr>
-							<th class="taC">电话</th><td><input type="text" value="12345678"></td>
-							<th class="taC">邮箱</th><td><input type="text" value="12345678"></td>
-						</tr>
-						</tbody>
-					</table>
-						<table class="table table-bordered table-condensed">
-							<tr>
-								<th class="taC" width="150">性别</th><td width="210"><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>
-							<tr>
-								<th class="taC" width="150">身份证</th><td><input type="text" value="440476528372638192"></td>
-								<th class="taC" width="150">身份证扫描件</th><td><a href="#" target="_blank">正面(国徽)</a><a href="#" target="_blank">反面(照片)</a></td>
-							</tr>
-						</table>
-						<table class="table table-bordered table-condensed">
-							<tr>
-								<th class="taC" width="150">毕业证书</th><td width="210"><a href="#" target="_blank">毕业证书</a></td>
-								<th class="taC" width="150">学位证书</th><td><a href="#" target="_blank">学位证书</a></td>
-							</tr>
-							<tr>
-								<th class="taC" width="150">职称</th><td colspan="3"><a href="#" target="_blank">证书1</a> <a href="#" target="#">证书2</a></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="210"><input type="text"></td>
-								<th class="taC" width="150">紧急联系人</th><td><input type="text"></td>
-							</tr>
-						</table>
-						<table class="table table-bordered table-condensed">
-							<tr>
-								<th class="taC" width="150">汇款人户名</th><td width="210"><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="210"><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>
-					</div>
-					<div class="fL staff-detail-side">
-						<!--入职试用 & 离职后再入职试用-->
-						<div class="infoFlowList">
-						 <div class="dateTitle">
-							 <em class="month"><span class="num">12</span><span class="text">-02</span></em>
-							 <span class="year">2013</span>
-						 </div>
-						 <ul class="flowList">
-							 <li class="item colGray">总部-温秀娟</li>
-							 <li class="item">员工 入职试用</li>
-						 </ul>
-						</div>
-						<div class="infoFlowList">
-						 <div class="dateTitle">
-							 <em class="month"><span class="num">12</span><span class="text">-02</span></em>
-							 <span class="year">2013</span>
-						 </div>
-						 <ul class="flowList">
-							 <li class="item colGray">总部-温秀娟</li>
-							 <li class="item">员工 离职</li>
-						 </ul>
-						</div>
-						<div class="infoFlowList">
-						 <div class="dateTitle">
-							 <em class="month"><span class="num">12</span><span class="text">-02</span></em>
-							 <span class="year">2013</span>
-						 </div>
-						 <ul class="flowList">
-							 <li class="item colGray">总部-温秀娟</li>
-							 <li class="item">员工 试用转正式</li>
-						 </ul>
-						</div>
-						<div class="infoFlowList">
-						 <div class="dateTitle">
-							 <em class="month"><span class="num">9</span><span class="text">-02</span></em>
-							 <span class="year">2013</span>
-						 </div>
-						 <ul class="flowList">
-							 <li class="item colGray">总部-温秀娟</li>
-							 <li class="item">员工 实习转试用</li>
-						 </ul>
-					 	</div>
-						<div class="infoFlowList">
-							 <div class="dateTitle">
-								 <em class="month"><span class="num">8</span><span class="text">-01</span></em>
-								 <span class="year">2013</span>
-							 </div>
-							 <ul class="flowList">
-								 <li class="item colGray">总部-张三</li>
-								 <li class="item">入职实习</li>
-							 </ul>
-						 	</div>
-							<div class="infoFlowList">
-								 <div class="dateTitle">
-									 <em class="month"><span class="num">8</span><span class="text">-01</span></em>
-									 <span class="year">2013</span>
-								 </div>
-								 <ul class="flowList">
-									 <li class="item colGray">总部-温秀娟</li>
-									 <li class="item">添加新员工</li>
-								 </ul>
-							 	</div>
-					</div>
-				</div>
-				<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 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="add-employee">
 		<form  action="/staffAdd" method="post" id="staffAdd" >
@@ -383,6 +253,7 @@
 		</div>
 		</form>
 	</div>
+	
 	<!--弹出(实习转试用)-->
 	<div class="modal hide fade" id="do-probation">
 	<form  action="/staffTransfer" method="post" id="staffTransfer" >
@@ -470,6 +341,8 @@
 	</div>
 	<!--弹出(员工离职)-->
 	<div class="modal hide fade" id="do-dismiss">
+	<form  action="/employeeDismiss" method="post" id="staffDismiss" >
+		<input type="hidden" name="sidKey" id='sidKeyDismiss'  value="">
 		<div class="modal-dialog">
 			<div class="modal-content">
 				<div class="modal-header">
@@ -478,32 +351,37 @@
 				<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="DimissionJobNumber" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">姓名</th><td>张三</td>
+							<th class="taC" width="100">姓名</th><td id="DimissionUsername" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">办事处/部门</th><td>总部</td>
+							<th class="taC" width="100">办事处/部门</th><td id="DimissionCategory"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">岗位</th><td>文员</td>
+							<th class="taC" width="100">岗位</th><td id="DimissionPosition"></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="DimissionHiredate"></span><span class="colGray" id="DimissionHiredate2" ></span></td>
 						</tr>
+						
 					</table>
 					<p class="alert alert-erro">确认该员工离职。</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-return">
+	<form  action="/employeeReentry" method="post" id="staffReentry" >
+		<input type="hidden" name="sidKey" id='sidKeyReentry'  value="">
 		<div class="modal-dialog">
 			<div class="modal-content">
 				<div class="modal-header">
@@ -512,29 +390,32 @@
 				<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="ReentryJobNumber" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">姓名</th><td>张三</td>
+							<th class="taC" width="100">姓名</th><td id="ReentryUsername" ></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">办事处/部门</th><td>总部</td>
+							<th class="taC" width="100">办事处/部门</th><td id="ReentryCategory"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="100">岗位</th><td>文员</td>
+							<th class="taC" width="100">岗位</th><td id="ReentryPosition"></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="ReentryHiredate"></span><span class="colGray" id="ReentryHiredate2" ></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="authority">

+ 6 - 1
protected/view/setting/settingCredentialInfo.html

@@ -33,9 +33,12 @@
 				
 				<!--证件信息-->
 				<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="settingCredentialInfo">
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="150">身份证号码</th><td colspan="3"><input type="text" value="440476528372638192"></td>
+							<th class="taC" width="150">身份证号码</th><td colspan="3"><input type="text" value="{{staff.IDcards}}"></td>
 						</tr>
 						<tr>
 							<th class="taC" width="150">正面(国徽)</th><td width="260"><input type="file"></td>
@@ -88,6 +91,8 @@
 							<button type="submit" class="button">确认修改</button>
 						</div>
 					</div>
+					
+					</form>
 				</div>
 				
 				

+ 14 - 2
protected/view/setting/settingEmployeeInfo.html

@@ -1,4 +1,9 @@
 <!-- include '../header' -->
+<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">
@@ -104,7 +109,11 @@
 					</table>
 					<div class="control-group">
 						<div class="controls">
+							<!-- if {{staff.pendStatus}}!=23 -->
 							<a href="#resignation" data-toggle="modal" class="button fR">离职申请</a>
+							<!-- else -->
+							你已经申请了离职
+							<!-- endif -->
 							<input type="submit" class="button" value="确认修改">
 						</div>
 					</div>
@@ -121,21 +130,24 @@
 	</div>
 	<!--弹出离职申请-->
 	<div class="modal hide fade" id="resignation">
+	<form method="post" action="/appliedDimission" id="appliedDimission" >
 		<div class="modal-dialog">
 			<div class="modal-content">
 				<div class="modal-header">
 					<h3>申请离职</h3>
 				</div>
 				<div class="modal-body saeaList">
-						<textarea style="width:560px" placeholder="简要填写离职原因"></textarea>
+						<textarea style="width:560px" name="dimissionReason" placeholder="简要填写离职原因"></textarea>
 						<p class="alert 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>
 <script type="text/javascript">autoFlashHeight();</script>
 </body>

+ 20 - 9
protected/view/setting/settingFinanceInfo.html

@@ -29,29 +29,39 @@
 				
 				<!--财务信息-->
 				<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="settingFinanceInfo">
 					<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>
+							<th class="taC" width="150">汇款人户名</th>
+							<td width="260"><input type="text" name="remittanceName" value="{{staff.remittanceName}}" ></td>
+							<th class="taC" width="150">联行号</th>
+							<td>
+							<input type="text" name="coupletNumber" value="{{staff.coupletNumber}}">
+							
+							</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>
+							<th class="taC" width="150">汇款开户银行名称</th>
+							<td width="260"><input type="text" name="bankName" value="{{staff.bankName}}"></td>
+							<th class="taC" width="150">汇款帐号</th>
+							<td><input type="text" name="bankNumber" value="{{staff.bankNumber}}"></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="salaryCard" value="{{staff.salaryCard}}"></td>
+							<th class="taC" width="150">开户行</th>
+							<td><input type="text" name="salaryBank" value="{{staff.salaryBank}}"><p class="colGray">请详细至具体支行</p></td>
 						</tr>
 					</table>
 					<div class="control-group">
@@ -59,6 +69,7 @@
 				 			<button type="submit" class="button">确认修改</button>
 						</div>
 					</div>
+					</form>
 				</div>
 
 			</div>