
shr.defineClass("shr.affair.hrman.FluctuationBizBillHrManEditExt", shr.affair.hrman.FluctuationBizBillHrManEdit, {
	
	initalizeDOM : function () {
		var _self = this;
		shr.affair.hrman.FluctuationBizBillHrManEditExt.superClass.initalizeDOM.call(this);
		if(this.operateState.toUpperCase() != 'VIEW'){
			_self.personChange(); 
		}
		
	},
	
	personChange:function(){
		var self = this;
		self.getField("entrys_oldPosition").on("change", function(){
			var personId =  $("#entrys_person_el").val();
			var positionId = $("#entrys_oldPosition_el").val();
			self.remoteCall({
				method : 'getEmpOrgRelation',
				async : false,
				param : {
						"personId" : personId,
						"positionId" : positionId
						},
				success:function(data){
					//【调动前直属上级】
					$("#entrys_clmanager").shrPromptBox("setValue", {id:data.leaderId,name:data.leaderName});
					
					//【员工类别】 
					$("#entrys_workercategory").shrPromptBox("setValue", {id:data.personTypeId,name:data.personTypeName});
					
					//【全职或兼职】
					//$("#entrys_fullorpart").shrPromptBox('setValue',{id:data.fullorpartID,name:data.fullorpartName});
					
					//【Academic Title】
					$("#entrys_academictitle").shrPromptBox("setValue", {id:data.academicId,name:data.academicName});
					
					//【Admin Title】
					self.getField("entrys_admintitle").shrTextField('setValue',data.admint);
					
					//【当前时薪】
					self.getField("entrys_chrate").shrTextField('setValue',data.hourlywage);
					
					//【Job2】
					self.getField("entrys_jobs").shrPromptBox('setValue',{id:data.jobTwoId,name:data.jobTwoName});
				}
			});

		});
		
	},
	
	
});