|  |  |  | 
|---|
|  |  |  | <requireRowSelection>true</requireRowSelection> | 
|---|
|  |  |  | <url>{!RequireScript("/soap/ajax/51.0/connection.js")} | 
|---|
|  |  |  | {!RequireScript("/soap/ajax/51.0/apex.js")} | 
|---|
|  |  |  | //2021-10-21 gwy 版本更改为51.0 | 
|---|
|  |  |  | var foo = function() { | 
|---|
|  |  |  | //LJPH-BYZ4JT 【委托】修理画面“修理品返送地”问题调查-后续 精琢技术 wql 20210311 start | 
|---|
|  |  |  | var sql = "SELECT Parent.RecordTypeId ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID= '{!Account.Id}' "; | 
|---|
|  |  |  | var sql = "SELECT ParentId,Parent.RecordTypeId ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID= '{!Account.Id}' "; | 
|---|
|  |  |  | //LJPH-BYZ4JT 【委托】修理画面“修理品返送地”问题调查-后续 精琢技术 wql 20210311 end | 
|---|
|  |  |  | var List = sforce.connection.query(sql); | 
|---|
|  |  |  | var RecordTypeId = List['records']['Parent']['RecordTypeId'].substring(0,15); | 
|---|
|  |  |  | var RecordTypeId; | 
|---|
|  |  |  | var Incharge_Staff = ''; | 
|---|
|  |  |  | var Incharge_Staff_id = ''; | 
|---|
|  |  |  | var Work_Location =''; | 
|---|
|  |  |  | if(List['records']['ParentId'] !=null){ | 
|---|
|  |  |  | RecordTypeId = List['records']['Parent']['RecordTypeId'].substring(0,15); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var FSE_GI_Main_Leader__id = ''; | 
|---|
|  |  |  | var FSE_GI_Main_Leader__name = ''; | 
|---|
|  |  |  | var FSE_SP_Main_Leader__id =''; | 
|---|
|  |  |  | 
|---|
|  |  |  | FSE_SP_Main_Leader__name = List['records']['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //LJPH-BYZ4JT 【委托】修理画面“修理品返送地”问题调查-后续 精琢技术 wql 20210311 start | 
|---|
|  |  |  | var Work_Location = '' ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(List['records']['Parent']['RecordTypeId'] !=null || List['records']['Parent']['RecordTypeId']!=''){ | 
|---|
|  |  |  | var recordId = List['records']['Parent']['RecordTypeId'].substring(0,15); | 
|---|
|  |  |  | //战略科室取消化科、呼吸科、ET 取GI主担当 | 
|---|
|  |  |  | 
|---|
|  |  |  | //LJPH-BYZ4JT 【委托】修理画面“修理品返送地”问题调查-后续 精琢技术 wql 20210311 end | 
|---|
|  |  |  | //var FSE_SP_Main_Leader__id = List['records']['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0,15); | 
|---|
|  |  |  | //var FSE_SP_Main_Leader__name = List['records']['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; | 
|---|
|  |  |  | var Incharge_Staff = ''; | 
|---|
|  |  |  | var Incharge_Staff_id = ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(RecordTypeId=='01210000000QemL'){ Incharge_Staff = FSE_GI_Main_Leader__name ; Incharge_Staff_id = FSE_GI_Main_Leader__id ;} | 
|---|
|  |  |  | if(RecordTypeId=='01210000000QezZ'){ Incharge_Staff = FSE_GI_Main_Leader__name ; Incharge_Staff_id = FSE_GI_Main_Leader__id ;} | 
|---|
|  |  |  | if(RecordTypeId=='01210000000QemQ'){ Incharge_Staff = FSE_GI_Main_Leader__name ; Incharge_Staff_id = FSE_GI_Main_Leader__id ;} | 
|---|
|  |  |  | 
|---|
|  |  |  | if(RecordTypeId=='01210000000Qezt'){ Incharge_Staff = FSE_SP_Main_Leader__name ; Incharge_Staff_id = FSE_SP_Main_Leader__id ;} | 
|---|
|  |  |  | if(RecordTypeId=='01210000000Qezo'){ Incharge_Staff = FSE_SP_Main_Leader__name ; Incharge_Staff_id = FSE_SP_Main_Leader__id ;} | 
|---|
|  |  |  | if(RecordTypeId=='01210000000Qezy'){ Incharge_Staff = FSE_SP_Main_Leader__name ; Incharge_Staff_id = FSE_SP_Main_Leader__id ;} | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var url = "/a0J/e?CF00N10000002Dx66_lkid={! URLENCODE(Account.HospitalId__c)}&CF00N10000002Dx66={!URLENCODE(Account.Hospital__c)}&CF00N10000002Dx5t_lkid={!URLENCODE(Account.Department_ClassId__c)}&CF00N10000002Dx5t={!URLENCODE(Account.Department_Class__c)}&CF00N10000002Dx5n_lkid={!URLENCODE(Account.Id)}&CF00N10000002Dx5n={!URLENCODE(Account.Name)}&CF00N10000002EMHw_lkid="+Incharge_Staff_id+"&CF00N10000002EMHw="+Incharge_Staff+"&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn={!URLENCODE( $User.RepairSalesPoint_Province_China__c )}&00N10000006P6SM="+encodeURI(Work_Location)+"&retURL=%2F{!URLENCODE(Account.Id)}"; | 
|---|
|  |  |  | window.open(url); | 
|---|
|  |  |  | } | 
|---|