
shr.defineClass("shr.affair.hrman.PluralityDelBizBillHrManEditExt", shr.affair.hrman.PluralityDelBizBillHrManEdit, {
	
	initalizeDOM : function () {
		var _self = this;
		shr.affair.hrman.PluralityDelBizBillHrManEditExt.superClass.initalizeDOM.call(this);
		if(this.operateState.toUpperCase() != 'VIEW'){
			_self.positionChange(); 
		}
	},
	
	//兼职职位监控
	positionChange:function(){
		var self = this;
		
		self.getField("entrys_oldPosition").on("change", function(){
			var personId =  $("#entrys_person_el").val();
			var positionId = $("#entrys_oldPosition_el").val();
			shr.callHandler({
				handler : "com.kingdee.shr.affair.web.handler.hrman.FluctuationBizBillHrManEditHandlerEx",
				action : 'getPartEmpOrgRelation',
				async : false,
				type : "POST",
				param : {
						"personId" : personId,
						"positionId" : positionId
						},
				success:function(data){
					//【直属上级】
					$("#entrys_ptlmanager").shrPromptBox("setValue", {id:data.leaderId,name:data.leaderName});
					//【当前时薪】
					self.getField("entrys_pthwage").shrTextField('setValue',data.hourlywage);
					// 【离职日期】
					self.getField("entrys_bizDate").shrDateTimePicker('setValue',data.leftDate);
				}
			});
			
		});
	},
	
});