caipin 6 vuotta sitten
vanhempi
commit
fe266f4350
42 muutettua tiedostoa jossa 4094 lisäystä ja 692 poistoa
  1. 34 5
      global/css/global.css
  2. 77 64
      global/js/hr.validator.js
  3. 122 3
      global/js/humanResource.js
  4. 1253 49
      protected/class/receipt.func.php
  5. 13 0
      protected/config/acl.conf.php
  6. 42 3
      protected/config/routes.conf.php
  7. 0 1
      protected/controller/ExpandController.php
  8. 974 191
      protected/controller/HumanResourceController.php
  9. 19 4
      protected/controller/InvoiceController.php
  10. 25 64
      protected/controller/MainController.php
  11. 746 12
      protected/controller/ReceiptController.php
  12. 180 164
      protected/controller/SettingController.php
  13. 1 1
      protected/controller/SoftController.php
  14. 23 0
      protected/model/L_category.php
  15. 12 1
      protected/model/invoice.php
  16. 5 2
      protected/model/invoiceStore.php
  17. 5 0
      protected/model/invoiceTraining.php
  18. 108 7
      protected/model/staff.php
  19. 8 0
      protected/model/staffManage.php
  20. 40 5
      protected/plugin/TemplateTag.php
  21. 1 12
      protected/view/admin/header.html
  22. 2 0
      protected/view/admin/invoiceAS.html
  23. 2 1
      protected/view/admin/invoiceAchieve.html
  24. 5 1
      protected/view/admin/invoiceAggregateCompanyDetail.html
  25. 2 1
      protected/view/admin/invoiceMyUnAccountAchieve.html
  26. 1 1
      protected/view/admin/invoiceReceivablesAS.html
  27. 58 5
      protected/view/admin/invoiceTrainingDetail.html
  28. 11 0
      protected/view/admin/receipt_menu.html
  29. 3 1
      protected/view/admin/staffCollectMonthDetail.html
  30. 4 0
      protected/view/header.html
  31. 1 0
      protected/view/humanResource/employeeApprovals.html
  32. 28 0
      protected/view/humanResource/hr.html
  33. 14 5
      protected/view/humanResource/hrEmployee.html
  34. 20 1
      protected/view/humanResource/hrMenu.html
  35. 1 0
      protected/view/humanResource/leaveOfficeApprovals.html
  36. 74 11
      protected/view/login.html
  37. 4 0
      protected/view/mailMenu.html
  38. 10 7
      protected/view/menu.html
  39. 33 24
      protected/view/setting/settingCredentialInfo.html
  40. 118 32
      protected/view/setting/settingEmployeeInfo.html
  41. 13 13
      protected/view/setting/settingFinanceInfo.html
  42. 2 1
      protected/view/setting/settingMenu.html

+ 34 - 5
global/css/global.css

@@ -130,11 +130,11 @@ a.disenable{color:#ccc}
 }
 @font-face {
   font-family: 'ZHcldSystem';
-  src:  url('fonts/ZHcldSystem.eot?ox6e11');
-  src:  url('fonts/ZHcldSystem.eot?ox6e11#iefix') format('embedded-opentype'),
-    url('fonts/ZHcldSystem.ttf?ox6e11') format('truetype'),
-    url('fonts/ZHcldSystem.woff?ox6e11') format('woff'),
-    url('fonts/ZHcldSystem.svg?ox6e11#ZHcldSystem') format('svg');
+  src:  url('fonts/ZHcldSystem.eot?x90u1c');
+  src:  url('fonts/ZHcldSystem.eot?x90u1c#iefix') format('embedded-opentype'),
+    url('fonts/ZHcldSystem.ttf?x90u1c') format('truetype'),
+    url('fonts/ZHcldSystem.woff?x90u1c') format('woff'),
+    url('fonts/ZHcldSystem.svg?x90u1c#ZHcldSystem') format('svg');
   font-weight: normal;
   font-style: normal;
 }
@@ -3823,6 +3823,7 @@ td div.dlLev3{
   padding:10px 0;
 }
 .tipGray{
+  font-weight: bold;
   padding:0px 5px;
   cursor:pointer;
   background:#f00;
@@ -3844,4 +3845,32 @@ td div.dlLev3{
 }
 .tipConactive{
   display:none;
+}
+.globalNotice-staff{
+  background-clip: padding-box;
+  background-color: #191818;
+  box-shadow: 0 2px 10px  rgba(0, 0, 0, 0.8);
+  right:20px;
+  outline: 0 none;
+  position: fixed;
+  bottom:20px;
+  width:400px;
+  z-index: 1050;
+  color:#fff;
+}
+.globalNotice-staff .item{
+  padding:10px 0 0 10px;
+}
+.globalNotice-staff .entry {
+  border-bottom:1px solid #222222;
+}
+.globalNotice-staff .entry .button{
+  height:38px;
+  line-height:38px;
+  margin:0;
+}
+.alert-warning {
+  color: #856404;
+  background-color: #fff3cd;
+  border-color: #ffeeba;
 }

+ 77 - 64
global/js/hr.validator.js

@@ -1,73 +1,86 @@
-
-$(function () {
-	//添加员工验证
+$(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; '
-	    	,telephone:'mobile'
-		    ,achievementBonus: 'required; '
-	    }
+		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; ',
+			telephone : 'mobile',
+			achievementBonus : 'required; '
+		}
 	});
-	
-	//更新员工验证
-	
+
+	// 更新员工验证
+
 	$('#staffUpdate').validator({
-	    timely: 3,
-	    focusCleanup: true,
-	    
-	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
-	    	
-	    	cid_did:'required;',
-	    	position:'required;'
-	    	,hiredate: 'required; '
-	    	,birthday:'required; '
-		   
-	    }
+		timely : 3,
+		focusCleanup : true,
+
+		fields : {// tel(invoiceCompany);digits(invoiceCompany)
+					// ;remote[/ajaxCheckInvoiceNoUniqueness]'
+
+			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; '
-	    }
+		timely : 3,
+		focusCleanup : true,
+
+		fields : {// tel(invoiceCompany);digits(invoiceCompany)
+					// ;remote[/ajaxCheckInvoiceNoUniqueness]'
+					// wecat:'required;', ,email: 'required; '
+			telephone : 'required;',
+			qq : 'required;',
+			phone : 'required;',
+			gender : 'required; ',
+			birthday : 'required; '
+
+			,
+			qualifications : 'required; ',
+			marriage : 'required; ',
+			nativePlace : 'required; ',
+			emergencyContacts : 'required; ',
+			living : 'required; '
+
+			,
+			nation : 'required; ',
+			graduateInstitutions : 'required; ',
+			major : 'required; ',
+			education : 'required; ',
+			graduationTime : 'required; ',
+			registeredResidence : 'required; ',
+			householdRegistrationType : 'required; ',
+			IDcardsValidity : 'required; ',
+			IDcards : 'required; '
+
+		}
 	});
-	
-	//申请离职验证
+
+	// 申请离职验证
 	$('#appliedDimission').validator({
-	    timely: 3,
-	    focusCleanup: true,
-	    fields: {//tel(invoiceCompany);digits(invoiceCompany)   ;remote[/ajaxCheckInvoiceNoUniqueness]'
-	    	dimissionReason: 'required;',
-	    	
-	    }
+		timely : 3,
+		focusCleanup : true,
+		fields : {// tel(invoiceCompany);digits(invoiceCompany)
+					// ;remote[/ajaxCheckInvoiceNoUniqueness]'
+			dimissionReason : 'required;',
+
+		}
 	});
-	
-	
+
 })

+ 122 - 3
global/js/humanResource.js

@@ -97,6 +97,35 @@ $(function() {
 	});
 	
 	//获得离职审批数据
+	$("a[node-approvalsRegular]").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) {
+					$("#sidKeyRegular").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-approvalsDimission]").click(function(){
 		var sidkey=$(this).attr('node-sidKey');
 		var type='STAFF';
