From f0bccccbb88d93ac05010c17d4b2e0cb22a2ce9a Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 20 四月 2023 15:45:11 +0800
Subject: [PATCH] backup0420
---
force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml b/force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml
index 035b1b1..967dd03 100644
--- a/force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml
+++ b/force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml
@@ -10,18 +10,25 @@
<requireRowSelection>false</requireRowSelection>
<url>{!RequireScript("/soap/ajax/51.0/connection.js")}
{!RequireScript("/soap/ajax/51.0/apex.js")}
-//2021-10-21 gwy 鐗堟湰鏇存敼涓�51.0
+
+
var newflag = false;
if (('{!QIS_Report__c.OCM_judgement__c}'=='璐ㄩ噺闂' && '{!QIS_Report__c.next_action__c}'=='鏃犲伩缁翠慨' && '{!QIS_Report__c.Special_follow__c}'=='0') || ('{!QIS_Report__c.OCM_judgement__c}'=='闈炶川閲忛棶棰�' && '{!QIS_Report__c.next_action__c}'=='鏃犲伩缁翠慨' && '{!QIS_Report__c.Special_follow__c}'=='1') || ('{!QIS_Report__c.OCM_judgement__c}'=='闈炶川閲忛棶棰�' && '{!QIS_Report__c.next_action__c}'=='鏈夊伩缁翠慨' && '{!QIS_Report__c.Special_follow__c}'=='0') || ('{!QIS_Report__c.OCM_judgement__c}'=='璐ㄩ噺闂+闈炶川閲忛棶棰�' && '{!QIS_Report__c.next_action__c}'=='鏃犲伩缁翠慨' && '{!QIS_Report__c.Special_follow__c}'=='1') || ('{!QIS_Report__c.OCM_judgement__c}'=='璐ㄩ噺闂+闈炶川閲忛棶棰�' && '{!QIS_Report__c.next_action__c}'=='鏈夊伩缁翠慨+鏃犲伩缁翠慨' && '{!QIS_Report__c.Special_follow__c}'=='0')) {
newflag = true;
}
if (newflag) {
+
//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= '{!QIS_Report__c.Hospital_DepartmentId__c}' ";
+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= '{!QIS_Report__c.Hospital_DepartmentId__c}' ";
//LJPH-BYZ4JT 銆愬鎵樸�戜慨鐞嗙敾闈⑩�滀慨鐞嗗搧杩旈�佸湴鈥濋棶棰樿皟鏌�-鍚庣画 绮剧悽鎶�鏈� wql 20210311 end
var List = sforce.connection.query(sql);
+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 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 ='';
@@ -37,7 +44,7 @@
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);
//鎴樼暐绉戝鍙栨秷鍖栫銆佸懠鍚哥銆丒T 鍙朑I涓绘媴褰�
@@ -57,8 +64,7 @@
//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 ;}
@@ -67,6 +73,7 @@
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 ;}
+}
window.open("/a0J/e?CF00N10000002FIJU_lkid={!URLENCODE(QIS_Report__c.Source_OnCallId__c)}&CF00N10000002FIJU={!URLENCODE(QIS_Report__c.Source_OnCall__c)}&CF00N10000002FIJZ_lkid={!URLENCODE(QIS_Report__c.Id)}&CF00N10000002FIJZ={!URLENCODE(QIS_Report__c.Name)}&CF00N10000002Dx66_lkid={!QIS_Report__c.HospitalId__c}&CF00N10000002Dx66={!URLENCODE(QIS_Report__c.Hospital__c)}&CF00N10000002Dx5t_lkid={!URLENCODE(QIS_Report__c.Department_ClassId__c)}&CF00N10000002Dx5t={!URLENCODE(QIS_Report__c.Department_Class__c)}&CF00N10000002Dx5n_lkid={!URLENCODE(QIS_Report__c.Hospital_DepartmentId__c)}&CF00N10000002Dx5n={!URLENCODE(QIS_Report__c.Hospital_Department__c)}&CF00N10000002Dx1X_lkid={!URLENCODE(QIS_Report__c.nonyushohinId__c)}&CF00N10000002Dx1X={!URLENCODE(QIS_Report__c.nonyushohin__c)}&CF00N10000002EMHw_lkid="+Incharge_Staff_id+"&CF00N10000002EMHw="+Incharge_Staff+"&00N10000002Dx5y={!QIS_Report__c.Trable_occur_daY_collect__c}&00N10000006P6SM="+encodeURI(Work_Location)+"&00N10000002FH86={!URLENCODE(QIS_Report__c.source_for_repair__c)}&00N10000006P6Rn={!URLENCODE( $User.RepairSalesPoint_Province_China__c )}&retURL=%2F{!URLENCODE(QIS_Report__c.Id)}");
} else {
--
Gitblit v1.9.1