From b823c7f3569cf9368e2245846e918f78f32e903a Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期五, 15 四月 2022 11:38:47 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlympusSSBG
---
force-app/main/default/pages/TSRepair.page | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/pages/TSRepair.page b/force-app/main/default/pages/TSRepair.page
index 82b343c..9a7d5c8 100644
--- a/force-app/main/default/pages/TSRepair.page
+++ b/force-app/main/default/pages/TSRepair.page
@@ -395,18 +395,24 @@
}
var contactIdValue = '';
- function searchContact(contactNodeId,field1,field2,field3){
+ function searchContact(contactNodeId,field1,field2,field3,accountValueId){
closeField = field1;
closePhone = field2;
contactIdValue = field3;
- let baseUrl = "/apex/SearchContactPage";
- let suffixUrl = "?contactId="+contactNodeId;
- let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
- newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
- if (window.focus) {
- newSearchContactWindow.focus();
+ var accountValueLkid = document.getElementById(accountValueId+'_lkid').value;
+ var searchContactKeyWord = document.getElementById(field1).value;
+ if (accountValueLkid != '000000000000000') {
+ let baseUrl = "/apex/SearchContactPage";
+ let suffixUrl = "?contactId="+contactNodeId+ "&accountId=" + accountValueLkid;
+ let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
+ newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam);
+ if (window.focus) {
+ newSearchContactWindow.focus();
+ }
+ return false;
+ }else {
+ alert('璇峰厛閫夋嫨瀹㈡埛鍗曚綅');
}
- return false;
}
var currentLastName = '';
@@ -433,7 +439,7 @@
}
}
for(var i = 0;i<3;i++){
- let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:RepairInfoList:'+i+':Contacts__c\',\'allPage:allForm:RepairInfoList:'+i+':j_id91\',\'allPage:allForm:RepairInfoList:'+i+':contactIdValue\')" alt="Reference Document Number Lookup" class="lookupIcon" title="Reference Document Number Lookup (New Window)"/>';
+ let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:RepairInfoList:'+i+':Contacts__c\',\'allPage:allForm:RepairInfoList:'+i+':j_id91\',\'allPage:allForm:RepairInfoList:'+i+':contactIdValue\',\'allPage:allForm:RepairInfoList:'+i+':BusinessACustomerUnit\')" alt="Reference Document Number Lookup" class="lookupIcon" title="Reference Document Number Lookup (New Window)"/>';
let lookUpNode = htmlToElement(contactHtmlString);
console.log(lookUpNode);
let parentNode = document.getElementById('allPage:allForm:RepairInfoList:'+i+':contactIdValue').parentNode;
--
Gitblit v1.9.1