@@ -130,6 +159,8 @@ $(function() {
 		var sidkey=$(this).attr('node-sidKey');
 		var type='EMPLOYEE';
 		
+		
+		
 		var url = "/ajaxGetStaffInfoByType";
 		$.ajax({
 			url : url,
@@ -246,14 +277,14 @@ $(function() {
 			global : true,
 			success : function(data) {
 				if (data.status == 1) {
-				
+					console.log(data);
 					$("#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;
+					if(data.detail.departmentID!=0)
+						cateDepart+="/"+data.detail.department.departmentName;
 					$("#DimissionCategory").html(cateDepart);
 					
 					$("#DimissionPosition").html(data.detail.position);
@@ -361,6 +392,94 @@ $(function() {
 	$('input[node-employeeInfo]').click(function() {
 		window.location.replace("/hrEmployee");
 	});
+	
+	
+	//岗位设置
+	$("a[node-ediPosition]").click(function(){
+		var pidkey=$(this).attr('pidKey');
+		
+		var url = "/ajaxGetPositionByPid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				pidkey : pidkey
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+				
+					
+					$("#pidkeyUpdate").val(data.detail.pidKey);
+					$("#positionNameEdi").val(data.detail.positionName);
+					$("#positionDescribeEdi").val(data.detail.positionDescribe);
+					$("#baseWageEdi").val(data.detail.baseWage);
+					$("#postWageEdi").val(data.detail.postWage);
+					$("#achievementBonusEdi").val(data.detail.achievementBonus);
+					
+					
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	
+	$("a[node-delPosition]").click(function(){
+		var pidkey=$(this).attr('pidKey');
+		
+		var url = "/ajaxGetPositionByPid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				pidkey : pidkey
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					$("#pidkeyDel").val(data.detail.pidKey);
+					$("#delPositionHtml").html("是否删除岗位“"+data.detail.positionName+"“");
+				} else
+					$("div[loading-msg='true']").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	$("a[node-PositionStaff]").click(function(){
+		var pidkey=$(this).attr('pidKey');
+		
+		var url = "/ajaxGetStaffByPid";
+		$.ajax({
+			url : url,
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {
+				pidkey : pidkey
+			},
+			global : true,
+			success : function(data) {
+				if (data.status == 1) {
+					
+					$("#positionStaffHTMl").html(data.html);
+				} else
+					$("#positionStaffHTMl").html("illegal request");
+			},
+			error : function(err) {
+			}
+		});
+	});
+	
+	
 })
 
 function CLEARTUIL(){

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1253 - 49
protected/class/receipt.func.php


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

@@ -309,6 +309,7 @@ $acl ['DIRECTORIES'] ['allow'] = array (
 				'DoAddTagCompany',
 				'ajaxDeleteTag',
 				'ajaxDeleteTagCompany',
+				'remindCL',
 		)
 );
 
@@ -412,6 +413,16 @@ $acl ['RECEIPTS'] ['allow'] = array (
 				'companyMonthCollectDetail',
 				'swfupload',
 				'receiptStatisticsStaffDetail',
+				'payments',
+				'paymentsIncomeDo',
+				'paymentsExpenditureDo',
+				'paymentsAchieve',
+				'ajaxGetPaymentsByAid',
+				'paymentsIncomeUpdateDo',
+				'paymentsExpenditureEdiDo',
+				'paymentsDelDo',
+				'paymentsCollect',
+				'paymentsCollectDay',
 		)
 );
 //人资
@@ -442,6 +453,8 @@ $acl ['HR'] ['allow'] = array (
 				'ajaxGetDistrictByLv1',
 				'hrEmployeeApprovalsSetting',
 				'hrEmployeeAccess',
+				'regularApprovals',
+				'addUserDistrictAuthor',
 				
 		)
 );

+ 42 - 3
protected/config/routes.conf.php

@@ -196,6 +196,19 @@ $route['*']['/swfupload'] = array('ReceiptController', 'swfupload');
 //报销单公司汇总
 $route['*']['/receiptStatisticsStaffDetail'] = array('ReceiptController', 'receiptStatisticsStaffDetail');
 
+//日常收支
+$route['*']['/payments'] = array('ReceiptController', 'payments');
+$route['post']['/paymentsIncomeDo'] = array('ReceiptController', 'paymentsIncomeDo');
+$route['post']['/paymentsExpenditureDo'] = array('ReceiptController', 'paymentsExpenditureDo');
+$route['*']['/paymentsAchieve'] = array('ReceiptController', 'paymentsAchieve');
+$route['*']['/paymentsAchieve/:page/:expensesType'] = array('ReceiptController', 'paymentsAchieve');
+$route['*']['/ajaxGetPaymentsByAid'] = array('ReceiptController', 'ajaxGetPaymentsByAid');
+$route['post']['/paymentsIncomeUpdateDo'] = array('ReceiptController', 'paymentsIncomeUpdateDo');
+$route['post']['/paymentsExpenditureEdiDo'] = array('ReceiptController', 'paymentsExpenditureEdiDo');
+$route['post']['/paymentsDelDo'] = array('ReceiptController', 'paymentsDelDo');
+$route['*']['/paymentsCollect'] = array('ReceiptController', 'paymentsCollect');
+$route['*']['/paymentsCollectDay'] = array('ReceiptController', 'paymentsCollectDay');
+
 
 
 
@@ -531,16 +544,20 @@ $route['*']['/notificationConf'] = array('SettingController', 'notificationConf'
 $route['*']['/ajaxSetNotificationConf'] = array('SettingController', 'ajaxSetNotificationConf');
 $route['post']['/staffUpdate'] = array('SettingController', 'staffUpdate');
 $route['post']['/settingCredentialInfoDo'] = array('SettingController', 'settingCredentialInfoDo');
-$route['post']['/settingCredentialInfoDo3'] = array('SettingController', 'settingCredentialInfoDo3');
-$route['post']['/settingCredentialInfoDo4'] = array('SettingController', 'settingCredentialInfoDo4');
-$route['post']['/settingCredentialInfoDo2'] = array('SettingController', 'settingCredentialInfoDo2');
 
 
 
+$route['post']['/settingCredentialInfoTypeDo/:hunTian'] = array('SettingController', 'settingCredentialInfoTypeDo');
+$route['get']['/delCredentialType/:hunTian/:name'] = array('SettingController', 'delCredentialType');
+
+
 $route['*']['/appliedDimission'] = array('HumanResourceController', 'appliedDimission');
 $route['*']['/employeeDismiss'] = array('HumanResourceController', 'employeeDismiss');
 $route['post']['/employeeReentry'] = array('HumanResourceController', 'employeeReentry');
 
+$route['post']['/appliedRegular'] = array('HumanResourceController', 'appliedRegular');
+
+
 $route['*']['/hrEmployee'] = array('HumanResourceController', 'hrEmployee');
 $route['post']['/staffAdd'] = array('HumanResourceController', 'staffAdd');
 
@@ -557,6 +574,15 @@ $route['post']['/employeeleaveCCAdd'] = array('HumanResourceController', 'employ
 $route['post']['/employeeleaveApprovalsAdd'] = array('HumanResourceController', 'employeeleaveApprovalsAdd');
 $route['post']['/appliedEntry'] = array('HumanResourceController', 'appliedEntry');
 $route['get']['/hr'] = array('HumanResourceController', 'hr');
+
+$route['get']['/regularApprovals'] = array('HumanResourceController', 'regularApprovals');
+$route['post']['/employeRegularApprovalsAdd'] = array('HumanResourceController', 'employeRegularApprovalsAdd');
+$route['post']['/employeRegularCCAdd'] = array('HumanResourceController', 'employeRegularCCAdd');
+
+$route['get']['/promoteApprovals'] = array('HumanResourceController', 'promoteApprovals');
+
+
+
 $route['post']['/ajaxGetStaffInfoByType'] = array('HumanResourceController', 'ajaxGetStaffInfoByType');
 $route['post']['/ajaxGetStaffInfoBySid'] = array('HumanResourceController', 'ajaxGetStaffInfoBySid');
 $route['post']['/ajaxGetDistrictByLv1'] = array('HumanResourceController', 'ajaxGetDistrictByLv1');
@@ -567,6 +593,19 @@ $route['*']['/hrEmployeeApprovalsSetting'] = array('HumanResourceController', 'h
 $route['*']['/hrEmployeeAccess'] = array('HumanResourceController', 'hrEmployeeAccess');
 $route['*']['/addUserDistrictAuthor'] = array('HumanResourceController', 'addUserDistrictAuthor');
 
+//岗位设置
+$route['*']['/position'] = array('HumanResourceController', 'position');
+$route['*']['/positionAdd'] = array('HumanResourceController', 'positionAdd');
+$route['*']['/positionUpdate'] = array('HumanResourceController', 'positionUpdate');
+$route['*']['/positionDelete'] = array('HumanResourceController', 'positionDelete');
+
+
+
+
+
+
+$route['*']['/ajaxGetStaffByPid'] = array('HumanResourceController', 'ajaxGetStaffByPid');
+$route['*']['/ajaxGetPositionByPid'] = array('HumanResourceController', 'ajaxGetPositionByPid');
 
 
 

+ 0 - 1
protected/controller/ExpandController.php

@@ -8,7 +8,6 @@ class ExpandController extends DooController {
 	
 	public $staff;
 	
-	
 	public $nature=array('1'=>'设计',
 						'2'=>'造价管理',
 						'3'=>'业主',

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 974 - 191
protected/controller/HumanResourceController.php


+ 19 - 4
protected/controller/InvoiceController.php

@@ -118,6 +118,13 @@ class InvoiceController extends DooController {
 				$this->ACTION = $uriPartsOrig [1];
 				$this->data ['new'] = $this->isInvoiceNew ();
 				$this->staff = $staff->getUserByIdList ( $_COOKIE ["staff"] );
+				
+				
+				$this->data['isStaffCompleteMsg']=false;
+				$detail = $staff->checkStaffInfoIsComplete ( $_COOKIE ["staff"] );
+				if(!empty($detail))
+					$this->data['isStaffCompleteMsg']=true;
+				
 				return "/";
 			}
 		}
@@ -739,7 +746,7 @@ class InvoiceController extends DooController {
 		$itid = implode ( ',', $itid );
 		$this->data ['itStatist'] = $invoiceTraining->getInvoiceTrainStatistics ( $itid );
 		
-		// print_r($itTodoList);
+		//print_r($itTodoList);
 		
 		$this->data ['trainCount'] = count ( $itTodoList ) + count ( $itedList );
 		$this->data ['itTodoList'] = $itTodoList;
@@ -818,9 +825,17 @@ class InvoiceController extends DooController {
 		
 		if (empty ( $itid ))
 			die ( 'illegal request' );
+			
+		$con=' (b.untreadStatus is null or b.untreadStatus!=2) and ';
+		if ($trainStatus=="SUBED")	
+			$con=' (b.untreadStatus is null ) and ';
+		elseif($trainStatus=="APPROVAL")
+			$con=' ( b.status=1 and b.untreadStatus!=2 ) and ';
+		elseif($trainStatus=="TICKET")
+			$con=' (b.printStatus=1 and b.status=2 and b.untreadStatus!=2) and ';
 		
 		$detail = $invoiceTraining->getInvoiceTrainingByItid ( $itid );
-		$isList = $invoiceStore->getinvoiceStoreByItid ( $itid );
+		$isList = $invoiceStore->getinvoiceStoreByItid ( $itid,$con );
 		// print_r($isList);
 		
 		$trainlist = array ();
@@ -828,7 +843,7 @@ class InvoiceController extends DooController {
 			$irDetail = array ();
 			if ($value ['apStatus'] == 1) {
 				// array_push ( $irDetail, '' );
-				array_push ( $irDetail, '<input class="hide" disabled type="checkbox"  >' );
+				array_push ( $irDetail, '<input  disabled type="checkbox"  >' );
 			} else {
 				
 				array_push ( $irDetail, '<input type="checkbox"  class="hide" id="' . $value ['storeKey'] . '"  name="isBox" value="' . $value ['storeKey'] . '" > <a href="/invoiceStoreEdit/' . $value ['storeKey'] . '.html">编辑</a> 
@@ -4708,7 +4723,7 @@ class InvoiceController extends DooController {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		
-		if (empty ( $iidKey ))
+		if (empty ( $iidKey )||empty($unBundKey))
 			die ( 'illegal request' );
 		
 		$iid = $XDeode->decode ( $iidKey );

+ 25 - 64
protected/controller/MainController.php

@@ -160,68 +160,7 @@ class MainController extends DooController {
 			@header ( "Location: /login" );
 		}
 	}
-	function isMobile() {
-		
-		// 如果有HTTP_X_WAP_PROFILE则一定是移动设备
-		if (isset ( $_SERVER ['HTTP_X_WAP_PROFILE'] )) {
-			return true;
-		}
-		// 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
-		if (isset ( $_SERVER ['HTTP_VIA'] )) {
-			// 找不到为flase,否则为true
-			return stristr ( $_SERVER ['HTTP_VIA'], "wap" ) ? true : false;
-		}
-		// 脑残法,判断手机发送的客户端标志,兼容性有待提高
-		if (isset ( $_SERVER ['HTTP_USER_AGENT'] )) {
-			$clientkeywords = array (
-					'nokia',
-					'sony',
-					'ericsson',
-					'mot',
-					'samsung',
-					'htc',
-					'sgh',
-					'lg',
-					'sharp',
-					'sie-',
-					'philips',
-					'panasonic',
-					'alcatel',
-					'lenovo',
-					'iphone',
-					'ipod',
-					'blackberry',
-					'meizu',
-					'android',
-					'netfront',
-					'symbian',
-					'ucweb',
-					'windowsce',
-					'palm',
-					'operamini',
-					'operamobi',
-					'openwave',
-					'nexusone',
-					'cldc',
-					'midp',
-					'wap',
-					'mobile' 
-			);
-			// 从HTTP_USER_AGENT中查找手机浏览器的关键字
-			if (preg_match ( "/(" . implode ( '|', $clientkeywords ) . ")/i", strtolower ( $_SERVER ['HTTP_USER_AGENT'] ) )) {
-				return true;
-			}
-		}
-		// 协议法,因为有可能不准确,放到最后判断
-		if (isset ( $_SERVER ['HTTP_ACCEPT'] )) {
-			// 如果只支持wml并且不支持html那一定是移动设备
-			// 如果支持wml和html但是wml在html之前则是移动设备
-			if ((strpos ( $_SERVER ['HTTP_ACCEPT'], 'vnd.wap.wml' ) !== false) && (strpos ( $_SERVER ['HTTP_ACCEPT'], 'text/html' ) === false || (strpos ( $_SERVER ['HTTP_ACCEPT'], 'vnd.wap.wml' ) < strpos ( $_SERVER ['HTTP_ACCEPT'], 'text/html' )))) {
-				return true;
-			}
-		}
-		return false;
-	}
+	
 	
 	/**
 	 * 优化actionLog表
@@ -2519,7 +2458,7 @@ class MainController extends DooController {
 		if (! empty ( $cid ))
 			$data ['staffList'] = $staff->getStaffByCid ( $cid );
 		else
-			$data ['staffList'] = $staff->getStaff ();
+			$data ['staffList'] = $staff->getStaff (true);
 		
 		foreach ( $data ['staffList'] as $key => $value ) {
 			if (! empty ( $value ['birthday'] )) {
@@ -3611,6 +3550,8 @@ class MainController extends DooController {
 					'asArray' => TRUE 
 			) );
 			
+			$companyInfo ['address'] = $cInfo ['address'];
+			
 			$companyInfo ['ride'] = $cInfo ['ride'];
 			$companyInfo ['landmarks'] = $cInfo ['landmarks'];
 			$companyInfo ['stay'] = $cInfo ['stay'];
@@ -3904,7 +3845,8 @@ class MainController extends DooController {
 		  					<tr><td colspan="4" >
 		  						<a class="button" style="display:none" node-synadd="true" href="javascript:void(0)">确定同步</a>
 		  							<span node-synAdd="msg" class="bsAlert bsSuccess fL hide"></span>
-		  							<span class="hide" id="skop">已选择 <span id="tl">0</span>/<span id="bl">' . sizeof ( $clientlist ) . '</span></span>
+		  							<span class="hide" id="skop">已选择 <span id="tl">0</span>/<span id="bl">' . sizeof ( $clientlist ) . '</span>
+		  							<input type="checkbox" name="CASYN[]" cas-all="TR" class="hide" value="19595" style="display: inline-block;">全选客户		
 		  						</td>
 		  					</tr>		
 		  							
@@ -3988,6 +3930,25 @@ class MainController extends DooController {
 			$('tr[node-synCom=pany]').show();
 		});
 				
+						
+
+						
+		$(\"input[cas-all='TR']\").click(function() {
+						
+			if (this.checked) {
+				$(\"input[CAS-NUM=TR]:checkbox\").each(function() { 
+							$(this).attr(\"checked\", true);
+						})
+			}else{
+			$(\"input[CAS-NUM=TR]:checkbox\").each(function() { 
+							$(this).attr(\"checked\", false);
+						})
+			}
+						
+						
+			$('#tl').html($('input[CAS-NUM=TR]:checked').length);
+		});
+								
 				
 		$(\"input[CAS-NUM='TR']\").click(function() {
 			$('#tl').html($('input[CAS-NUM=TR]:checked').length);

+ 746 - 12
protected/controller/ReceiptController.php

@@ -148,6 +148,12 @@ class ReceiptController extends DooController {
 				$this->verifyId = $list;
 				$this->staff = $staff->getUserByIdList ( $_COOKIE ["staff"] );
 				
+				// 检测用户信息完成
+				$this->data ['isStaffCompleteMsg'] = false;
+				$detail = $staff->checkStaffInfoIsComplete ( $_COOKIE ["staff"] );
+				if (! empty ( $detail ))
+					$this->data ['isStaffCompleteMsg'] = true;
+				
 				return "/";
 			}
 		}
@@ -366,6 +372,11 @@ class ReceiptController extends DooController {
 			$receipt->verify = $verify;
 			$receipt->executeCopy = $executeDetail ['staff'];
 			$receipt->receiptOrder = "#B" . date ( "Ymd" ) . mt_rand ( 1000, 9999 );
+			
+			
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
 			$receipt->explanation = $explanation;
 			
 			$receipt->remittanceName = $remittanceName;
@@ -606,6 +617,10 @@ class ReceiptController extends DooController {
 			if ($receiptDetail ['status'] != 4 && ! empty ( $verify ))
 				$receipt->verify = $verify;
 			$receipt->executeCopy = $executeDetail ['staff'];
+			
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
 			$receipt->explanation = $explanation;
 			
 			$receipt->remittanceName = $remittanceName;
@@ -1072,6 +1087,16 @@ class ReceiptController extends DooController {
 			$loanReceipt->verify = $verify;
 			
 			$receipt->receiptOrder = $receipt->receiptOrder;
+			
+			//添加HTML换行符
+			//var_dump($explanation);
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
+			
+// 			$explanation=str_replace('\r',"<br/>",$explanation);
+// 			$explanation=str_replace('\r\n',"<br/>",$explanation);
+			
 			$loanReceipt->explanation = $explanation;
 			$loanRid = $loanReceipt->insert ();
 			
@@ -1255,6 +1280,10 @@ class ReceiptController extends DooController {
 			if ($receiptDetail ['status'] != 4)
 				$receipt->verify = $verify;
 			
+				
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
 			$receipt->explanation = $explanation;
 			
 			$receipt->remittanceName = $remittanceName;
@@ -2132,7 +2161,7 @@ class ReceiptController extends DooController {
 					'asArray' => true 
 			) );
 			
-			$receiptLog->rolename = $roleInfo ['name'];
+			//$receiptLog->rolename = $roleInfo ['name'];
 		}
 		
 		$receiptLog->username = $this->staff [0] ['username'];
@@ -3255,6 +3284,7 @@ class ReceiptController extends DooController {
 				}
 			}
 			
+			$FC = $rolename ['name'];
 			$rolename ['name'] = '';
 			if (! empty ( $roleId )) {
 				Doo::loadModel ( 'role' );
@@ -3329,7 +3359,7 @@ class ReceiptController extends DooController {
 					}
 			}
 			$receiptList [$key] ['executeCopy'] = $executeCopy;
-			
+			// print_r($verifyList);
 			$receiptList [$key] ['verifyList'] = $verifyList;
 			$receiptList [$key] ['staffDetail'] = $staff->getOne ( array (
 					'where' => 'sid=' . $value ['staff'],
@@ -3369,6 +3399,22 @@ class ReceiptController extends DooController {
 			) );
 		}
 		
+		$RN = json_decode ( $rolename ['staff'] );
+		
+		//
+		foreach ( $rlList as $key => $value ) {
+			$rlList [$key] ['rolename'] = '';
+			foreach ( $RN as $k => $v ) {
+				$id = explode ( "_", $v );
+				
+				if ($id [0] == $value ['uid']) {
+					
+					$rlList [$key] ['rolename'] = $FC;
+					break;
+				}
+			}
+		}
+		
 		Doo::loadModel ( 'enclosur' );
 		$enclosur = new enclosur ();
 		$enclosurList = $enclosur->find ( array (
@@ -6095,6 +6141,11 @@ class ReceiptController extends DooController {
 			$receipt->executeCopy = $executeDetail ['staff'];
 			
 			$receipt->receiptOrder = "#B" . date ( "Ymd" ) . mt_rand ( 1000, 9999 );
+			
+			
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
 			$receipt->explanation = $explanation;
 			
 			$receipt->remittanceName = $remittanceName;
@@ -6475,6 +6526,10 @@ class ReceiptController extends DooController {
 				$receipt->verify = $verify;
 			$receipt->executeCopy = $executeDetail ['staff'];
 			
+			
+			$order=array("\r\n","\n","\r");
+			$replace='<br/>';
+			$explanation=str_replace($order,$replace,$explanation);
 			$receipt->explanation = $explanation;
 			
 			$receipt->remittanceName = $remittanceName;
@@ -6651,7 +6706,7 @@ class ReceiptController extends DooController {
 					'asArray' => true 
 			) );
 			
-			$receiptLog->rolename = $roleInfo ['name'];
+			//$receiptLog->rolename = $roleInfo ['name'];
 		}
 		
 		$receiptLog->username = $this->staff [0] ['username'];
@@ -9909,6 +9964,654 @@ class ReceiptController extends DooController {
 		
 		$this->render ( "/admin/saeaStaffCollect", $data );
 	}
+	/**
+	 * 日常收支
+	 */
+	function payments() {
+		Doo::loadModel ( "accountBook" );
+		$accountBook = new accountBook ();
+		
+		Doo::loadModel ( "accountBookStatistics" );
+		$accountBookStatistics = new accountBookStatistics ();
+		
+		$statisticsList = $accountBookStatistics->getStatisticsByMonth ();
+		
+		$list = $accountBook->getAccountBookByLimit ( 10 );
+		
+		$data ['statisticsList'] = $statisticsList;
+		$data ['list'] = $list;
+		$data ['memu'] = "receipt";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'payments';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/expenses/payments", $data );
+	}
+	/**
+	 * 添加收入
+	 * @return string
+	 */
+	function paymentsIncomeDo() {
+		$accountType = $this->get_args ( 'accountType' ) ? $this->get_args ( 'accountType' ) : "";
+		$accountMsg = $this->get_args ( 'accountMsg' . $accountType ) ? $this->get_args ( 'accountMsg' . $accountType ) : "";
+		$receivedPrice = is_numeric ( $this->get_args ( 'receivedPrice' ) ) ? $this->get_args ( 'receivedPrice' ) : 0;
+		
+		$receivedMsg = $this->get_args ( 'receivedMsg' ) ? $this->get_args ( 'receivedMsg' ) : '';
+		$receivedBank = $this->get_args ( 'receivedBank' ) ? $this->get_args ( 'receivedBank' ) : '';
+		$receivedDate = $this->get_args ( 'receivedDate' ) ? $this->get_args ( 'receivedDate' ) : '';
+		
+		$remarks = $this->get_args ( 'remarks' ) ? $this->get_args ( 'remarks' ) : '';
+		
+		if (! empty ( $accountType ) && ! empty ( $receivedPrice ) && ! empty ( $receivedMsg ) && ! empty ( $receivedBank ) && ! empty ( $receivedDate )) {
+			
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			
+			Doo::loadModel ( "accountBook" );
+			$accountBook = new accountBook ();
+			
+			$accountBook->accountType = $accountType;
+			$accountBook->accountMsg = $accountMsg;
+			$accountBook->receivedPrice = $receivedPrice;
+			$accountBook->receivedMsg = $receivedMsg;
+			$accountBook->receivedBank = $receivedBank;
+			$accountBook->receivedDate = $receivedDate;
+			$accountBook->remarks = $remarks;
+			$accountBook->expensesType = 1;
+			
+			$accountBook->bookSerial = "#IN" . date ( "Ymd" ) . mt_rand ( 1000, 9999 );
+			$accountBook->inputDate = date ( "Y-m-d H:i:s" );
+			$id = $accountBook->insert ();
+			
+			//
+			$abDetail = $accountBook->getAccountBookByAid ( $id );
+			Doo::loadModel ( "accountBookStatistics" );
+			$accountBookStatistics = new accountBookStatistics ();
+			$item = array (
+					'date' => date ( "Y-m-d" ),
+					'accountType' => $abDetail ['accountType'],
+					'accountMsg' => $abDetail ['accountMsg'],
+					'aid' => $abDetail ['aid'] 
+			);
+			
+			if ($abDetail ['expensesType'] == 1) {
+				if ($abDetail ['accountType'] == 7) {
+					$item += array (
+							'financingPrice' => - $receivedPrice,
+							'expensesType' => 3 
+					);
+				} else if ($abDetail ['accountType'] == 8) {
+					$item += array (
+							'inComePrice' => - $abDetail ['receivedPrice'],
+							'expensesType' => $abDetail ['expensesType'] 
+					);
+				} else {
+					$item += array (
+							'inComePrice' => $abDetail ['receivedPrice'],
+							'expensesType' => $abDetail ['expensesType'] 
+					);
+				}
+			}
+			$accountBookStatistics->setAccountBookStatistics ( $item );
+		}
+		return '/payments';
+	}
+	/**
+	 * 添加支出
+	 */
+	function paymentsExpenditureDo() {
+		$expenditureType = $this->get_args ( 'expenditureType' ) ? $this->get_args ( 'expenditureType' ) : "";
+		$expenditureMsg = $this->get_args ( 'expenditureMsg' . $expenditureType ) ? $this->get_args ( 'expenditureMsg' . $expenditureType ) : "";
+		
+		$expenditurePrice = is_numeric ( $this->get_args ( 'expenditurePrice' ) ) ? $this->get_args ( 'expenditurePrice' ) : 0;
+		$expenditureBank = $this->get_args ( 'expenditureBank' ) ? $this->get_args ( 'expenditureBank' ) : '';
+		
+		$remarks = $this->get_args ( 'remarks' ) ? $this->get_args ( 'remarks' ) : '';
+		$expenditureDate = $this->get_args ( 'expenditureDate' ) ? $this->get_args ( 'expenditureDate' ) : '';
+		
+		if (! empty ( $expenditureType ) && ! empty ( $expenditurePrice ) && ! empty ( $expenditureBank ) && ! empty ( $expenditureDate )) {
+			
+			Doo::loadModel ( "accountBook" );
+			$accountBook = new accountBook ();
+			
+			$accountBook->expenditureType = $expenditureType;
+			$accountBook->expenditureMsg = $expenditureMsg;
+			$accountBook->expenditurePrice = $expenditurePrice;
+			$accountBook->expenditureBank = $expenditureBank;
+			
+			$accountBook->expenditureDate = $expenditureDate;
+			
+			$accountBook->remarks = $remarks;
+			
+			$accountBook->expensesType = 2;
+			
+			$accountBook->bookSerial = "#IN" . date ( "Ymd" ) . mt_rand ( 1000, 9999 );
+			$accountBook->inputDate = date ( "Y-m-d H:i:s" );
+			
+			$id = $accountBook->insert ();
+			
+			//
+			$abDetail = $accountBook->getAccountBookByAid ( $id );
+			Doo::loadModel ( "accountBookStatistics" );
+			$accountBookStatistics = new accountBookStatistics ();
+			
+			$item = array (
+					'date' => date ( "Y-m-d" ),
+					'expenditureType' => $abDetail ['expenditureType'],
+					'expenditureMsg' => $abDetail ['expenditureMsg'],
+					'aid' => $abDetail ['aid'] 
+			);
+			
+			if ($abDetail ['expensesType'] == 2) {
+				
+				if ($abDetail ['expenditureType'] == 4) {
+					$item += array (
+							'financingPrice' => $expenditurePrice,
+							'expensesType' => 3 
+					);
+				} elseif ($abDetail ['expenditureType'] == 5) {
+					$item += array (
+							'payPrice' => $abDetail ['expenditurePrice'],
+							'expensesType' => $abDetail ['expensesType'] 
+					);
+				} else {
+					$item += array (
+							'payPrice' => $abDetail ['expenditurePrice'],
+							'expensesType' => $abDetail ['expensesType'] 
+					);
+				}
+			}
+			
+			$accountBookStatistics->setAccountBookStatistics ( $item );
+		}
+		return '/payments';
+	}
+	
+	/**
+	 * 所有收支
+	 */
+	function paymentsAchieve() {
+		$page_size = 12;
+		$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
+		$expensesType = isset ( $this->params ['expensesType'] ) ? $this->params ['expensesType'] : 'ALL';
+		
+		$date = $this->get_args ( 'inputDate' ) ? $this->get_args ( 'inputDate' ) : "";
+		$price = $this->get_args ( 'price' ) ? $this->get_args ( 'price' ) : "";
+		
+		$accountType = $this->get_args ( 'accountType' ) ? $this->get_args ( 'accountType' ) : "1";
+		$accountMsg = $this->get_args ( 'accountMsg' . $accountType ) ? $this->get_args ( 'accountMsg' . $accountType ) : "";
+		
+		$expenditureType = $this->get_args ( 'expenditureType' ) ? $this->get_args ( 'expenditureType' ) : "1";
+		$submitType = $this->get_args ( 'submitType' ) ? $this->get_args ( 'submitType' ) : "";
+		
+		Doo::loadModel ( "accountBookStatistics" );
+		$accountBookStatistics = new accountBookStatistics ();
+		
+		$statisticsList = $accountBookStatistics->getStatisticsByMonth ();
+		
+		$data ['statisticsList'] = $statisticsList;
+		
+		Doo::loadModel ( "accountBook" );
+		$accountBook = new accountBook ();
+		
+		$con = '';
+		if ($expensesType == 'INCOME')
+			$con = ' and expensesType=1 ';
+		elseif ($expensesType == 'PAY')
+			$con = ' and expensesType=2 ';
+		
+		$dateArr = explode ( ':', $date );
+		$D1 = $dateString = '';
+		$D2 = '';
+		if (! empty ( $date )) {
+			$D1 = $dateArr [0];
+			if (isset ( $dateArr [1] ))
+				$D2 = $dateArr [1];
+			else
+				$D2 = '';
+			$dateString = $D1 . " : " . $D2;
+		}
+		if (! empty ( $D1 ) && ! empty ( $D2 ))
+			$con .= ' and inputDate BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
+		elseif (! empty ( $D1 ) && empty ( $D2 ))
+			$con .= ' and inputDate like "%' . $D1 . '%"  ';
+		
+		if (! empty ( $price ))
+			$con .= ' and (receivedPrice=' . $price . ' or expenditurePrice=' . $price . ')';
+		
+		if ($submitType == 1) {
+			$expenditureType = '';
+			$con .= ' and accountType=' . $accountType;
+			if (! empty ( $accountMsg ))
+				$con .= ' and (accountType=' . $accountType . ' and accountMsg like "%' . $accountMsg . '%")';
+		} elseif ($submitType == 2) {
+			$accountType = $accountMsg = '';
+			$con .= ' and expenditureType=' . $expenditureType;
+		} else {
+			$accountType = $accountMsg = $expenditureType = '';
+		}
+		
+		$sql = "" . $con;
+		$action = "paymentsAchieve";
+		$get = ''; // "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
+		
+		$pageinfo = $this->get_page ( "CLD_accountBook", $sql, $page, $page_size, $action, $get, "" );
+		$limit = $pageinfo ['lower'] . ',' . $page_size;
+		$list = $accountBook->getAccountBookBySql ( $limit, $sql, 'desc' );
+		
+		$data ['expenditureType'] = $expenditureType;
+		$data ['accountMsg'] = $accountMsg;
+		$data ['accountType'] = $accountType;
+		$data ['inputDate'] = $date;
+		$data ['price'] = $price;
+		$data ['expensesType'] = $expensesType;
+		$data ['page'] = $pageinfo;
+		$data ['list'] = $list;
+		$data ['memu'] = "receipt";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'payments';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/expenses/paymentsAchieve", $data );
+	}
+	function paymentsIncomeUpdateDo() {
+		$aidKey = $this->get_args ( 'aidKey' ) ? $this->get_args ( 'aidKey' ) : "";
+		
+		$accountType = $this->get_args ( 'accountType' ) ? $this->get_args ( 'accountType' ) : "";
+		$accountMsg = $this->get_args ( 'accountMsg' . $accountType ) ? $this->get_args ( 'accountMsg' . $accountType ) : "";
+		$receivedPrice = is_numeric ( $this->get_args ( 'receivedPrice' ) ) ? $this->get_args ( 'receivedPrice' ) : 0;
+		
+		$receivedMsg = $this->get_args ( 'receivedMsg' ) ? $this->get_args ( 'receivedMsg' ) : '';
+		$receivedBank = $this->get_args ( 'receivedBank' ) ? $this->get_args ( 'receivedBank' ) : '';
+		$receivedDate = $this->get_args ( 'receivedDate' ) ? $this->get_args ( 'receivedDate' ) : '';
+		
+		$remarks = $this->get_args ( 'remarks' ) ? $this->get_args ( 'remarks' ) : '';
+		
+		if (! empty ( $aidKey ) && ! empty ( $accountType ) && ! empty ( $receivedPrice ) && ! empty ( $receivedMsg ) && ! empty ( $receivedBank ) && ! empty ( $receivedDate )) {
+			
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			
+			$aid = $XDeode->decode ( $aidKey );
+			
+			Doo::loadModel ( "accountBook" );
+			$accountBook = new accountBook ();
+			
+			//
+			$abDetail = $accountBook->getAccountBookByAid ( $aid );
+			
+			$price = $receivedPrice - $abDetail [inComePrice];
+			Doo::loadModel ( "accountBookStatistics" );
+			$accountBookStatistics = new accountBookStatistics ();
+			
+			if ($abDetail ['accountType'] == 7) {
+				$item += array (
+						'date' => date ( "Y-m-d" ),
+						'financingPrice' => - $price,
+						'expensesType' => 3,
+						'aid' => $abDetail ['aid'] 
+				);
+			} elseif ($abDetail ['accountType'] == 8) {
+				$item += array (
+						'date' => date ( "Y-m-d" ),
+						'expensesType' => $abDetail ['expensesType'],
+						'inComePrice' => - $price,
+						'aid' => $abDetail ['aid'] 
+				);
+			} else {
+				
+				$item = array (
+						'date' => date ( "Y-m-d" ),
+						'expensesType' => $abDetail ['expensesType'],
+						'inComePrice' => $price,
+						'aid' => $abDetail ['aid'] 
+				);
+			}
+			$accountBookStatistics->setAccountBookStatistics ( $item );
+			
+			$accountBook->accountType = $accountType;
+			$accountBook->accountMsg = $accountMsg;
+			$accountBook->receivedPrice = $receivedPrice;
+			$accountBook->receivedMsg = $receivedMsg;
+			$accountBook->receivedBank = $receivedBank;
+			$accountBook->receivedDate = $receivedDate;
+			$accountBook->remarks = $remarks;
+			
+			$accountBook->aid = $aid;
+			
+			$accountBook->update ();
+		}
+		return '/paymentsAchieve';
+	}
+	function paymentsExpenditureEdiDo() {
+		$aidKey = $this->get_args ( 'aidKey' ) ? $this->get_args ( 'aidKey' ) : "";
+		$expenditureType = $this->get_args ( 'expenditureType' ) ? $this->get_args ( 'expenditureType' ) : "";
+		$expenditureMsg = $this->get_args ( 'expenditureMsg' . $expenditureType ) ? $this->get_args ( 'expenditureMsg' . $expenditureType ) : "";
+		
+		$expenditurePrice = is_numeric ( $this->get_args ( 'expenditurePrice' ) ) ? $this->get_args ( 'expenditurePrice' ) : 0;
+		$expenditureBank = $this->get_args ( 'expenditureBank' ) ? $this->get_args ( 'expenditureBank' ) : '';
+		
+		$remarks = $this->get_args ( 'remarks' ) ? $this->get_args ( 'remarks' ) : '';
+		$expenditureDate = $this->get_args ( 'expenditureDate' ) ? $this->get_args ( 'expenditureDate' ) : '';
+		
+		if (! empty ( $aidKey ) && ! empty ( $expenditureType ) && ! empty ( $expenditurePrice ) && ! empty ( $expenditureBank ) && ! empty ( $expenditureDate )) {
+			
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			
+			$aid = $XDeode->decode ( $aidKey );
+			
+			Doo::loadModel ( "accountBook" );
+			$accountBook = new accountBook ();
+			
+			// 汇总信息
+			$abDetail = $accountBook->getAccountBookByAid ( $aid );
+			
+			$price = $expenditurePrice - $abDetail [expenditurePrice];
+			Doo::loadModel ( "accountBookStatistics" );
+			$accountBookStatistics = new accountBookStatistics ();
+			
+			if ($abDetail ['expenditureType'] == 4) {
+				$item += array (
+						'date' => date ( "Y-m-d" ),
+						'financingPrice' => $price,
+						'expensesType' => 3,
+						'aid' => $abDetail ['aid'] 
+				);
+			} elseif ($abDetail ['expenditureType'] == 5) {
+				$item += array (
+						'date' => date ( "Y-m-d" ),
+						'expensesType' => $abDetail ['expensesType'],
+						'payPrice' => $price,
+						'aid' => $abDetail ['aid'] 
+				);
+			} else {
+				
+				$item = array (
+						'date' => date ( "Y-m-d" ),
+						'expensesType' => $abDetail ['expensesType'],
+						'payPrice' => $price,
+						'aid' => $abDetail ['aid'] 
+				);
+			}
+			
+			$accountBookStatistics->setAccountBookStatistics ( $item );
+			
+			//
+			$accountBook->expenditureType = $expenditureType;
+			$accountBook->expenditureMsg = $expenditureMsg;
+			$accountBook->expenditurePrice = $expenditurePrice;
+			$accountBook->expenditureBank = $expenditureBank;
+			
+			$accountBook->remarks = $remarks;
+			$accountBook->expenditureDate = $expenditureDate;
+			
+			$accountBook->aid = $aid;
+			
+			$id = $accountBook->update ();
+		}
+		return '/paymentsAchieve';
+	}
+	function paymentsDelDo() {
+		$aidKey = $this->get_args ( 'aidKey' ) ? $this->get_args ( 'aidKey' ) : "";
+		if (! empty ( $aidKey )) {
+			
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			
+			$aid = $XDeode->decode ( $aidKey );
+			
+			Doo::loadModel ( "accountBook" );
+			$accountBook = new accountBook ();
+			
+			$abDetail = $accountBook->getAccountBookByAid ( $aid );
+			
+			// 删除收支
+			Doo::loadModel ( "accountBookStatistics" );
+			$accountBookStatistics = new accountBookStatistics ();
+			$item = array (
+					'date' => date ( "Y-m-d" ),
+					'aid' => $abDetail ['aid'] 
+			);
+			
+			if ($abDetail ['expensesType'] == 1) {
+				
+				if ($abDetail ['accountType'] != 7) {
+					$item += array (
+							'expensesType' => $abDetail ['expensesType'],
+							'inComePrice' => - $abDetail ['receivedPrice'] 
+					);
+				} else {
+					$item += array (
+							'financingPrice' => $abDetail ['receivedPrice'],
+							'expensesType' => 3 
+					);
+				}
+			} elseif ($abDetail ['expensesType'] == 2) {
+				
+				if ($abDetail ['accountType'] != 7) {
+					$item += array (
+							'expensesType' => $abDetail ['expensesType'],
+							'payPrice' => - $abDetail ['expenditurePrice'] 
+					);
+				} else {
+					$item += array (
+							'financingPrice' => - $abDetail ['expenditurePrice'],
+							'expensesType' => 3 
+					);
+				}
+			}
+			$accountBookStatistics->setAccountBookStatistics ( $item );
+			
+			$accountBook->delete ( array (
+					'where' => 'aid=' . $aid,
+					'limit' => 1 
+			) );
+		}
+		return '/paymentsAchieve';
+	}
+	function paymentsCollect() {
+		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
+		$moth = $this->get_args ( 'moth' ) ? $this->get_args ( 'moth' ) : "";
+		
+		Doo::loadModel ( "accountBookStatistics" );
+		$accountBookStatistics = new accountBookStatistics ();
+		
+		Doo::loadClass ( 'receipt.func' );
+		$statisticsIncome = $accountBookStatistics->getStatisticsByCollect ( $year );
+		$html = _getPaymentsCollectByYearHtml ( $statisticsIncome );
+		$data ['html'] = $html ['html'];
+		$data ['inSum'] = $html ['sum'];
+		
+		$statisticsPay = $accountBookStatistics->getStatisticsByCollect ( $year, 2 );
+		$html = _getPaymentsCollectPayByYearHtml ( $statisticsPay );
+		$data ['payHtml'] = $html ['html'];
+		$data ['paySum'] = $html ['sum'];
+		
+		// 余额
+		$inComePay = $accountBookStatistics->getStatisticsByBalance ( $year, 1 );
+		$pay = $accountBookStatistics->getStatisticsByBalance ( $year, 2 );
+		
+		$inComeHtml = '<tr><th colspan="2">收入</th>';
+		$payHtml = '<tr class="colRed"><th colspan="2">支出</th>';
+		$BalanceHtml = '<tr><th colspan="2">余额</th>';
+		$inSum = $paySum = $balanceSum = 0;
+		$balanceC = 0;
+		
+		for($i = 1; $i <= 12; $i ++) {
+			$inComeA = $payB = 0;
+			$falg = true;
+			foreach ( $inComePay as $key => $value ) {
+				if ($value ['month'] == $i) {
+					$falg = false;
+					$inComeHtml .= '<td class="taR">' . $value ['inComePrice'] . '</td>';
+					$inSum += $value ['inComePrice'];
+					$inComeA = $value ['inComePrice'];
+					break;
+				}
+			}
+			if ($falg)
+				$inComeHtml .= '<td class="taR">-</td>';
+			
+			$payFalg = true;
+			foreach ( $pay as $key => $value ) {
+				if ($value ['month'] == $i) {
+					$payFalg = false;
+					$payHtml .= '<td class="taR">' . $value ['payPrice'] . '</td>';
+					$paySum += $value ['payPrice'];
+					$payB = $value ['payPrice'];
+					break;
+				}
+			}
+			if ($payFalg)
+				$payHtml .= '<td class="taR">-</td>';
+			
+			$balanceC = $balanceC + $inComeA - $payB;
+			$balanceSum += $balanceC;
+			if (empty ( $balanceC ))
+				$BalanceHtml .= '<td class="taR">-</td>';
+			else
+				$BalanceHtml .= '<td class="taR">' . $balanceC . '</td>';
+		}
+		$inComeHtml .= '<td class="taR colGreen">¥' . $inSum . '</td></tr>';
+		$data ['inComeHtml'] = $inComeHtml;
+		$payHtml .= '<td class="taR ">¥' . $paySum . '</td></tr>';
+		$data ['payBalanceHtml'] = $payHtml;
+		
+		$BalanceHtml .= '<td class="taR ">¥' . $balanceC . '</td></tr>';
+		$data ['BalanceHtml'] = $BalanceHtml;
+		
+		$mothHtml = "";
+		for($i = 1; $i <= 12; $i ++) {
+			if ($moth == $i)
+				$mothHtml .= '<option selected value="' . $i . '">' . $i . '月</option>';
+			else
+				$mothHtml .= '<option value="' . $i . '">' . $i . '月</option>';
+		}
+		
+		$data ['mothHtml'] = $mothHtml;
+		
+		$data ['year'] = $year;
+		
+		$data ['memu'] = "receipt";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'paymentsCollect';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/expenses/paymentsCollect", $data );
+	}
+	function paymentsCollectDay() {
+		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
+		$moth = $this->get_args ( 'month' ) ? $this->get_args ( 'month' ) : date ( "m" );
+		
+		Doo::loadModel ( "accountBookStatistics" );
+		$accountBookStatistics = new accountBookStatistics ();
+		
+		$i = 2;
+		$y = 2013;
+		$day = date ( "t", strtotime ( "$year-$moth" ) );
+		
+		Doo::loadClass ( 'receipt.func' );
+		$statisticsIncome = $accountBookStatistics->getStatisticsByCollectDay ( $year, 1, $moth );
+		
+		$html = _getPaymentsCollectByDayHtml ( $statisticsIncome, $day );
+		$data ['html'] = $html ['html'];
+		$data ['inSum'] = $html ['sum'];
+		
+		$statisticsPay = $accountBookStatistics->getStatisticsByCollectDay ( $year, 2, $moth );
+		$html = _getPaymentsCollectPayByDayHtml ( $statisticsPay, $day );
+		$data ['payHtml'] = $html ['html'];
+		$data ['paySum'] = $html ['sum'];
+		
+		$mothHtml = "";
+		for($i = 1; $i <= 12; $i ++) {
+			if ($moth == $i)
+				$mothHtml .= '<option selected value="' . $i . '">' . $i . '月</option>';
+			else
+				$mothHtml .= '<option value="' . $i . '">' . $i . '月</option>';
+		}
+		$data ['mothHtml'] = $mothHtml;
+		$data ['year'] = $year;
+		
+		
+		// 余额
+		$inComePay = $accountBookStatistics->getStatisticsByBalance ( $year, 1,$moth );
+		$pay = $accountBookStatistics->getStatisticsByBalance ( $year, 2,$moth );
+		
+		$inComeHtml = '<tr><th colspan="2">收入</th>';
+		$payHtml = '<tr class="colRed"><th colspan="2">支出</th>';
+		$BalanceHtml = '<tr><th colspan="2">余额</th>';
+		$dayHtml='<tr><th class="taC" colspan="2">余额</th>';
+		$inSum = $paySum = $balanceSum = 0;
+		$balanceC = 0;
+		
+		for($i = 1; $i <= $day; $i ++) {
+			$dayHtml.='<td class="taC">' . $i . '日</td>';
+			$inComeA = $payB = 0;
+			$falg = true;
+			foreach ( $inComePay as $key => $value ) {
+				if ($value ['day'] == $i) {
+					$falg = false;
+					$inComeHtml .= '<td class="taR">' . $value ['inComePrice'] . '</td>';
+					$inSum += $value ['inComePrice'];
+					$inComeA = $value ['inComePrice'];
+					break;
+				}
+			}
+			if ($falg)
+				$inComeHtml .= '<td class="taR">-</td>';
+			
+			$payFalg = true;
+			foreach ( $pay as $key => $value ) {
+				if ($value ['day'] == $i) {
+					$payFalg = false;
+					$payHtml .= '<td class="taR">' . $value ['payPrice'] . '</td>';
+					$paySum += $value ['payPrice'];
+					$payB = $value ['payPrice'];
+					break;
+				}
+			}
+			if ($payFalg)
+				$payHtml .= '<td class="taR">-</td>';
+			
+			$balanceC = $balanceC + $inComeA - $payB;
+			$balanceSum += $balanceC;
+			if (empty ( $balanceC ))
+				$BalanceHtml .= '<td class="taR">-</td>';
+			else
+				$BalanceHtml .= '<td class="taR">' . $balanceC . '</td>';
+		}
+		$inComeHtml .= '<td class="taR colGreen">¥' . $inSum . '</td></tr>';
+		$data ['inComeHtml'] = $inComeHtml;
+		$payHtml .= '<td class="taR ">¥' . $paySum . '</td></tr>';
+		$data ['payBalanceHtml'] = $payHtml;
+		
+		$BalanceHtml .= '<td class="taR ">¥' . $balanceC . '</td></tr>';
+		$data ['BalanceHtml'] = $BalanceHtml;
+		$dayHtml.='<td class="taR ">总计</td></tr>';
+		$data['dayHtml']=$dayHtml;
+		
+		
+		
+		$data ['memu'] = "receipt";
+		$data ['staff'] = $this->staff;
+		$data ['receiptMemu'] = 'paymentsCollect';
+		$data ['verifyId'] = $this->verifyId;
+		$data ['executeId'] = $this->executeId;
+		$this->render ( "/expenses/paymentsCollectDay", $data );
+	}
+	function ajaxGetPaymentsByAid() {
+		$serial = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
+		Doo::loadModel ( "accountBook" );
+		$accountBook = new accountBook ();
+		
+		$detail = $accountBook->getAccountBookByAid ( $serial );
+		
+		echo json_encode ( array (
+				'status' => 1,
+				'detail' => $detail 
+		) );
+	}
 	function lyt() {
 		Doo::loadModel ( "receiptDetail" );
 		$receiptDetail = new receiptDetail ();
@@ -10003,6 +10706,7 @@ class ReceiptController extends DooController {
 			$p7 = 0;
 			$p8 = 0;
 			$p9 = 0;
+			$p10 = 0;
 			$t1 = 0;
 			$t2 = 0;
 			$t3 = 0;
@@ -10167,7 +10871,9 @@ class ReceiptController extends DooController {
 								'餐饮费',
 								'办公费',
 								'公关费',
-								'其他' 
+								'其他',
+								'电话费',
+								'邮寄费' 
 						);
 						foreach ( $item as $va ) {
 							$falg = true;
@@ -10193,6 +10899,11 @@ class ReceiptController extends DooController {
 										if ($va == '其他')
 											$p8 += $v ['price'];
 										
+										if ($va == '电话费')
+											$p9 += $v ['price'];
+										if ($va == '邮寄费')
+											$p10 += $v ['price'];
+										
 										$psum += $v ['price'];
 										$html .= '<td class="taR">' . $v ['price'] . '</td>';
 										$falg = false;
@@ -10286,7 +10997,7 @@ class ReceiptController extends DooController {
 		  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
 						$receiptL ['差旅相关费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td>
 		  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
-						$receiptL ['培训班费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>
+						$receiptL ['培训班费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>
 		  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
 						$receiptL ['其他'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
 						$receiptL ['报销金额调整'] = '<td class="taR colOrange">-</td>';
@@ -10315,7 +11026,7 @@ class ReceiptController extends DooController {
 			$receiptL ['差旅相关费用'] = '<td class="colGreen taR">' . $c6 . '</td><td class="taR">' . $c1 . '</td>
 		  						<td class="taR">' . $c2 . '</td><td class="taR">' . $c3 . '</td><td class="taR">' . $c4 . '</td><td class="taR">' . $c5 . '</td>';
 			$receiptL ['培训班费用'] = '<td class="colGreen taR">' . $p9 . '</td><td class="taR">' . $p1 . '</td><td class="taR">' . $p2 . '</td><td class="taR">' . $p3 . '</td><td class="taR">' . $p4 . '</td>
-		  						<td class="taR">' . $p5 . '</td><td class="taR">' . $p6 . '</td><td class="taR">' . $p7 . '</td><td class="taR">' . $p8 . '</td>';
+		  						<td class="taR">' . $p5 . '</td><td class="taR">' . $p6 . '</td><td class="taR">' . $p7 . '</td><td class="taR">' . $p8 . '</td><td class="taR">' . $p9 . '</td><td class="taR">' . $p10 . '</td>';
 			$receiptL ['其他'] = '<td class="colGreen taR">' . $t5 . '</td><td class="taR">' . $t1 . '</td><td class="taR">' . $t2 . '</td><td class="taR">' . $t3 . '</td><td class="taR">' . $t4 . '</td>';
 			$receiptL ['报销金额调整'] = '<td class="taR colOrange">' . $s1 . '</td>';
 			$receiptL ['monthStaffPrice'] = '<td><b>¥' . $m1 . '</b></td>';
@@ -11642,7 +12353,10 @@ class ReceiptController extends DooController {
 					'广告费',
 					'团队建设费',
 					'物业管理费',
-					'宽带费' 
+					'宽带费',
+					'人员薪酬',
+					'公积金',
+					'社保' 
 			);
 			foreach ( $item as $value ) {
 				$falg = true;
@@ -11710,7 +12424,9 @@ class ReceiptController extends DooController {
 					'餐饮费',
 					'办公费',
 					'公关费',
-					'其他' 
+					'其他',
+					'电话费',
+					'邮寄费' 
 			);
 			foreach ( $item as $value ) {
 				$falg = true;
@@ -11783,12 +12499,30 @@ class ReceiptController extends DooController {
 			$receiptL ['报销金额调整'] = $psum . $html;
 		} else {
 			
-			$receiptL ['日常相关费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>
-	  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
+			$receiptL ['日常相关费用'] = '<td class="colGreen taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+	  				<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>';
 			$receiptL ['差旅相关费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td>
 	  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
-			$receiptL ['培训班费用'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>
-	  						<td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
+			$receiptL ['培训班费用'] = '<td class="colGreen taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+	  				<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>
+					<td class="taR">-</td>';
 			$receiptL ['其他'] = '<td class="colGreen taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td><td class="taR">-</td>';
 			$receiptL ['报销金额调整'] = '<td class="taR colOrange">-</td>';
 		}

+ 180 - 164
protected/controller/SettingController.php

@@ -4,9 +4,7 @@
  * @author darkredz
  */
 class SettingController extends DooController {
-	
-	public $staff=array();
-	
+	public $staff = array ();
 	public function beforeRun($resource, $action) {
 	}
 	function __construct() {
@@ -16,6 +14,7 @@ class SettingController extends DooController {
 				$staff = new staff ();
 				
 				$this->staff = $staff->getStaffBySid ( $_COOKIE ["staff"] );
+				
 				return "/";
 			}
 		}
@@ -34,6 +33,35 @@ class SettingController extends DooController {
 	 * 员工信息
 	 */
 	function settingEmployeeInfo() {
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		
+		$isShowMsg = false;
+		
+		$detail = $staff->checkStaffInfoIsComplete ( $_COOKIE ["staff"] );
+		
+		if ($detail ['telephone'] == "")
+			$isShowMsg = true;
+		if ($detail ['qq'] == "")
+			$isShowMsg = true;
+		if ($detail ['wecat'] == "")
+			$isShowMsg = true;
+		if ($detail ['phone'] == "")
+			$isShowMsg = true;
+		if ($detail ['email'] == "")
+			$isShowMsg = true;
+		if ($detail ['birthday'] == "")
+			$isShowMsg = true;
+		if ($detail ['marriage'] == "")
+			$isShowMsg = true;
+		if ($detail ['living'] == "")
+			$isShowMsg = true;
+		if ($detail ['nativePlace'] == "")
+			$isShowMsg = true;
+		if ($detail ['emergencyContacts'] == "")
+			$isShowMsg = true;
+		
+		$this->data ['isShowMsg'] = $isShowMsg;
 		$this->data ['staff'] = $this->staff;
 		$this->data ['memu'] = "adminmyinfo";
 		$this->data ['hrMemu'] = "settingEmployeeInfo";
@@ -44,6 +72,11 @@ class SettingController extends DooController {
 	 * 证件信息
 	 */
 	function settingCredentialInfo() {
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		
+		$detail = $staff->getStaffBySid ( $this->staff ['sid'] );
+		
 		$this->data ['staff'] = $this->staff;
 		$this->data ['memu'] = "adminmyinfo";
 		$this->data ['hrMemu'] = "settingEmployeeInfo";
@@ -201,7 +234,7 @@ class SettingController extends DooController {
 		
 		$birthday = $this->get_args ( 'birthday' ) ? $this->get_args ( 'birthday' ) : '';
 		$qualifications = $this->get_args ( 'qualifications' ) ? $this->get_args ( 'qualifications' ) : '';
-		$marriage = $this->get_args ( 'marriage' ) ? $this->get_args ( 'marriage' ) : '';
+		$marriage = $this->get_args ( 'marriage' ) ? $this->get_args ( 'marriage' ) : '0';
 		$IDcards = $this->get_args ( 'IDcards' ) ? $this->get_args ( 'IDcards' ) : '';
 		
 		$living = $this->get_args ( 'living' ) ? $this->get_args ( 'living' ) : '';
@@ -217,6 +250,14 @@ class SettingController extends DooController {
 		
 		$employeeInfo = $this->get_args ( 'employeeInfo' ) ? $this->get_args ( 'employeeInfo' ) : 'employeeInfo';
 		
+		$nation = $this->get_args ( 'nation' ) ? $this->get_args ( 'nation' ) : '';
+		$graduateInstitutions = $this->get_args ( 'graduateInstitutions' ) ? $this->get_args ( 'graduateInstitutions' ) : '';
+		$major = $this->get_args ( 'major' ) ? $this->get_args ( 'major' ) : '';
+		$education = $this->get_args ( 'education' ) ? $this->get_args ( 'education' ) : '';
+		$graduationTime = $this->get_args ( 'graduationTime' ) ? $this->get_args ( 'graduationTime' ) : '';
+		$registeredResidence = $this->get_args ( 'registeredResidence' ) ? $this->get_args ( 'registeredResidence' ) : '';
+		$householdRegistrationType = $this->get_args ( 'householdRegistrationType' ) ? $this->get_args ( 'householdRegistrationType' ) : '';
+		
 		if (! empty ( $sidKey )) {
 			
 			Doo::loadClass ( 'XDeode' );
@@ -243,8 +284,11 @@ class SettingController extends DooController {
 				// $staff->username = $username;
 			if (! empty ( $hiredate ))
 				$staff->hiredate = $hiredate;
-			if (! empty ( $position ))
-				$staff->position = $position;
+			if (! empty ( $position )){
+				$position = explode ( '_', $position );
+				$staff->position = $position[1];
+				$staff->positionId = $position[0];
+			}
 				
 				// 办事处-部门
 			if (! empty ( $cid_did )) {
@@ -286,10 +330,12 @@ class SettingController extends DooController {
 				$staff->email = $email;
 			if (! empty ( $birthday ))
 				$staff->birthday = $birthday;
-			if (! empty ( $$qualifications ))
+			if (! empty ( $qualifications ))
 				$staff->qualifications = $qualifications;
-			if (! empty ( $marriage ))
+			if ($marriage != '请选择')
 				$staff->marriage = $marriage;
+			else
+				$staff->marriage = '';
 			if (! empty ( $IDcards ))
 				$staff->IDcards = $IDcards;
 			if (! empty ( $living ))
@@ -312,12 +358,29 @@ class SettingController extends DooController {
 			if (! empty ( $salaryBank ))
 				$staff->salaryBank = $salaryBank;
 			
+			if (! empty ( $nation ))
+				$staff->nation = $nation;
+			if (! empty ( $graduateInstitutions ))
+				$staff->graduateInstitutions = $graduateInstitutions;
+			if (! empty ( $major ))
+				$staff->major = $major;
+			if (! empty ( $education ))
+				$staff->education = $education;
+			if (! empty ( $graduationTime ))
+				$staff->graduationTime = $graduationTime;
+			if (! empty ( $registeredResidence ))
+				$staff->registeredResidence = $registeredResidence;
+			if (! empty ( $householdRegistrationType ))
+				$staff->householdRegistrationType = $householdRegistrationType;
+			
 			$staff->update ( array (
 					'where' => 'sid=' . $detail ['sid'] 
 			) );
 			
 			if ($employeeInfo == 'employeeInfo') {
 				return '/hr';
+			} elseif ($employeeInfo == 'hrEmployee') {
+					return '/hrEmployee';
 			} elseif ($employeeInfo == 'settingEmployeeInfo') {
 				return '/settingEmployeeInfo';
 			} elseif ($employeeInfo == 'settingFinanceInfo') {
@@ -331,139 +394,101 @@ class SettingController extends DooController {
 	 * 证件文件上传
 	 */
 	function settingCredentialInfoDo() {
-		
+		// include Doo::conf ()->BASE_PATH . 'diagnostic/debug.php';
 		$IDcards = is_numeric ( $this->get_args ( 'IDcards' ) ) ? $this->get_args ( 'IDcards' ) : 0;
-		$certificate =  $this->get_args ( 'certificate' )  ? $this->get_args ( 'certificate' ) : '';
-		$diploma =  $this->get_args ( 'diploma' )  ? $this->get_args ( 'diploma' ) : '';
-		$professionalTitle =  $this->get_args ( 'professionalTitle' )  ? $this->get_args ( 'professionalTitle' ) : '';
-		
-		
+		$certificate = $this->get_args ( 'certificate' ) ? $this->get_args ( 'certificate' ) : '';
+		$diploma = $this->get_args ( 'diploma' ) ? $this->get_args ( 'diploma' ) : '';
+		$professionalTitle = $this->get_args ( 'professionalTitle' ) ? $this->get_args ( 'professionalTitle' ) : '';
 		
 		Doo::loadModel ( 'staff' );
 		$staff = new staff ();
 		
+		$detail = $staff->getStaffBySid ( $this->staff ['sid'] );
+		
 		$save_path = DOO::conf ()->SITE_PATH . "upload/credentialInfo/";
-		$webSite=WEB_SITE.'/upload/credentialInfo/';
+		$webSite = WEB_SITE . '/upload/credentialInfo/';
 		
-		if (!empty($IDcards))
-			$staff->IDcards=$IDcards;
+		// if (!empty($IDcards))
+		$staff->IDcards = $IDcards;
 		
 		$msg = '';
-		$file_name = 'IDcardsImgA_'. $this->staff['sid'].'.'. $this->_GetFileEXT ( $_FILES ["IDcardsImgA"] ['name'] );
-		if (!empty($_FILES ["IDcardsImgA"] ["size"])){
-			if (! @move_uploaded_file ( $_FILES ["IDcardsImgA"] ["tmp_name"], $save_path . $file_name )) 
+		$file_name = 'IDcardsImgA_' . $this->staff ['sid'] . '.' . $this->_GetFileEXT ( $_FILES ["IDcardsImgA"] ['name'] );
+		if (! empty ( $_FILES ["IDcardsImgA"] ["size"] )) {
+			if (! @move_uploaded_file ( $_FILES ["IDcardsImgA"] ["tmp_name"], $save_path . $file_name ))
 				$msg .= "文件无法保存";
-			else{
-				$staff->IDcardsImgA=$webSite . $file_name;
+			else {
+				$staff->IDcardsImgA = $webSite . $file_name;
 			}
 		}
-			
-		$file_name = 'IDcardsImgB_'. $this->staff['sid'].'.' . $this->_GetFileEXT ( $_FILES ["IDcardsImgB"] ['name'] );
-		if (!empty($_FILES ["IDcardsImgB"] ["size"]))
-		if (! @move_uploaded_file ( $_FILES ["IDcardsImgB"] ["tmp_name"], $save_path . $file_name )) {
-			$msg .= "文件无法保存";
-		}else{
-			$staff->IDcardsImgB=$webSite . $file_name;
+		
+		$file_name = 'IDcardsImgB_' . $this->staff ['sid'] . '.' . $this->_GetFileEXT ( $_FILES ["IDcardsImgB"] ['name'] );
+		if (! empty ( $_FILES ["IDcardsImgB"] ["size"] ))
+			if (! @move_uploaded_file ( $_FILES ["IDcardsImgB"] ["tmp_name"], $save_path . $file_name )) {
+				$msg .= "文件无法保存";
+			} else {
+				$staff->IDcardsImgB = $webSite . $file_name;
+			}
+		
+		if (! empty ( $certificate )) {
+			$certificateArray = explode ( "-", $certificate );
+			$name = json_decode ( $detail ['certificate'] );
+			if (! empty ( $name )) {
+				$certificateArray = array_merge_recursive ( $name, $certificateArray );
+				$staff->certificate = json_encode ( $certificateArray );
+			} else
+				$staff->certificate = json_encode ( $certificateArray );
+		}
+		
+		if (! empty ( $diploma )) {
+			$diplomaArray = explode ( "-", $diploma );
+			$name = json_decode ( $detail ['diploma'] );
+			if (! empty ( $name )) {
+				$diplomaArray = array_merge_recursive ( $name, $diplomaArray );
+				$staff->diploma = json_encode ( $diplomaArray );
+			} else
+				$staff->diploma = json_encode ( $diplomaArray );
 		}
 		
-		if (!empty($certificate)){
-			$certificateArray=explode("-", $certificate);
-			$staff->certificate=json_encode($certificateArray);
+		if (! empty ( $professionalTitle )) {
+			$professionalTitleArray = explode ( "-", $professionalTitle );
+			$name = json_decode ( $detail ['professionalTitle'] );
+			if (! empty ( $name )) {
+				$professionalTitleArray = array_merge_recursive ( $name, $professionalTitleArray );
+				$staff->professionalTitle = json_encode ( $professionalTitleArray );
+			} else
+				$staff->professionalTitle = json_encode ( $professionalTitleArray );
 		}
 		
-// 		$file_name = 'certificate_'. $this->staff['sid'].'.' . $this->_GetFileEXT ( $_FILES ["certificate"] ['name'] );
-// 		if (!empty($_FILES ["certificate"] ["size"]))
-// 		if (! @move_uploaded_file ( $_FILES ["certificate"] ["tmp_name"], $save_path . $file_name )) {
-// 			$msg .= "文件无法保存";
-// 		}else{
-// 			$staff->certificate=$webSite . $file_name;
-// 		}
-		
-// 		$file_name = 'diploma_'. $this->staff['sid'].'.' . $this->_GetFileEXT ( $_FILES ["diploma"] ['name'] );
-// 		if (!empty($_FILES ["diploma"] ["size"]))
-// 		if (! @move_uploaded_file ( $_FILES ["diploma"] ["tmp_name"], $save_path . $file_name )) {
-// 			$msg .= "文件无法保存";
-// 		}else{
-// 			$staff->diploma=$webSite . $file_name;
-// 		}
-		
-		$staff->update(array('where'=>'sid='.$this->staff['sid']));
-		//return '/settingCredentialInfo';
+		$staff->update ( array (
+				'where' => 'sid=' . $this->staff ['sid'] 
+		) );
+		return '/settingCredentialInfo';
 	}
 	
 	/**
 	 * 上传学位证书
 	 * @return string
 	 */
-	function settingCredentialInfoDo3() {
-		$POST_MAX_SIZE = ini_get ( 'post_max_size' );
-		$unit = strtoupper ( substr ( $POST_MAX_SIZE, - 1 ) );
-		$multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1)));
-	
-		if (( int ) $_SERVER ['CONTENT_LENGTH'] > $multiplier * ( int ) $POST_MAX_SIZE && $POST_MAX_SIZE) {
-			header ( "HTTP/1.1 500 Internal Server Error" );
-			echo "POST exceeded maximum allowed size.";
-			exit ( 0 );
-		}
-	
-		// Settings
-		$save_path = DOO::conf ()->SITE_PATH . "upload/credentialInfo/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
-		$upload_name = "Filedata";
-		$max_file_size_in_bytes = 2147483647; // 2GB in bytes
-		$extension_whitelist = array (
-				"doc",
-				"txt",
-				"jpg",
-				"gif",
-				"png"
-		); // Allowed file extensions
-		$valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
-		 
-		// Other variables
-		$MAX_FILENAME_LENGTH = 260;
-		$file_name = "";
-		$file_extension = "";
-		$uploadErrors = array (
-				0 => "文件上传成功",
-				1 => "上传的文件超过了 php.ini 文件中的 upload_max_filesize directive 里的设置",
-				2 => "上传的文件超过了 HTML form 文件中的 MAX_FILE_SIZE directive 里的设置",
-				3 => "上传的文件仅为部分文件",
-				4 => "没有文件上传",
-				6 => "缺少临时文件夹"
-		);
-	
-		$nk = time ();
-		$file_name = 'diploma_'. $this->staff['sid'].'_'.$nk.'.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
+	function settingCredentialInfoTypeDo() {
+		$hunTian = isset ( $this->params ['hunTian'] ) ? $this->params ['hunTian'] : "";
 		
-		if (! @move_uploaded_file ( $_FILES [$upload_name] ["tmp_name"], $save_path . $file_name )) {
+		if (empty ( $hunTian )) {
 			echo "文件无法保存.";
 			exit ( 0 );
 		}
-	
-		echo json_encode ( array (
-				'filename' => $file_name,
-				'id' => $nk
-		) );
-		exit ( 0 );
-	}
-	
-	/**
-	 * 上传职称证书
-	 * @return string
-	 */
-	function settingCredentialInfoDo4() {
+		
 		$POST_MAX_SIZE = ini_get ( 'post_max_size' );
 		$unit = strtoupper ( substr ( $POST_MAX_SIZE, - 1 ) );
 		$multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1)));
-	
+		
 		if (( int ) $_SERVER ['CONTENT_LENGTH'] > $multiplier * ( int ) $POST_MAX_SIZE && $POST_MAX_SIZE) {
 			header ( "HTTP/1.1 500 Internal Server Error" );
 			echo "POST exceeded maximum allowed size.";
 			exit ( 0 );
 		}
-	
+		
 		// Settings
-		$save_path = DOO::conf ()->SITE_PATH . "upload/credentialInfo/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
+		$save_path = DOO::conf ()->SITE_PATH . "/upload/credentialInfo/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
 		$upload_name = "Filedata";
 		$max_file_size_in_bytes = 2147483647; // 2GB in bytes
 		$extension_whitelist = array (
@@ -471,10 +496,10 @@ class SettingController extends DooController {
 				"txt",
 				"jpg",
 				"gif",
-				"png"
+				"png" 
 		); // Allowed file extensions
 		$valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
-			
+		                                                         
 		// Other variables
 		$MAX_FILENAME_LENGTH = 260;
 		$file_name = "";
@@ -485,78 +510,70 @@ class SettingController extends DooController {
 				2 => "上传的文件超过了 HTML form 文件中的 MAX_FILE_SIZE directive 里的设置",
 				3 => "上传的文件仅为部分文件",
 				4 => "没有文件上传",
-				6 => "缺少临时文件夹"
+				6 => "缺少临时文件夹" 
 		);
-	
+		
 		$nk = time ();
-		$file_name = 'professionalTitle_'. $this->staff['sid'].'_'.$nk.'.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
-	
+		if ($hunTian == 'diploma')
+			$file_name = 'diploma_' . $this->staff ['sid'] . '_' . $nk . '.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
+		elseif ($hunTian == 'professionalTitle')
+			$file_name = 'professionalTitle_' . $this->staff ['sid'] . '_' . $nk . '.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
+		elseif ($hunTian == 'certificate') {
+			$file_name = 'certificate_' . $this->staff ['sid'] . '_' . $nk . '.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
+		}
+		
 		if (! @move_uploaded_file ( $_FILES [$upload_name] ["tmp_name"], $save_path . $file_name )) {
 			echo "文件无法保存.";
 			exit ( 0 );
 		}
-	
+		
 		echo json_encode ( array (
 				'filename' => $file_name,
-				'id' => $nk
+				'id' => $nk 
 		) );
 		exit ( 0 );
 	}
 	
 	/**
-	 * 上传毕业证书
-	 * @return string
+	 * 删除证件文件
 	 */
-	function settingCredentialInfoDo2() {
-		$POST_MAX_SIZE = ini_get ( 'post_max_size' );
-		$unit = strtoupper ( substr ( $POST_MAX_SIZE, - 1 ) );
-		$multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1)));
-	
-		if (( int ) $_SERVER ['CONTENT_LENGTH'] > $multiplier * ( int ) $POST_MAX_SIZE && $POST_MAX_SIZE) {
-			header ( "HTTP/1.1 500 Internal Server Error" );
-			echo "POST exceeded maximum allowed size.";
-			exit ( 0 );
+	function delCredentialType() {
+		$hunTian = isset ( $this->params ['hunTian'] ) ? $this->params ['hunTian'] : "";
+		$name = isset ( $this->params ['name'] ) ? $this->params ['name'] : "";
+		
+		if (empty ( $hunTian ) || empty ( $name )) {
+			die ( 'illegal request' );
 		}
-	
-		// Settings
-		$save_path = DOO::conf ()->SITE_PATH . "upload/credentialInfo/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
-		$upload_name = "Filedata";
-		$max_file_size_in_bytes = 2147483647; // 2GB in bytes
-		$extension_whitelist = array (
-				"doc",
-				"txt",
-				"jpg",
-				"gif",
-				"png"
-		); // Allowed file extensions
-		$valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
-			
-		// Other variables
-		$MAX_FILENAME_LENGTH = 260;
-		$file_name = "";
-		$file_extension = "";
-		$uploadErrors = array (
-				0 => "文件上传成功",
-				1 => "上传的文件超过了 php.ini 文件中的 upload_max_filesize directive 里的设置",
-				2 => "上传的文件超过了 HTML form 文件中的 MAX_FILE_SIZE directive 里的设置",
-				3 => "上传的文件仅为部分文件",
-				4 => "没有文件上传",
-				6 => "缺少临时文件夹"
-		);
-	
-		$nk = time ();
-		$file_name = 'certificate_'. $this->staff['sid'].'_'.$nk.'.' . $this->_GetFileEXT ( $_FILES [$upload_name] ['name'] );
-	
-		if (! @move_uploaded_file ( $_FILES [$upload_name] ["tmp_name"], $save_path . $file_name )) {
-			echo "文件无法保存.";
-			exit ( 0 );
+		
+		Doo::loadModel ( 'staff' );
+		$staff = new staff ();
+		$detail = $staff->getStaffBySid ( $this->staff ['sid'] );
+		
+		if ($hunTian == 'certificate') {
+			$msg = str_replace ( $name, "", $detail ['certificate'] );
+			$msg = json_decode ( $msg );
+			$msg = array_values ( array_filter ( $msg ) );
+			$staff->certificate = json_encode ( $msg );
 		}
-	
-		echo json_encode ( array (
-				'filename' => $file_name,
-				'id' => $nk
+		
+		if ($hunTian == 'diploma') {
+			$msg = str_replace ( $name, "", $detail ['diploma'] );
+			$msg = json_decode ( $msg );
+			$msg = array_values ( array_filter ( $msg ) );
+			$staff->diploma = json_encode ( $msg );
+		}
+		
+		if ($hunTian == 'professionalTitle') {
+			$msg = str_replace ( $name, "", $detail ['professionalTitle'] );
+			$msg = json_decode ( $msg );
+			$msg = array_values ( array_filter ( $msg ) );
+			$staff->professionalTitle = json_encode ( $msg );
+		}
+		
+		$staff->update ( array (
+				'where' => 'sid=' . $this->staff ['sid'] 
 		) );
-		exit ( 0 );
+		return '/settingCredentialInfo';
 	}
 	
 	/**
@@ -588,7 +605,6 @@ class SettingController extends DooController {
 		$num = count ( $pics );
 		return $pics [$num - 1];
 	}
-	
 }
 
 ?>

+ 1 - 1
protected/controller/SoftController.php

@@ -19,7 +19,7 @@ class SoftController extends DooController {
 	function categoryApi(){
 		Doo::loadModel ( 'L_category' );
 		$L_category = new L_category ();
-		$category=$L_category->getCategory();
+		$category=$L_category->getCategoryBySoft();
 		header ( 'Content-Type:text/html;charset=utf-8' );
 		echo json_encode(array('status'=>1,'categoryList'=>$category),JSON_UNESCAPED_UNICODE);die;
 	}

+ 23 - 0
protected/model/L_category.php

@@ -47,6 +47,29 @@ class L_category extends DooModel {
 					'asArray' => TRUE 
 			) );
 	}
+	
+	/**
+	 * 软件获取办事处
+	 * @return string
+	 */
+	public function getCategoryBySoft() {
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'department' );
+		$department = new department ();
+	
+		$list = $this->find ( array (
+				'asc' => 'cid',
+				'asArray' => TRUE
+		) );
+	
+		foreach ( $list as $key => $value ) {
+			$list [$key] ['cidKey'] = $XDeode->encode ( $value ['cid'] );
+		}
+	
+		return $list;
+	}
+	
 	public function getCategory() {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );

+ 12 - 1
protected/model/invoice.php

@@ -434,6 +434,16 @@ class invoice extends DooModel {
 		return $result = $query->fetchAll ();
 	}
 	
+	function getInvoiceByTrainingCount($itid=0){
+		if (empty($itid))
+			return 0;
+		$detail = $this->count ( array (
+				'where' => "trainId= '" . $itid . "' and untreadStatus!=2", // and sid=".$sid,
+				'asArray' => TRUE
+		) );
+		return $detail;
+	}
+	
 	/**
 	 * 根据仓库ID获得发票
 	 * @param string $Istoreid
@@ -662,12 +672,13 @@ class invoice extends DooModel {
 	 * @param integer $postStatus 0为获取需要邮寄的发票,1为获取已经邮寄的发票
 	 * @return array|array() 返回相关数据
 	 */
-	public function getPostByInvoice($postStatus = 0) {
+	public function getPostByInvoice($postStatus = 0,$desc="desc") {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		$list = $this->find ( array ( // and untreadStatus=0
 				'where' => "postStatus=" . $postStatus . " and printStatus=1   and doPost=1 and status=2 and isDelete=0",
 				'limit' => 7,
+				$desc => 'iid',
 				'asArray' => TRUE 
 		) );
 		foreach ( $list as $key => $value ) {

+ 5 - 2
protected/model/invoiceStore.php

@@ -258,7 +258,7 @@ class invoiceStore extends DooModel {
 	 * 根据培训班ID获得发票数据
 	 * @param number $itid
 	 */
-	function getinvoiceStoreByItid($itid = 0) {
+	function getinvoiceStoreByItid($itid = 0,$con='') {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		$itid = $XDeode->decode ( $itid );
@@ -270,7 +270,10 @@ class invoiceStore extends DooModel {
 					,a.mailItems,a.recipientsAddress,a.recipients,a.recipientsPhone,a.remark,a.remark,a.remark,a.remark,a.userName
 					,b.invoiceSerial,b.printTime,b.invoiceNo,b.status,b.printStatus,b.untreadStatus,b.irid';
 			
-			$sql = "select " . $field . " from " . $this->_table . " as a left join CLD_invoice as b on (a.iid=b.iid)  where   a.trainId=" . $itid;
+			$sql = "select " . $field . " from " . $this->_table . " as a left join CLD_invoice as b on (a.iid=b.iid  )  where ".$con."  a.trainId=" . $itid;
+			//
+			
+			
 			$query = Doo::db ()->query ( $sql );
 			$list = $query->fetchAll ();
 		}

+ 5 - 0
protected/model/invoiceTraining.php

@@ -145,6 +145,11 @@ class invoiceTraining extends DooModel {
 		// print_r($invoiceRecelvablesList);
 		
 		foreach ( $list as $key => $value ) {
+			
+			$countInvoice=$invoice->getInvoiceByTrainingCount($value['itid']);
+			$value ['invoiceTotal']=$countInvoice;
+			$list [$key] ['invoiceTotal'] =$countInvoice;
+			
 			foreach ( $invoiceList as $k => $v ) {
 				if ($value ['itid'] == $v ['trainId']) {
 					$list [$key] ['invoiceTotalAmount'] = $v ['invoicePrice'];

+ 108 - 7
protected/model/staff.php

@@ -2,6 +2,8 @@
 Doo::loadCore ( 'db/DooModel' );
 class staff extends DooModel {
 	
+	
+	
 	public $sid;
 	public $username;
 	public $passwork;
@@ -21,6 +23,7 @@ class staff extends DooModel {
 	public $avatar;
 	public $appDate;
 	public $hiredate;
+	public $hireBiasDate;
 	public $wxid;
 	public $wecat;
 	public $nature;
@@ -69,7 +72,6 @@ class staff extends DooModel {
 	
 	public $cldAccess;
 	
-	
 	public $IDcards;
 	public $IDcardsImgA;
 	public $certificate;
@@ -77,11 +79,30 @@ class staff extends DooModel {
 	public $professionalTitle;
 	public $IDcardsImgB;
 	
+	public $nation;
+	public $graduateInstitutions;
+	public $major;
+	public $education;
+	public $graduationTime;
+	public $registeredResidence;
+	public $householdRegistrationType;
+	public $IDcardsValidity;
+	public $positionId;
+	
 	
 	public $_table = 'CLD_staff';
 	public $_primarykey = 'sid';
 	public $_fields = array (
 			
+			'nation',
+			'graduateInstitutions',
+			'major',
+			'education',
+			'graduationTime',
+			'registeredResidence',
+			'householdRegistrationType',
+			'IDcardsValidity',
+			
 			'IDcards',
 			'IDcardsImgA',
 			'IDcardsImgB',
@@ -108,6 +129,7 @@ class staff extends DooModel {
 			'email',
 			'avatar',
 			'hiredate',
+			'hireBiasDate',
 			'wxid',
 			'nature',
 			'remittanceName',
@@ -152,12 +174,13 @@ class staff extends DooModel {
 			'dimissionDate',
 			'seniorityFormula',
 			'cldAccess',
-			'didName'
+			'didName',
+			'positionId'
 	);
 	public function checkUser($uid, $passwork) {
 		return $this->find ( array (
 				'select' => 'position,birthday,sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar,hiredate,nature',
-				'where' => "username= '" . $uid . "' and passwork = '" . md5 ( $passwork ) . "'",
+				'where' => "username= '" . $uid . "' and passwork = '" . md5 ( $passwork ) . "' and nature!=4",
 				'asArray' => TRUE 
 		) );
 	}
@@ -193,7 +216,7 @@ class staff extends DooModel {
 		
 		if ($admin)
 			$condition += array (
-					'where' => "username != 'admin'",
+					'where' => "username != 'admin' and nature !=4",
 			);
 		
 		$list = $this->find ( $condition);
@@ -267,10 +290,30 @@ class staff extends DooModel {
 		
 		return $list;
 	}
+	
+	/**
+	 * 获得单位下所有的员工
+	 * @param number $pid
+	 */
+	public function getStaffByPositionId($pid=0){
+		
+		$list = $this->find ( array (
+				'where' => "positionId= '" . $pid . "' and username!='admin'",
+				'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 getStaffByCid($cid = 0) {
 		$list = $this->find ( array (
 				'asc' => 'sid',
-				'where' => "cid= '" . $cid . "'",
+				'where' => "cid= '" . $cid . "' and nature !=4 ",
 				'asArray' => TRUE 
 		) );
 		Doo::loadClass ( 'XDeode' );
@@ -288,7 +331,7 @@ class staff extends DooModel {
 	public function getStaffByApplied($sid=0){
 		$list = $this->find ( array (
 				'asc' => 'sid',
-				'where' => "(pendStatus= '2' or pendStatus='3') and (pendingApprovals ='" . $sid . "' or pendingApprovalsLeave='" . $sid . "')",
+				'where' => "(pendStatus= '2' or pendStatus='3' or pendStatus='5') and (pendingApprovals ='" . $sid . "' or pendingApprovalsLeave='" . $sid . "')",
 				'asArray' => TRUE
 		) );
 		Doo::loadClass ( 'XDeode' );
@@ -373,6 +416,29 @@ class staff extends DooModel {
 	}
 	
 	/**
+	 * 检查信息是否填写完整
+	 * @param unknown $sid
+	 * @return string
+	 */
+	public function checkStaffInfoIsComplete($sid){
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		
+		if (!is_numeric($sid)){
+			$sid = $XDeode->decode ( $sid );
+		}
+		
+		$detail=$this->getOne ( array (//or wecat='' or email='' or coupletNumber=''
+				'where' => "sid= '" . $sid . "' and (telephone='' or qq=''  or phone=''  or birthday='' or marriage='' or living='' or nativePlace='' or emergencyContacts='' or IDcards='' 
+				or IDcardsImgA='' or IDcardsImgB='' or remittanceName=''  or bankName='' or bankNumber='' or salaryCard='' or salaryBank='' )",
+				'asArray' => TRUE
+		) );
+		
+		return $detail;
+	}
+	
+	
+	/**
 	 * 根据参数字段更新相应字段(主键ID必须传)
 	 * @param array $item 相关需要更新的字段信息
 	 * @return number 返回员工ID
@@ -438,6 +504,8 @@ class staff extends DooModel {
 			$department = new department ();
 			$detail ['department'] =$department->getDepartmentByDid($detail['departmentID']);
 			
+			
+			
 			$d1 = strtotime($detail['hiredate']);//过去的某天,你来设定
 			$d2 = 1 + ceil((time()-$d1)/60/60/24);
 			$detail['workforce']=$d2;
@@ -447,8 +515,41 @@ class staff extends DooModel {
 			$detail['workforceDimission']=$d2;
 			
 			$detail ['cldAccessArray'] = json_decode($detail['cldAccess']);
-			
 			$detail['sidKey']=$XDeode->encode ( $detail ['sid'] );
+			
+			$webSite=WEB_SITE.'/upload/credentialInfo/';
+			$detail['webSite']=$webSite;
+			$detail['certificateArray']=array();
+			if(!empty($detail['certificate'])){
+				$certificate=json_decode($detail['certificate']);
+				if(!empty($certificate)){
+					foreach ($certificate as $key=>$value){
+						$certificate[$key]=$value;
+					}
+					$detail['certificateArray']=$certificate;
+				}
+			}
+			$detail['diplomaArray']=array();
+			if(!empty($detail['diploma'])){
+				$certificate=json_decode($detail['diploma']);
+				if(!empty($certificate)){
+				foreach ($certificate as $key=>$value){
+					$certificate[$key]=$value;
+				}
+				$detail['diplomaArray']=$certificate;
+				}
+			}
+			$detail['professionalTitleArray']=array();
+			if(!empty($detail['professionalTitle'])){
+				$certificate=json_decode($detail['professionalTitle']);
+				if(!empty($certificate)){
+				foreach ($certificate as $key=>$value){
+					$certificate[$key]=$value;
+				}
+				$detail['professionalTitleArray']=$certificate;
+				}
+			}
+			
 		}
 		return $detail;
 	}

+ 8 - 0
protected/model/staffManage.php

@@ -52,6 +52,14 @@ class staffManage extends DooModel {
 	 */
 	public function getInvoiceCMByStaff($sid = 0) {
 		$lsit = array ();
+		
+		if (!is_numeric($sid)){
+			Doo::loadClass ( 'XDeode' );
+			$XDeode = new XDeode ( 5 );
+			
+			$sid = $XDeode->decode ( $sid );
+		}
+		
 		if (! empty ( $sid ))
 			$lsit = $this->find ( array (
 					'select' => 'cid',

+ 40 - 5
protected/plugin/TemplateTag.php

@@ -6,6 +6,7 @@
 Doo::conf ()->TEMPLATE_GLOBAL_TAGS = array (
 		'isTimeTR',
 		'isInvoiceNew',
+		'isHRNew',
 		'upper',
 		'tofloat',
 		'sample_with_args',
@@ -24,9 +25,21 @@ Doo::conf ()->TEMPLATE_GLOBAL_TAGS = array (
 		'isInvoiceAggregateCompanyShow',
 		'forMatAccess',
 		'isShowMenu',
+		'isStaffCompleteMsg',
 		'isInvoiceCategoryShow'
 );
 
+function isStaffCompleteMsg(){
+	//检测用户信息完成
+	Doo::loadModel ( 'staff' );
+	$staff = new staff ();
+	$isStaffCompleteMsg=false;
+	$detail = $staff->checkStaffInfoIsComplete ( $_COOKIE ["staff"] );
+	if(!empty($detail))
+		$isStaffCompleteMsg=true;
+	return $isStaffCompleteMsg;
+}
+
 function forMatAccess($access=array()){
 	$html='';
 	$accessMsg = array (
@@ -60,20 +73,42 @@ function isTimeTR($day = 3,$cTime) {
 }
 
 function isShowMenu($menu=''){
-	Doo::loadModel ( 'staff' );
+		Doo::loadModel ( 'staff' );
 		$staff = new staff ();
 		$st = $staff->getStaffBySid( $_COOKIE ["staff"] );
+		$cldAccess=array();
+		if (!empty($st['cldAccess']))
+			$cldAccess=json_decode($st['cldAccess'],true);
 		
-		$cldAccess=json_decode($st['cldAccess'],true);
+		Doo::loadModel ( "staffManage" );
+		$staffManage = new staffManage ();
+		$smList=$staffManage->getInvoiceCMByStaff($_COOKIE ["staff"]);
 		
-		if (empty($cldAccess))
-			return false;
-		if (in_array($menu,$cldAccess)||($st['sid']==superHR&&$menu=='HR')){
+		
+		if (in_array($menu,$cldAccess)||($st['sid']==superHR&&$menu=='HR')||(!empty($smList)&&$menu=='HR')){
+			
 			return true;
 		}
+		
+		if (empty($cldAccess)){
+				
+			return false;
+		}
+		
 		return false;
 }
 
+function isHRNew(){
+	Doo::loadModel ( 'staff' );
+	$staff = new staff ();
+	
+	$list=$staff->find ( array (
+			'asc' => 'sid',
+			'where' => "(pendStatus= '2' or pendStatus='3' or pendStatus='5') ",
+			'asArray' => TRUE
+	) );
+	echo count($list);
+}
 
 function isInvoiceNew($type = "GLOBAL") {
 	Doo::loadModel ( 'invoice' );

+ 1 - 12
protected/view/admin/header.html

@@ -1,12 +1 @@
-<!DOCTYPE html>
-<html lang=zh-cn> 
-<head>
-	<meta charset=utf-8> 
-	<title>CLD.System</title> 
-	
-	<link rel="shortcut icon" href="<?= WEB_SITE_GLOBAL ?>images/favicon.ico"> 
-	<meta name=copyright content=smartcost.com.cn> 
-	<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/global.css"> 
-	<script src="<?= WEB_SITE_GLOBAL ?>js/jquery-1.7.1.min.js"></script> 
-	<script src="<?= WEB_SITE_GLOBAL ?>js/global.js"></script>
-</head>
+<!-- include '../header' -->

+ 2 - 0
protected/view/admin/invoiceAS.html

@@ -103,6 +103,8 @@
 							<td>
 							<!-- if {{list' value.untreadStatus}}==2 -->
 	                                  	已退票
+	                        <!-- elseif {{list' value.untreadStatus}}==1 -->
+	                                  	正在退票
 	                        <!-- endif -->
 							</td>
 							

+ 2 - 1
protected/view/admin/invoiceAchieve.html

@@ -40,7 +40,7 @@
 				<div class="saeaList">
 					<table class="table table-hover">
 						<tbody>
-						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>开票单位(抬头)</th><th>开票内容</th><th>收款流水号</th><th>收款金额</th><th>入账时间</th></tr>
+						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>开票单位(抬头)</th><th>开票内容</th><th>发票号</th><th>收款流水号</th><th>收款金额</th><th>入账时间</th></tr>
 						<!-- loop list -->
 						<tr>
 							<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{pendingInvoice' value.iidKeyK}}" data-toggle="modal">{{list' value.invoiceSerial}}</a></td>
@@ -57,6 +57,7 @@
 	                                    {{list' value.invoiceTitle}}
 	                                    <!-- endif --></td>
 							<td>{{list' value.invoiceElement}}</td>
+							<td>{{invoiceList' value.invoiceNo}}</td>
 							<td>
 							<!-- loop list' value.irList -->
 							<a href="#billing" node-invoice='INFO' data-type="receivables" data-isKey="{{list' value' value.iridKeyK}}" data-toggle="modal">{{list' value' value.receivablesSerial}}</a>&nbsp;

+ 5 - 1
protected/view/admin/invoiceAggregateCompanyDetail.html

@@ -125,7 +125,11 @@
 							<!-- endif -->
 							</td>
 						
-						<td>{{list' value.diffPrice}}</td>
+						<td>
+						<!-- if {{list' value.diffPrice}}!=0 -->
+						{{list' value.diffPrice}}
+						<!-- endif -->
+						</td>
 						<td>{{list' value.categoryName}}-{{list' value.userName}}</td>
 							
 							<td>

+ 2 - 1
protected/view/admin/invoiceMyUnAccountAchieve.html

@@ -51,7 +51,7 @@
 				<div class="saeaList">
 					<table class="table table-hover">
 						<tbody>
-						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>开票单位(抬头)</th><th>开票内容</th>
+						<tr class="thead"><th>开票流水号</th><th>开票金额</th><th>发票号</th><th>开票单位(抬头)</th><th>开票内容</th>
 						<th>出票时间</th></tr>
 						<!-- loop list -->
 						<tr>
@@ -63,6 +63,7 @@
 	                          <b>¥{{list' value.invoicePrice}}</b>
 	                          <!-- endif -->
 							</td>
+							<td>{{invoiceList' value.invoiceNo}}</td>
 							<td>
 							<!-- if !empty({{list' value.invoiceType}}) -->
 	                                   	{{list' value.invoiceCompany}}

+ 1 - 1
protected/view/admin/invoiceReceivablesAS.html

@@ -55,7 +55,7 @@
 	  					</li>
 	  					
 						<li><div class="search"><div class="input-append">
-									<input class="span3" data-irmMebSea placeholder="收款金额,收款信息,序列号" name="MebSea" value="{{MebSeaEn}}" type="text">
+									<input class="span3" data-irmMebSea placeholder="收款金额,收款信息,收款流水号" name="MebSea" value="{{MebSeaEn}}" type="text">
 									<button class="btn btn-small" node-irmMebSea type="submit">搜索</button>
 								</div>
 							</div></li>

+ 58 - 5
protected/view/admin/invoiceTrainingDetail.html

@@ -238,18 +238,28 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 	
 	
 	<div class="modal hide fade" id="confirmBatchMail">
-
+		
 		<form action="/invoiceStoreBatchMailItemSet" method="post">
 			<input type="hidden" id="trainKey" name="trainKey"
 				value="{{iTrainDetail.trainingKey}}"> <input type="hidden"
 				id="BatchMailStoreKey" name="storeKey" value="">
 
 			<div class="modal-dialog">
+			
+				
+			
 				<div class="modal-content">
 					<div class="modal-header">
 						<h3>设置邮寄物品</h3>
 					</div>
-					<div class="modal-body saeaList">
+					
+					
+					
+				<div class="modal-body saeaList" id="BatchMailTipA">
+				<img src="<?= WEB_SITE_GLOBAL ?>images/tip.gif"/>
+				</div>
+					
+					<div class="modal-body saeaList" id="BatchMailTipB">
 						<table class="table table-bordered table-condensed">
 							<tr>
 								<th colspan="4" class="taC">邮寄信息</th>
@@ -312,6 +322,8 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 							aria-hidden="true">取消</a>
 					</div>
 				</div>
+				
+				
 			</div>
 		</form>
 	</div>
@@ -359,7 +371,13 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 			<div class="modal-header">
 			<h3>确认信息无误</h3>
 			</div>
-			<div class="modal-body">
+			
+			<div class="modal-body" id="batchApprovalA">
+				<img src="<?= WEB_SITE_GLOBAL ?>images/tip.gif"/>
+				</div>
+			
+			
+			<div class="modal-body" id="batchApprovalB">
 				申请提交后开票信息将不能修改,请确认信息无误。
 			</div>
 		<div class="modal-footer">
@@ -389,7 +407,11 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 				<div class="modal-header">
 				<h3>确认移除</h3>
 				</div>
-				<div class="modal-body">
+				
+				
+				
+				
+				<div class="modal-body" >
 					请确认是否移除发票。
 				</div>
 			<div class="modal-footer">
@@ -418,7 +440,12 @@ table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_
 				<div class="modal-header">
 				<h3>确认移除</h3>
 				</div>
-				<div class="modal-body">
+				
+				<div class="modal-body" id="batchdelA">
+				<img src="<?= WEB_SITE_GLOBAL ?>images/tip.gif"/>
+				</div>
+				
+				<div class="modal-body" id="batchdelB">
 					请确认是否移除发票。
 				</div>
 			<div class="modal-footer">
@@ -545,6 +572,14 @@ $(document).ready( function () {
 			var idstr=id_array.join(',');//将数组元素连接起来以构建一个字符串  
 			$("input[id=batchStoreKey]").val(idstr);
 			
+			if(idstr==''){
+				$('#batchdelA').show();
+				$('#batchdelB').hide();
+			}else{
+				$('#batchdelA').hide();
+				$('#batchdelB').show();
+			}
+			
 		});
 	 
 	 $("a[node-store=batchMail]").click(function() {
@@ -556,7 +591,17 @@ $(document).ready( function () {
 			var idstr=id_array.join(',');
 			$("input[id=BatchMailStoreKey]").val(idstr);
 			
+			if(idstr==''){
+				$('#BatchMailTipA').show();
+				$('#BatchMailTipB').hide();
+			}else{
+				$('#BatchMailTipA').hide();
+				$('#BatchMailTipB').show();
+			}
+			
+			
 		});
+	 
 		$("a[node-store=batchApproval]").click(function() {
 			
 			var id_array=new Array();  
@@ -566,6 +611,14 @@ $(document).ready( function () {
 			var idstr=id_array.join(',');
 			$("input[id=appBatchStoreKey]").val(idstr);
 			
+			if(idstr==''){
+				$('#batchApprovalA').show();
+				$('#batchApprovalB').hide();
+			}else{
+				$('#batchApprovalA').hide();
+				$('#batchApprovalB').show();
+			}
+			
 		});
 	
 		setSearchLo('tran');

+ 11 - 0
protected/view/admin/receipt_menu.html

@@ -4,10 +4,18 @@
 	<li><a <!-- if {{receiptMemu}}=="expenses" --> class="selected" <!-- endif --> href="/expenses">我的费用</a></li>
 	<li><a href="/personalCollect" <!-- if {{receiptMemu}}=="personalCollect" --> class="selected" <!-- endif --> >费用汇总</a></li>
 						
+						
+						
+<li><a href="/payments" <!-- if {{receiptMemu}}=="payments" --> class="selected" <!-- endif --> >日常收支</a></li>
+						
+						
 	<!-- if inarray({{staff.0.sid}},{{verifyId}}) || inarray({{staff.0.sid}},{{executeId}}) -->
 						
 	<li  class="topLine <!-- if  getGlobals('NEW') !=0 --> news <!-- endif --> "><a <!-- if {{receiptMemu}}=="approvalExpenses" --> class="selected" <!-- endif --> href="/approvalExpenses/pendApproval">费用审批</a></li>
 						
+						
+						
+						
 	<!-- if inarray({{staff.0.sid}},{{executeId}}) -->
 	<li <!-- if  getGlobals('NEW2') !=0 --> class="news" <!-- endif --> ><a <!-- if {{receiptMemu}}=="implement" --> class="selected" <!-- endif --> href="/hisImplement">费用执行</a></li>			
 	<!-- endif -->
@@ -21,6 +29,9 @@
 	<!-- if isReceiptAuthorityShow({{staff.0.sid}}) -->
 	<li><a href="/companyCategoryCollect" <!-- if {{receiptMemu}}=="companyCategoryCollect" --> class="selected" <!-- endif --> >公司汇总</a></li>			
 	<!-- endif -->
+	
+	<li><a href="/paymentsCollect" <!-- if {{receiptMemu}}=="paymentsCollect" --> class="selected" <!-- endif --> >日常收支汇总</a></li>
+	
 	<li class="topLine"><a href="#welcome" data-toggle="modal">使用帮助</a></li>
 
 	</ul>

+ 3 - 1
protected/view/admin/staffCollectMonthDetail.html

@@ -51,7 +51,7 @@
 	  						
 	  						<th class="taC" colspan="18">日常相关费用</th>
 	  						<th class="taC" colspan="6">差旅相关费用</th>
-	  						<th class="taC" colspan="9">培训班费用</th>
+	  						<th class="taC" colspan="11">培训班费用</th>
 	  						<th class="taC" colspan="5">其他</th>
 	  						<th class="taC" rowspan="2">报销金额调整</th>
 	  						</tr>
@@ -93,6 +93,8 @@
 	  						<th class="taC">办公费</th>
 	  						<th class="taC">公关费</th>
 	  						<th class="taC">其他</th>
+	  						<th class="taC">电话费</th>
+	  						<th class="taC">邮寄费</th>
 	  						
 	  						<th class="taC">合计</th>
 	  						<th class="taC">公关费</th>

+ 4 - 0
protected/view/header.html

@@ -11,3 +11,7 @@
 	<script src="<?= WEB_SITE_GLOBAL ?>js/global.js"></script>
 	<!-- if !isset({{noindexjs}}) --><script src="<?= WEB_SITE_GLOBAL ?>js/index.js?20170316"></script><!-- endif -->
 </head>
+
+<!-- if isStaffCompleteMsg() -->
+<!-- include '/setting/staffMsg' -->
+<!-- endif -->

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

@@ -22,6 +22,7 @@
 		    	<ul class="navTabs">
 					  <li class="active"><a href="#">入职审批</a></li>
 					  <li><a href="/leaveOfficeApprovals">离职审批</a></li>
+					  <li><a href="/regularApprovals">转正审批</a></li>
 					</ul>
 				</div>
 				<!--入职审批-->

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

@@ -43,6 +43,8 @@
 									待入职
 									<!-- elseif {{staffList' value.pendStatus}}==3 -->
 									待离职
+									<!-- elseif {{staffList' value.pendStatus}}==5 -->
+									待转正
 									<!-- endif -->
 									</td>
 									<td>
@@ -50,6 +52,8 @@
 									<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" node-approvalsDimission node-sidKey="{{staffList' value.sidKey}}" href="#approvalDimission" data-toggle="modal">离职审批</a>
+									<!-- elseif {{staffList' value.pendStatus}}==5 -->
+									<a class="button btn-block" node-approvalsRegular node-sidKey="{{staffList' value.sidKey}}" href="#approvalRegular" data-toggle="modal">转正审批</a>
 									<!-- endif -->
 									</td>
 									</tr>
@@ -120,6 +124,30 @@
 		</form>
 	</div>
 	
+	<!--弹出(审批员工转正)-->
+	<div class="modal hide fade" id="approvalRegular">
+	<form method="post" action="/employeeRegularApprovals" name="group">
+	<input type="hidden" name="sidKey" id='sidKeyRegular'  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="approvalDimission">
 	<form method="post" action="/employeeDimissionApprovals" name="group">

+ 14 - 5
protected/view/humanResource/hrEmployee.html

@@ -117,8 +117,10 @@
 							待入职
 						<!-- elseif {{stafflist' value.pendStatus}}==3 -->
 							待离职
+						<!-- elseif {{stafflist' value.pendStatus}}==5 -->
+							待转正
 						<!-- elseif {{stafflist' value.pendStatus}}==4 -->
-							<!-- if {{stafflist' value.nature}}==1 -->
+							<!-- if {{stafflist' value.nature}}!=4 -->
 							<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>
@@ -148,8 +150,8 @@
 	<!--弹出(更新员工信息)-->
 	<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">
+	<input type="hidden" name="sidKey" id='sidKeyEmployeeInfo'  value="">
+	<input type="hidden" name="employeeInfo"   value="hrEmployee">
 		<div class="modal-dialog modal-xlg">
 			<div class="modal-content">
 			<div id='EMPLOYEENC'>
@@ -212,7 +214,14 @@
 								</select>
 								</td>
 								<th class="taC" width="150">岗位</th>
-								<td><input type="text" name='position' id='position' value="">
+								<td>
+								
+								<select name='position' id='position'>
+								<!-- loop listPosition -->
+								<option value="{{categoryList' value.pidKey}}_{{categoryList' value.positionName}}">{{categoryList' value.positionName}}</option>
+								<!-- endloop -->
+								</select>
+								
 								</td>
 							</tr>
 							
@@ -237,7 +246,7 @@
 								<th class="taC" width="150"></th><td></td>
 							</tr>
 						</table>
-						<p class="alert alert-">短信通知例子:「张三欢迎加入纵横大家庭,这是您的CLD账号密码:张三 sa4kj,请登录完成入职申请。」</p>
+						<p class="alert alert-">短信通知例子:「张三,欢迎加入纵横大家庭,请电脑打开cld.smartcost.com.cn,使用账号“张三”登录(免密码)CLD进行入职申请。」</p>
 				</div>
 				<div class="modal-footer">
 					<input type="submit" class="button" value="确定添加">

+ 20 - 1
protected/view/humanResource/hrMenu.html

@@ -1,11 +1,26 @@
+
 <ul>
 	<li class="staffTitle">人资管理</li>
+	<!-- if {{isHR}}||{{isALLHR}} -->
 	<li><a <!-- if {{hrMemu}}=="hr" --> class="selected" <!-- endif --> href="/hr">首页</a></li>
+	<!-- endif -->
+	
+	<!-- if {{isALLHR}} -->
+	
+	<!-- 
 	<li><a href="staff-organization.html">组织</a></li>
+	 -->
 	<li><a href="/hrEmployee"
 			<!-- if {{hrMemu}}=="hrEmployeeInfo" --> class="selected" <!-- endif -->
 			>员工
 	</a></li>
+	
+	<li><a href="/position"
+			<!-- if {{hrMemu}}=="position" --> 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>
@@ -15,8 +30,12 @@
 	<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>
+	
+	<!-- endif -->
+</ul>
+

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

@@ -22,6 +22,7 @@
 		    	<ul class="navTabs">
 					  <li ><a href="/employeeApprovals">入职审批</a></li>
 					  <li class="active"><a  href="#">离职审批</a></li>
+					  <li><a href="/regularApprovals">转正审批</a></li>
 					</ul>
 				</div>
 				<!--入职审批-->

+ 74 - 11
protected/view/login.html

@@ -92,6 +92,46 @@
 							 </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><input type="text" name='nation' id='nation' value='{{staff.nation}}'></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='graduateInstitutions' id='graduateInstitutions' value='{{staff.graduateInstitutions}}'>
+							</td>
+							<th class="taC" width="150">所学专业</th>
+							<td><input type="text" name='major' id='major' value='{{staff.major}}'></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">毕业学历</th>
+							<td>
+							<select name='education' id='education' >
+							<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><input type="date" name='graduationTime' id='graduationTime' value='{{staff.graduationTime}}'></td>
+						</tr>
 						<tr>
 							<th class="taC" width="150">最高学历</th>
 							<td><select name='qualifications' id='qualifications'>
@@ -104,30 +144,53 @@
 							<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='registeredResidence' id='registeredResidence' value='{{staff.registeredResidence}}' data-placement="bottom" data-toggle="ctooltip" data-original-title="请填写户口本详细地址" /></td>
+							<th class="taC" width="150">户籍类型</th>
+							<td>
+							<select name='householdRegistrationType' id='householdRegistrationType' value='{{staff.householdRegistrationType}}'>
+							<option value='城镇户口'>城镇户口</option>
+							<option value='农业户口'>农业户口</option>
+							</select>
+							</td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">现居住地址</th>
+							<td colspan="3"><input type="text" name='living' id='living' value='{{staff.living}}' style="width:500px"></td>
+						</tr>
+						<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="例:广东省珠海市" />
+							<input type="text" name='nativePlace' id='nativePlace' value='{{staff.nativePlace}}' 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>
+							<input name='emergencyContacts' id='emergencyContacts' type="text" value='{{staff.emergencyContacts}}' data-placement="bottom" data-toggle="ctooltip" data-original-title="例:张三(老婆)15003850888"></td>
 						</tr>
+						
+					</table>
+					
+					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="150">现居住地址</th>
-							<td colspan="3"><input type="text" name='living' id='living' style="width:500px"></td>
+							<th class="taC" width="150">身份证号码</th>
+							<td width="260">
+							<input type="text" name='IDcards' id='IDcards' value='{{staff.IDcards}}' data-placement="bottom" data-toggle="ctooltip" data-original-title="例:440476528372638192" /></td>
+							<th class="taC" width="150">身份证有效期</th>
+							<td>
+							<input type="date" name='IDcardsValidity' id='IDcardsValidity' value='{{staff.IDcardsValidity}}'></td>
 						</tr>
 					</table>
+					
 				</div>
 				<div class="modal-footer">
 					<input type="submit" class="button" vlaue="申请入职">

+ 4 - 0
protected/view/mailMenu.html

@@ -3,8 +3,12 @@
 <!-- if {{staff.0.category}}=="总部" -->
 <li><a <!-- if {{mailMemu}}=="eMialCenter" --> class='selected' <!-- endif --> href="/eMialCenter">邮单中心</a></li>
 <!-- endif -->
+
+<!-- if {{staff.0.category}}=="55789总部" -->
 <li class="topLine"><a <!-- if {{mailMemu}}=="sms" --> class='selected' <!-- endif --> href="/sms">创建短信</a></li>
 <li><a <!-- if {{mailMemu}}=="smsList" --> class='selected' <!-- endif --> href="/smsList">短信列表</a></li>
+
 <!-- if {{staff.0.category}}=="总部" -->
 <li><a <!-- if {{mailMemu}}=="smsCenter" --> class='selected' <!-- endif --> href="/smsCenter">短信中心</a></li>
+<!-- endif -->
 <!-- endif -->

+ 10 - 7
protected/view/menu.html

@@ -24,33 +24,36 @@
 <!-- endif -->
 
 <!-- if isShowMenu('INVOICE') -->
-<li data-placement="right" data-toggle="ctooltip" <!-- if isInvoiceNew() --> class="news" <!-- endif --> data-original-title="发票申请">
+<li data-placement="right" data-toggle="ctooltip"  data-original-title="发票申请">
 <a href="/invoice" class="icon- <!-- if {{memu}}=="invoice" --> selected <!-- endif -->">D</a>
 </li>
 <!-- endif -->
 
+
 <!-- if isShowMenu('HR') -->
-<li data-placement="right" data-toggle="ctooltip" data-original-title="人资管理">
+<li data-placement="right" data-toggle="ctooltip" <!-- if isHRNew() --> class="news" <!-- endif --> data-original-title="人资管理">
 <a href="/hr" class="icon- <!-- if {{memu}}=="HumanResource" --> selected <!-- endif -->">m</a>
 </li>
 <!-- endif -->
 
-<!-- if isShowMenu('EMAIL') -->
-<li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
-<a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>
-<!-- endif -->
+
+
+
+
 
 <li data-placement="right" data-toggle="ctooltip" data-original-title="假期管理">
     <a href="/myList" class="icon- <!-- if {{memu}}=="holiday" --> selected <!-- endif -->">X</a>
 </li>
     
+<li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
+<a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>    
     
 <li data-placement="right" data-toggle="ctooltip" class="topLine" data-original-title="APP" >
 <a href="/app" class="icon- <!-- if {{memu}}=="app" --> selected <!-- endif -->">Y</a>
 </li>
 
 
-<li data-placement="right" data-toggle="ctooltip" data-original-title="个人设置" ><a href="/adminmyinfo" class="icon- <!-- if {{memu}}=="adminlock"||{{memu}}=="adminmyinfo"||{{memu}}=="adminoffice" --> selected <!-- endif -->" >F</a></li> 
+<li data-placement="right" style="display:none" data-toggle="ctooltip" data-original-title="个人设置" ><a href="/adminmyinfo" class="icon- <!-- if {{memu}}=="adminlock"||{{memu}}=="adminmyinfo"||{{memu}}=="adminoffice" --> selected <!-- endif -->" >F</a></li> 
 
 <li data-placement="right" data-toggle="ctooltip" data-original-title="个人设置" >
 <a href="/settingEmployeeInfo" class="icon- <!-- if {{memu}}=="adminlock"||{{memu}}=="adminmyinfo"||{{memu}}=="adminoffice" --> selected <!-- endif -->" >F</a>

+ 33 - 24
protected/view/setting/settingCredentialInfo.html

@@ -16,13 +16,13 @@
 		window.onload = function() {
 			var settings = {
 					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
-					upload_url: "/settingCredentialInfoDo4",	// Relative to the SWF file
+					upload_url: "/settingCredentialInfoTypeDo/professionalTitle",	// Relative to the SWF file
 					
 					file_size_limit : "8 MB",
 					file_types : "*.jpg;*.gif;*.png",
  					file_types_description : "*.jpg;*.gif;*.png",
 					file_upload_limit : 8,
-					file_queue_limit : 3,
+					file_queue_limit : 1,
 					custom_settings : {
 						progressTarget : "fsUploadProgress",
 						cancelButtonId : "btnCancel"
@@ -52,13 +52,13 @@
 			
 			var diplomaSettings = {
 					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
-					upload_url: "/settingCredentialInfoDo3",	// Relative to the SWF file
+					upload_url: "/settingCredentialInfoTypeDo/diploma",	// Relative to the SWF file
 					
 					file_size_limit : "8 MB",
 					file_types : "*.jpg;*.gif;*.png",
 					file_types_description : "*.jpg;*.gif;*.png",
 					file_upload_limit : 8,
-					file_queue_limit : 3,
+					file_queue_limit : 1,
 					custom_settings : {
 						progressTarget : "fsUploadProgress",
 						cancelButtonId : "btnCancel"
@@ -86,13 +86,13 @@
 	
 			var CertificateSettings = {
 					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
-					upload_url: "/settingCredentialInfoDo2",	// Relative to the SWF file
+					upload_url: "/settingCredentialInfoTypeDo/certificate",	// Relative to the SWF file
 					
 					file_size_limit : "8 MB",
 					file_types : "*.jpg;*.gif;*.png",
 					file_types_description : "*.jpg;*.gif;*.png",
 					file_upload_limit : 8,
-					file_queue_limit : 3,
+					file_queue_limit : 1,
 					custom_settings : {
 						progressTarget : "fsUploadProgress",
 						cancelButtonId : "btnCancel"
@@ -162,14 +162,19 @@
 				
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="150">身份证号码</th>
-							<td colspan="3"><input type="text" name="IDcards" value="{{staff.IDcards}}"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>身份证号码</th>
+							<td <!-- if empty({{staff.IDcards}}) --> class="alert-warning" <!-- endif --> colspan="3"><input type="text" name="IDcards" value="{{staff.IDcards}}"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">正面(国徽)</th>
+							<th class="taC" width="150"><b class="colRed">* </b>身份证有效期</th>
+							<td <!-- if {{staff.IDcardsValidity}}='0000-00-00' --> class="alert-warning" <!-- endif --> colspan="3">
+							<input type="date" name="IDcardsValidity" value="{{staff.IDcardsValidity}}"></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150"><b class="colRed">* </b>正面(国徽)</th>
 							<td width="260"><input type="file" name="IDcardsImgA">
 							</td>
-							<td colspan="2">
+							<td colspan="2" <!-- if empty({{staff.IDcardsImgA}}) --> class="alert-warning" <!-- endif -->>
 								<p>
 									<!-- if !{{empty(staff.IDcardsImgA)}} -->
 									正面(国徽) <a href="{{staff.IDcardsImgA}}" target="_blank">查看</a>
@@ -178,11 +183,11 @@
 							</td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">反面(照片)</th><td width="260"><input type="file" name="IDcardsImgB"></td>
-							<td colspan="2">
+							<th class="taC" width="150"><b class="colRed">* </b>反面(照片)</th><td width="260"><input type="file" name="IDcardsImgB"></td>
+							<td colspan="2" <!-- if empty({{staff.IDcardsImgB}}) --> class="alert-warning" <!-- endif -->>
 								<p>
 								<!-- if !{{empty(staff.IDcardsImgB)}} -->
-									正面(照片) <a href="{{IDcardsImgB}}" target="_blank">查看</a>
+									正面(照片) <a href="{{staff.IDcardsImgB}}" target="_blank">查看</a>
 									<!-- endif -->
 									 
 								</p>
@@ -194,7 +199,7 @@
 					
 					<table class="table table-bordered table-condensed">
 						<tr>
-							<th class="taC" width="150">毕业证书</th><td width="260">
+							<th class="taC" width="150"><b class="colRed">* </b>毕业证书</th><td width="260">
 							
 							<div class="controls">
 			            	<span id="spanButtonCertificate"></span>			
@@ -202,13 +207,15 @@
 							
 							
 							</td>
-							<td colspan="2">
+							<td colspan="2" <!-- if empty({{staff.certificate}})||{{staff.certificate}}=='[]' --> class="alert-warning" <!-- endif --> >
 								
 									<!-- if !{{empty(staff.certificate)}} -->
+									<!-- loop staff.certificateArray -->
 									<p>
-									毕业证书1 <a href="IDcardsImgB" target="_blank">查看</a>
-									<a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+									毕业证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a>
+									<a href="/delCredentialType/certificate/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
 									</p>
+									<!-- endloop -->
 									<!-- endif -->
 								
 								
@@ -228,10 +235,12 @@
 							<td colspan="2">
 								
 									<!-- if !{{empty(staff.diploma)}} -->
+									<!-- loop staff.diplomaArray -->
 									<p>
-									学位证书1 <a href="IDcardsImgB" target="_blank">查看</a>
-									<a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+									学位证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a>
+									<a href="/delCredentialType/diploma/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
 									</p>
+									<!-- endloop -->
 									<!-- endif -->
 								
 								
@@ -248,15 +257,15 @@
 			            	<span id="spanButtonPlaceHolder"></span>			
 			            </div>
 						
-			            
-							
 							<td colspan="2">
 							
-							
 							<!-- if !{{empty(staff.professionalTitle)}} -->
+							<!-- loop staff.professionalTitleArray -->
 								<p>
-									职称证书1 <a href="#" target="_blank">查看</a> <a href="#" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
+									职称证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a> 
+									<a href="/delCredentialType/professionalTitle/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
 								</p>
+								<!-- endloop -->
 							<!-- endif -->	
 								
 								
@@ -274,7 +283,7 @@
 					
 					<div class="control-group">
 						<div class="controls">
-							<button type="submit" class="button">确认修改</button>
+							<button type="submit" class="button">确认上传</button>
 						</div>
 					</div>
 					

+ 118 - 32
protected/view/setting/settingEmployeeInfo.html

@@ -24,6 +24,24 @@
 			
 			<div class="adminContent autoHeight">
 				<div class="subNav">
+				
+				<div class="fR">
+					<!-- if {{staff.pendStatus}}==3||{{staff.pendStatus}}==5 -->
+							<!-- if {{staff.pendStatus}}==3 -->
+							<a href="javascript:void(0)" data-toggle="modal" class="button fR">你已经申请了离职</a>
+							<!-- else -->
+							<a href="javascript:void(0)" data-toggle="modal" class="button fR">你已经申请转正</a>
+							<!-- endif -->
+					<!-- else -->
+						<a href="#resignation" data-toggle="modal" class="button fR">离职申请</a>
+						
+					<!-- endif -->
+					<!-- if {{staff.nature}}==2||{{staff.nature}}==3 -->
+					<a href="#turn" data-toggle="modal" class="button fR">转正申请</a>
+					<!-- endif -->
+					
+				</div>
+				
 		    	<ul class="navTabs">
 					  <li class="active"><a href="#">基本信息</a></li>
 					  <li><a href="/settingCredentialInfo">证件信息</a></li>
@@ -39,42 +57,84 @@
 					<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>
+							<th class="taC" width="150"><b class="colRed">* </b>工号</th><td  width="260">{{staff.jobNumber}}</td>
+							<th class="taC" width="150"><b class="colRed">* </b>姓名</th><td><input type="text" value="{{staff.username}}" disabled></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">办事处/部门</th>
+							<th class="taC" width="150"><b class="colRed">* </b>办事处/部门</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>
+							<th class="taC" width="150"><b class="colRed">* </b>岗位</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' value="{{staff.telephone}}"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>入职日期</th><td><input type="date" value="{{staff.hiredate}}" disabled></td>
+							<th class="taC" width="150"><b class="colRed">* </b>手机</th><td <!-- if empty({{staff.telephone}}) --> class="alert-warning" <!-- endif --> ><input type="text" name='telephone' value="{{staff.telephone}}"></td>
 						</tr>
 						<tr>
-							<th class="taC">QQ</th><td><input type="text" name='qq' value="{{staff.qq}}"></td>
+							<th class="taC"><b class="colRed">* </b>QQ</th><td<!-- if empty({{staff.qq}}) --> class="alert-warning" <!-- endif --> ><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" name='phone' value="{{staff.phone}}"></td>
+							<th class="taC"><b class="colRed">* </b>电话</th><td<!-- if empty({{staff.phone}}) --> class="alert-warning" <!-- endif -->><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>
+							<th class="taC" width="150"><b class="colRed">* </b>性别</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>
-							<th class="taC" width="150">出生日期</th>
-							<td><input type="date" name='birthday' value="{{staff.birthday}}"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>出生日期</th>
+							<td<!-- if empty({{staff.birthday}}) --> class="alert-warning" <!-- endif -->><input type="date" name='birthday' value="{{staff.birthday}}"></td>
 						</tr>
 						<tr>
-							<th class="taC" width="150">最高学历</th>
+							<th class="taC" width="150">民族</th><td<!-- if empty({{staff.nation}}) --> class="alert-warning" <!-- endif -->><input type="text" name='nation' id='nation' value='{{staff.nation}}'></td>
+							<th class="taC" width="150"><b class="colRed">* </b>婚姻状况</th>
+							<td>
+							<select name='marriage' id='marriage' <!-- if empty({{staff.marriage}}) --> class="alert-warning" <!-- endif -->>
+							<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>
+					
+					<table class="table table-bordered table-condensed">
+						<tr>
+							<th class="taC" width="150">毕业院校</th>
+							<td width="260" <!-- if empty({{staff.graduateInstitutions}}) --> class="alert-warning" <!-- endif -->>
+							<input type="text" name='graduateInstitutions' id='graduateInstitutions' value='{{staff.graduateInstitutions}}'>
+							</td>
+							<th class="taC" width="150">所学专业</th>
+							<td <!-- if empty({{staff.major}}) --> class="alert-warning" <!-- endif -->>
+							<input type="text" name='major' id='major' value='{{staff.major}}'></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150">毕业学历</th>
+							<td<!-- if empty({{staff.education}}) --> class="alert-warning" <!-- endif -->>
+							<select name='education' id='education' >
+							<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<!-- if {{staff.graduationTime}}='0000-00-00' --> class="alert-warning" <!-- endif -->>
+							<input type="date" name='graduationTime' id='graduationTime' value='{{staff.graduationTime}}'></td>
+						</tr>
+						<tr>
+							<th class="taC" width="150"><b class="colRed">* </b>最高学历</th>
 							<td>
 							<select name='qualifications' id='qualifications'>
 							<option <!-- if {{staff.qualifications}}=='初中' -->selected<!-- endif --> value='初中'>初中</option>
@@ -85,35 +145,40 @@
 							<option <!-- if {{staff.qualifications}}=='硕士' -->selected<!-- endif --> value='硕士'>硕士</option>
 							</select>
 							</td>
-							<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>
+					
 					<table class="table table-bordered table-condensed">
+					
+					<tr>
+							<th class="taC" width="150">户口所在地</th>
+							<td width="260" <!-- if empty({{staff.registeredResidence}}) --> class="alert-warning" <!-- endif -->>
+							<input type="text" name='registeredResidence' id='registeredResidence' value='{{staff.registeredResidence}}' data-placement="bottom" data-toggle="ctooltip" data-original-title="请填写户口本详细地址" /></td>
+							<th class="taC" width="150">户籍类型</th>
+							<td <!-- if empty({{staff.householdRegistrationType}}) --> class="alert-warning" <!-- endif -->>
+							<select name='householdRegistrationType' id='householdRegistrationType' value='{{staff.householdRegistrationType}}'>
+							<option value='城镇户口'>城镇户口</option>
+							<option value='农业户口'>农业户口</option>
+							</select>
+							</td>
+						</tr>
+					
 						<tr>
-							<th class="taC" width="150">现居住地</th>
-							<td colspan="3"><input type="text" name='living' value="{{staff.living}}" style="width:500px"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>现居住地</th>
+							<td <!-- if empty({{staff.living}}) --> class="alert-warning" <!-- endif --> 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" 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>
+							<th class="taC" width="150"><b class="colRed">* </b>籍贯</th>
+							<td <!-- if empty({{staff.nativePlace}}) --> class="alert-warning" <!-- endif --> 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"><b class="colRed">* </b>紧急联系人</th>
+							<td <!-- if empty({{staff.emergencyContacts}}) --> class="alert-warning" <!-- endif -->><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">
-							<!-- if {{staff.pendStatus}}!=23 -->
-							<a href="#resignation" data-toggle="modal" class="button fR">离职申请</a>
-							<!-- else -->
-							你已经申请了离职
-							<!-- endif -->
+							
 							<input type="submit" class="button" value="确认修改">
 						</div>
 					</div>
@@ -128,6 +193,27 @@
 			</div>
 		</div>
 	</div>
+	
+	<!--弹出转正申请-->
+	<div class="modal hide fade" id="turn">
+	<form method="post" action="/appliedRegular" id="appliedRegular" >
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>申请转正</h3>
+				</div>
+				<div class="modal-body saeaList">
+					<h4>申请提交后,需要等待人资审批,通过后,您将成为我们的正式员工,享受更好的福利待遇。</h4>
+				</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="resignation">
 	<form method="post" action="/appliedDimission" id="appliedDimission" >
@@ -141,7 +227,7 @@
 						<p class="alert alert-">感谢您的付出与努力。</p>
 				</div>
 				<div class="modal-footer">
-				<input type="submit" class="button" value="确定提交">
+					<input type="submit" class="button" value="确定提交">
 
 					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
 				</div>

+ 13 - 13
protected/view/setting/settingFinanceInfo.html

@@ -37,31 +37,31 @@
 								<th colspan="4" class="taC">报销收款帐号</th>
 						</tr>
 						<tr>
-							<th class="taC" width="150">款人户名</th>
-							<td width="260"><input type="text" name="remittanceName" value="{{staff.remittanceName}}" ></td>
+							<th class="taC" width="150"><b class="colRed">* </b>收款人户名</th>
+							<td <!-- if empty({{staff.remittanceName}}) --> class="alert-warning" <!-- endif --> 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 class="tipFather">
+							<input type="text" name="coupletNumber" value="{{staff.coupletNumber}}">&nbsp;<span class="tipGray">?</span><div class="tipContent tipConactive"><p>1.如不是公司广发,务必填上银行联行号</p><p>2.如不清楚银行联行号请咨询报销查款专用 QQ:2870766094</p></div>
 							
 							</td>
 						</tr>
 						<tr>
-							<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>
+							<th class="taC" width="150"><b class="colRed">* </b>收款开户银行名称</th>
+							<td <!-- if empty({{staff.bankName}}) --> class="alert-warning" <!-- endif --> width="260"><input type="text" name="bankName" value="{{staff.bankName}}"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>收款帐号</th>
+							<td <!-- if empty({{staff.bankNumber}}) --> class="alert-warning" <!-- endif -->><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>
+								<th colspan="4" class="taC"><b class="colRed">* </b>工资卡</th>
 						</tr>
 						<tr>
-							<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>
+							<th class="taC" width="150"><b class="colRed">* </b>银行卡号</th>
+							<td <!-- if empty({{staff.salaryCard}}) --> class="alert-warning" <!-- endif --> width="260"><input type="text" name="salaryCard" value="{{staff.salaryCard}}"></td>
+							<th class="taC" width="150"><b class="colRed">* </b>开户行</th>
+							<td <!-- if empty({{staff.salaryBank}}) --> class="alert-warning" <!-- endif -->><input type="text" name="salaryBank" value="{{staff.salaryBank}}"><p class="colGray">请详细至具体支行</p></td>
 						</tr>
 					</table>
 					<div class="control-group">

+ 2 - 1
protected/view/setting/settingMenu.html

@@ -1,6 +1,7 @@
 <ul>
+<!-- 
 						<li><a href="admin-myinfo-borard.html">员工首页</a></li>
-						
+					 -->	
 						<li><a href="/settingEmployeeInfo" <!-- if {{hrMemu}}=="settingEmployeeInfo" --> class="selected" <!-- endif --> >员工信息</a></li>
 						<li><a <!-- if {{hrMemu}}=="notificationConf" --> class="selected" <!-- endif --> href="/notificationConf">微信通知</a></li>
 						<li><a href="/settingPW" <!-- if {{hrMemu}}=="settingPW" --> class="selected" <!-- endif --> target="">修改密码</a></li>