//多人员工兼职终止单拓展  202503
shr.defineClass( "shr.affair.hrman.PluralityDelBizBilllMultiEntryHrManEditExt", shr.affair.hrman.PluralityDelBizBilllMultiEntryHrManEdit, {

 

	initalizeDOM : function () {
		var self = this;
		shr.affair.hrman.PluralityDelBizBilllMultiEntryHrManEditExt.superClass.initalizeDOM.call(this);
		self.setBizBillInfoOsfName("getPersonPluralityDelBizBillInfoService");
	},


    assembleCustomRowData : function(rowdata, data, commonData, defaultValue){
		var self = this;
		if(commonData.company){
			self.buildPositionFilter(commonData.person.id, commonData.company.id);
		}
		if(commonData.hrbizdefine[0].affairActionReason.length==1){
			rowdata.affairActionReason=commonData.hrbizdefine[0].affairActionReason[0];
		}
		if(commonData.hrbizdefine[0].variationReason.length==1){
			rowdata.variationReason=commonData.hrbizdefine[0].variationReason[0];
		}
		if(commonData.hrbizdefine[0].outEmpType.length==1){
			rowdata.empType=commonData.hrbizdefine[0].outEmpType[0];
		}
        //202503 直接上级赋值
        var personId =  rowdata.person.id ;
		var positionId = rowdata.oldPosition.id ;
        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){
                //【直属上级】
                rowdata.ptlmanager = {id:data.leaderId,name:data.leaderName}
                //【当前时薪】
                rowdata.pthwage = data.hourlywage
				//【 离职日期】
				rowdata.bizDate = data.leftDate 

            }
        });
		return rowdata;
	},

});