From 8e07b5f23afd4c93d7e8d1f04d2e8dbca2628e5e Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 27 六月 2023 13:42:11 +0800
Subject: [PATCH] Community LEX Upgarde
---
force-app/main/default/pages/StraightBackAddress.page | 809 +++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 586 insertions(+), 223 deletions(-)
diff --git a/force-app/main/default/pages/StraightBackAddress.page b/force-app/main/default/pages/StraightBackAddress.page
index 2510d5d..7c49578 100644
--- a/force-app/main/default/pages/StraightBackAddress.page
+++ b/force-app/main/default/pages/StraightBackAddress.page
@@ -1,15 +1,25 @@
+<!--
+ @description :
+ @author : ChangeMeIn@UserSettingsUnder.SFDoc
+ @group :
+ @last modified on : 03-30-2022
+ @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
+-->
<apex:page controller="StraightBackAddressController" action="{!init}" showHeader="false" sidebar="true" id="allPage" title="鐩磋繑鏀惰揣鍦板潃">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
- <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
+ <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<script type="text/javascript">
var checkedTrue;
var tableDataStr = '';
var staticResource = JSON.parse('{!staticResource}');
var staticResourceContact = JSON.parse('{!staticResourceContact}');
+ var staticResourceRepair = JSON.parse('{!staticResourceRepair}');
+
var PIData = {};
var contactDataIds = [];
var ObjIdDecrypt = '';
@@ -19,6 +29,28 @@
var isAddCon = false;
var contactInfoStr = '';
+ var addressAwsData = {};
+
+ var isBlocking = false;
+
+ var contactNamePlaintext = '';
+ var telePhonePlaintext = '';
+ var zipCodePlaintext = '';
+ var detailedAddressPlaintext = '';
+ function b(){
+ if (!isBlocking) {
+ blockme();
+ isBlocking = true;
+ }
+ }
+
+ function ub(){
+ if (isBlocking) {
+ unblockUI();
+ isBlocking = false;
+ }
+ }
+
//鏇挎崲vlookup
var newSearchContactWindow = null;
window.onload = function () {
@@ -44,29 +76,49 @@
function Trans(){
let b = HasError();
if(b){
- //娓呯┖鐢佃瘽鍦板潃閭紪
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value=''
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value=''
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value=''
+ //杩樺師鑱旂郴浜虹數璇濆湴鍧�閭紪
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = contactNamePlaintext;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = telePhonePlaintext;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = zipCodePlaintext
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = detailedAddressPlaintext
+ return
}
+
+ //{!IF(isSearchBtn,'searchBtnJs()',false)};
+ let b1= false;
+ let b2= false;
+
+ let Foo = function(){
+ // if (b1 && b2 && !b) {
+ // window.location.reload();
+ // }
+ if (b1 && !b) {
+ window.location.reload();
+ }
+ }
+
AWSService.post(staticResource.transactionUrl, JSON.stringify({
- "txId":add_aws_result.txId,
- "isSuccess":b ? 0 : 1
- }), function(result){
- if(isAddCon){
- AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({
- "txId":con_aws_result.txId,
- "isSuccess":b ? 0 : 1,
- "sfRecordId":document.getElementById('allPage:allForm:sfRecordId').value
- }), function(result){
- if(!b)
- window.location.reload();
- }, staticResourceContact.token);
- }else{
- if(!b)
- window.location.reload();
- }
- }, staticResource.token);
+ "txId":add_aws_result.txId,
+ "isSuccess":b ? 0 : 1
+ }), function(result){
+ b1 = true;
+ Foo();
+ }, staticResource.token);
+
+ //涓嶄細鍐嶆柊寤鸿仈绯讳汉鏃犻渶纭浜嬪姟
+ // if(isAddCon){
+ // AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({
+ // "txId":con_aws_result.txId,
+ // "isSuccess":b ? 0 : 1
+ // }), function(result){
+ // b2 = true;
+ // Foo();
+ // }, staticResourceContact.token);
+ // }else{
+ // b2 = true;
+ // Foo();
+ // }
+
}
@@ -98,13 +150,15 @@
//瑙e瘑
function decrypt(){
if(PIData[ObjIdDecrypt] == null){
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = '';
+ // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = '';
//document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:contactIdValue').value = '000000000000000';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = '';
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = '';
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = '';
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = '';
}else{
- document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = PIData[ObjIdDecrypt].lastName!=null?PIData[ObjIdDecrypt].lastName:'';
+ // document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = PIData[ObjIdDecrypt].lastName!=null?PIData[ObjIdDecrypt].lastName:'';
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = PIData[ObjIdDecrypt].lastName;
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = PIData[ObjIdDecrypt].telephone;
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = PIData[ObjIdDecrypt].zipCode;
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = PIData[ObjIdDecrypt].detailedAddress;
@@ -124,48 +178,49 @@
console.log(JSON.stringify(leadPayloadList));
return JSON.stringify(leadPayloadList);
}
+ //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
//淇濆瓨鏂规硶
function savaJs(){
- //blockme();
- if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c').value != ''){
- isAddCon = true;
- }
+ //b();
+ //涓嶄細鏂板缓鑱旂郴浜猴紝鎵�浠ヨ繖閲屼笉闇�瑕佸皢isAddCon璁剧疆涓簍rue
+ // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value != ''){
+ // isAddCon = true;
+ // }
document.getElementById("errorMsg").innerHTML = '';
- if(!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
- document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戝拰銆愯仈绯讳汉锛堟柊寤猴級銆戜笉鑳藉悓鏃朵负绌猴紒</strong> ';
- return;
- }else if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
- document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戝拰銆愯仈绯讳汉锛堟柊寤猴級銆戜笉鑳藉悓鏃舵湁鍊硷紒</strong> ';
+ if(!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value){
+ document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戜笉鑳戒负绌猴紒</strong> ';
return;
}
- blockme();
+ // else if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
+ // document.getElementById("errorMsg").innerHTML = '<strong>銆愯仈绯讳汉銆戝拰銆愯仈绯讳汉锛堟柊寤猴級銆戜笉鑳藉悓鏃舵湁鍊硷紒</strong> ';
+ // return;
+ // }
+ b();
console.log('{!insUpdData}')
- if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value //銆愯仈绯讳汉锛堟柊寤猴級銆戜笉涓虹┖
- &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accOfficeTypeId}'////璁板綍绫诲瀷id 鍔炰簨澶�
- &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyTypeId}'//璁板綍绫诲瀷id 璨╁2搴�
- &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyContactTypeId}'){//璁板綍绫诲瀷id 缁忛攢鍟嗚仈绯讳汉
- //new contact
- ProcessPI({},GetEditObj('contact'),'contact',function(){
- //new address
- ProcessPI({},
- GetEditObj('address'),'address',function(){
- save();
- });
- });
- }else{
- //new address
- ProcessPI({},GetEditObj('address'),'address',function(){
- save();
- });
- }
+ // if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
+ // //new contact
+ // ProcessPI({},GetEditObj('contact'),'contact',function(){
+ // //new address
+ // ProcessPI({},
+ // GetEditObj('address'),'address',function(){
+ // save();
+ // });
+ // });
+ // }else{
+ //new address
+ ProcessPI({},GetEditObj('address'),'address',function(){
+ save();
+ });
+ // }
}
+ //WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
function ProcessPI(sobjJson, payloadForNewPI,type,callback) {
var sr = ''
- if(type == 'contact'){
- sr = staticResourceContact
- }
+ // if(type == 'contact'){
+ // sr = staticResourceContact
+ // }
if(type == 'address'){
sr = staticResource
}
@@ -174,9 +229,10 @@
url = sr.updateUrl
}*/
AWSService.post(url, payloadForNewPI, function(result){
- if(type == 'contact'){
- con_aws_result = result
- }if(type == 'address'){
+ // if(type == 'contact'){
+ // con_aws_result = result
+ // }
+ if(type == 'address'){
add_aws_result = result
}
SetEditObj(type);
@@ -188,29 +244,32 @@
function SetEditObj(type){
let obj = GetAWSResultObj(type);
if(obj){
- if(type=='contact'){
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Con_AWS_Data_Id__c").value = obj.dataId;
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value = obj.lastName;
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:LastName_Encrypted__c").value = obj.lastNameEncrypt;
- }
+ // if(type=='contact'){
+ // document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value = obj.dataId;
+ // document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value = obj.lastName;
+ // document.getElementById("allPage:allForm:oppBlock2:LastName_Encrypted__c").value = obj.lastNameEncrypt;
+ // }
if(type=='address'){
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Add_AWS_Data_Id__c").value = obj.dataId;
+ document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value = obj.dataId;
+ document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = obj.contactName;
+ //document.getElementById('allPage:allForm:oppBlock2:ContactName_Encrypted__c').value = obj.contactNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value = obj.telephone;
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone_Encrypted__c").value = obj.telephoneEncrypt;
+ //document.getElementById("allPage:allForm:oppBlock2:Telephone_Encrypted__c").value = obj.telephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value = obj.zipCode;
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode_Encrypted__c").value = obj.zipCodeEncrypt;
+ //document.getElementById("allPage:allForm:oppBlock2:ZipCode_Encrypted__c").value = obj.zipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value = obj.detailedAddress;
- document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address_Encrypted__c").value = obj.detailedAddressEncrypt;
+ //document.getElementById("allPage:allForm:oppBlock2:Detailed_Address_Encrypted__c").value = obj.detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-05
+
}
}
}
function GetAWSResultObj(type){
- if(type == 'contact'){
- if(con_aws_result && con_aws_result.object && con_aws_result.object.length > 0){
- return con_aws_result.object[0];
- }
- }
+ // if(type == 'contact'){
+ // if(con_aws_result && con_aws_result.object && con_aws_result.object.length > 0){
+ // return con_aws_result.object[0];
+ // }
+ // }
if(type == 'address'){
if(add_aws_result && add_aws_result.object && add_aws_result.object.length > 0){
return add_aws_result.object[0];
@@ -218,18 +277,24 @@
}
return null;
}
+
function GetEditObj(type){
- if(type=='contact'){
- //new contact
- return JSON.stringify([{
- lastName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value,
- dataId : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Con_AWS_Data_Id__c").value,
- }]);
- }
+ // if(type=='contact'){
+ // //new contact
+ // return JSON.stringify([{
+ // lastName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
+ // dataId : document.getElementById("allPage:allForm:oppBlock2:Con_AWS_Data_Id__c").value,
+ // }]);
+ // }
+ contactNamePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value;
+ telePhonePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value;
+ zipCodePlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value
+ detailedAddressPlaintext = document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value;
if(type == 'address'){
//new address
return JSON.stringify([{
- dataId : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Add_AWS_Data_Id__c").value,
+ dataId : document.getElementById("allPage:allForm:oppBlock2:Add_AWS_Data_Id__c").value,
+ contactName : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value,
telephone : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Telephone__c").value,
zipCode : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c").value,
detailedAddress : document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c").value,
@@ -257,7 +322,7 @@
}
}
function searchBtnJs(){
- blockme();
+ b();
var addressDataIds = '';
//鏌ヨ鍦板潃
if(document.getElementById('allPage:allForm:searchBlock:txtAddressId').value != ''){
@@ -268,15 +333,19 @@
searchBtn('\''+addressName+'\'');
return
}else{
+
for(var i=0;i<result.object.length;i++){
addressDataIds += ',\''+ result.object[i].dataId + '\'';
+ addressAwsData[result.object[i].dataId] = result.object[i];
}
addressDataIds = addressDataIds.substring(1);
resolve('success');
}
};
var addressName = document.getElementById('allPage:allForm:searchBlock:txtAddressId').value;
- AWSService.queryAddress('https://sfpi-mebg-test.olympuschina.com/api/address/search',addressName.trim(),queryBack,staticResource.token);
+ AWSService.post(staticResource.searchUrl,{
+ detailedAddress:addressName.trim()
+ },queryBack,staticResource.token);
}).then(function(data){
console.log('data = '+data)
console.log('addressDataIds = '+addressDataIds)
@@ -286,25 +355,262 @@
searchBtn(addressDataIds);
}
}
- //閲囩敤鎸夐挳
- function onAdoptJs(objId){
- if(objId != null){
- //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
- var uploadTime = '{!FSEApplyForRepairTime}';
- if(uploadTime != 'null'){
- var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
- if(confirm(prompt)){
- blockme();
- adoptSave(objId+"",true);
- }
- }else{
- adoptSave(objId+"",false);
+ //鍔犲瘑瀹㈡埛鍚嶅瓧娈�
+ // function encryptCustomer(e){
+ // let obj = JSON.parse(payloadForNewPI);
+ // let payloadForNewPIJson = JSON.stringify(obj);
+ // let payloadForNewPI = jQuery(e.target).closest("tr").find("a.cusmer__c");
+ // AWSService.update(staticResources.updateUrl, '', payloadForNewPI, updateMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack);
+ // },
+
+ sforce.connection.sessionId = '{!GETSESSIONID()}';
+ function UpdateSobject(staticResource,sobj,transId,callback){
+
+ let result = sforce.connection.update([sobj]);
+ let tobj = {
+ txId: transId
+ };
+ let b = result[0].getBoolean('success');
+ if(b) {
+ console.log('call sf Log Id: ' + result[0].id);
+ tobj.sfRecordId = result[0].id;
+ tobj.isSuccess = 1;
+
+ //return result[0].id;
+ }else {
+ console.log('call sf to insert log');
+ tobj.isSuccess = 0;
+ //return '';
+ }
+
+ AWSService.post(staticResource.transactionUrl,tobj,function(data){
+ if (callback) {
+ data.isSuccess = b;
+ callback(data)
}
- }
+ },staticResource.token);
+ }
+
+
+
+ function adoptSaveJs(address,isUpload){
+ //鐢变簬瑕佹妸閲囩敤鏃堕棿璁板綍鍒板湴鍧�琛ㄤ腑锛屾墍浠ユ柊寤轰竴涓湴鍧�瀵硅薄
+ // Address__c DatetimeUpdate = new Address__c();
+ // DatetimeUpdate = tableData[i].address;
+ //璇︾粏鍦板潃
+ let address_str = address.Detailed_Address__c.trim();
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ address_str = addressAwsData[address.AWS_Data_Id__c].detailedAddress;
+ }
+ let cityName = '';//甯�
+ //甯備笉涓虹┖锛屽洜涓鸿浣跨敤 __r.Name 濡傛灉涓虹┖锛屼細鎶ラ敊
+ if(address.City__c){
+ cityName = address.City__r.Name.trim();
+ //鐪� 鍚屼笂
+ if(address.Province__c){
+ let ProvinceCity = address.Province__r.Name.trim()+cityName;
+ //闃叉璇︾粏鍦板潃閲岄潰甯︾潃鐪佷唤鍜屽競
+ if(address_str.indexOf(ProvinceCity) < 0){
+ address_str = ProvinceCity + address_str;
+ }
+ }
+ }
+ //鑱旂郴浜�
+ let contactsName = '';
+ // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start
+ if(address.ContactName__c){
+ contactsName = address.ContactName__c;
+ }
+ // WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end
+
+ // if (addressAwsData.hasOwnProperty(address.Contacts__r.AWS_Data_Id__c)) {
+ // contactsName = addressAwsData[address.Contacts__r.AWS_Data_Id__c].lastName;
+ // }
+ if(PIData[address.Id]){
+ contactsName = PIData[address.Id].lastName;
+ }
+
+ //瀹㈡埛
+ let ContactPerson = '';
+ if(address.Customer__c){
+ ContactPerson = address.Customer__r.Name;
+ }
+ try{
+ //淇濆瓨鏁版嵁鍒颁慨鐞嗚〃涓�
+ let rc = new sforce.SObject('Repair__c');
+ rc.Id='{!RepairId}';
+ rc.address_Contacts__c=contactsName;
+ debugger
+ rc.address_ZipCode__c = address.ZipCode__c;
+ rc.address_City__c = cityName;
+ rc.address_Contacts_Name__c = ContactPerson;
+ let AddressTypeIndex = {!AddressTypeIndex};
+ //isUpload锛氭槸鍚︿笂浼燬AP FSEApplyForRepairTime锛歋AP淇悊鐢宠鏃堕棿
+ if(isUpload && '{!pc.SAP_Transfer_time__c}'){
+ rc.Address_type__c = 'X';
+ rc.Address_Type_Index__c = AddressTypeIndex+1;
+ }
+ rc.address_Telephone__c=address.Telephone__c;
+ rc.Detailed_Address__c=address_str;
+
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ rc.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
+ rc.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
+ }
+
+ let GetAsset = function(){
+ let ast = new sforce.SObject('Asset');
+ ast.Id = '{!pc.Delivered_Product__c}',
+ ast.address_Contacts__c= contactsName,
+ ast.address_ZipCode__c = address.ZipCode__c,
+ ast.address_City__c = cityName,
+ ast.address_Telephone__c = address.Telephone__c,
+ ast.address_Contacts_Name__c = ContactPerson,
+ ast.Detailed_Address__c= address_str
+ if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
+ ast.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
+ ast.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
+ }
+ return ast;
+ }
+
+ //淇濆瓨鏁版嵁鍒颁繚鏈夎澶囪〃涓�
+ let UpdateAsset = function(){
+ let ast = GetAsset();
+ let result = sforce.connection.update([ast]);
+ let b = result[0].getBoolean('success');
+ return b;
+ }
+
+ let UpdateRepair = function(callback){
+ AWSService.post(staticResourceRepair.updateUrl+'V2',[{
+ dataId:'{!pc.AWS_Data_Id__c}',
+ addressContactsName:rc.address_Contacts_Name__c,
+ addressContacts:rc.address_Contacts__c,
+ addressTelephone:rc.address_Telephone__c,
+ addressZipCode:rc.address_ZipCode__c,
+ detailedAddress:rc.Detailed_Address__c
+ }],function(data){
+ if(data && data.object){
+ console.log(data);
+ rc.address_Contacts_Name__c = data.object[0].addressContactsName;
+ //rc.Address_Contacts_Name_Encrypt__c = data.object[0].addressContactsNameEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_Contacts__c = data.object[0].addressContacts;
+ //rc.Address_Contacts_Encrypt__c = data.object[0].addressContactsEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_Telephone__c = data.object[0].addressTelephone;
+ //rc.Address_Telephone_Encrypt__c = data.object[0].addressTelephoneEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.address_ZipCode__c = data.object[0].addressZipCode;
+ //rc.Address_ZipCode_Encrypt__c = data.object[0].addressZipCodeEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+ rc.Detailed_Address__c = data.object[0].detailedAddress;
+ //rc.Detailed_Address_Encrypt__c = data.object[0].detailedAddressEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-29
+
+ //UpdateSobject(staticResourceRepair,rc,data.txId,callback);
+ Visualforce.remoting.Manager.invokeAction(
+ 'StraightBackAddressController.SaveEx',
+ JSON.stringify(rc), JSON.stringify(GetAsset()), address.Id,
+ function (result, event) {
+
+ let message = '';
+ if (event.status) {
+ if (result) {
+ message = result;
+ }else{
+ }
+ }else{
+ }
+ let tobj = {
+ txId: data.txId
+ };
+ if(message) {
+ console.log('call sf to insert log');
+ tobj.isSuccess = 0;
+ }else {
+ console.log('call sf Log Id: ' + rc.id);
+ tobj.sfRecordId = rc.id;
+ tobj.isSuccess = 1;
+ }
+
+ AWSService.post(staticResource.transactionUrl,tobj,function(data){
+ if (message) {
+ ub();
+ alert(message);
+ }else{
+ window.location.href = '/{!RepairId}';
+ }
+ },staticResource.token);
+ },
+ { escape: true }
+ );
+ }else{
+ alert('AWS鏇存柊淇悊澶辫触');
+ ub();
+ }
+ },staticResourceRepair.token)
+ }
+
+
+
+
+ let UpdateAddress = function(){
+ let add = new sforce.SObject('Address__c');
+ add.Id = address.Id;
+ //鏈�鍚庢妸褰撳墠鏃堕棿淇濆瓨鍒板湴鍧�琛ㄤ腑锛屼綔涓洪噰鐢ㄦ椂闂�
+ add.Using_Datetime__c = new Date();
+ let result = sforce.connection.update([add]);
+ let b = result[0].getBoolean('success');
+ return b;
+ }
+
+ b();
+ UpdateRepair();
+ /*
+ UpdateRepair(function(data){
+ if (data.isSuccess) {
+ let b = UpdateAsset();
+ if (b) {
+ b = UpdateAddress();
+ if (b) {
+ window.location.href = '/{!RepairId}';
+ }else{
+ ub();
+ alert('閲囩敤澶辫触');
+ }
+ }else{
+ ub();
+ alert('閲囩敤澶辫触');
+ }
+ }else{
+
+ ub();
+ alert('SF鏇存柊淇悊澶辫触');
+ }
+ })*/
+
+ //椤甸潰閲嶅畾鍚�
+ //return redirectPag();
+ }catch( e){
+ //澶辫触鎻愮ず
+ //ApexPages.addMessages(e);
+ }
+ }
+ //閲囩敤鎸夐挳
+ function onAdoptJs(e, address){
+
+ //鍒ゆ柇褰撳墠淇悊鍗曟槸鍚﹀凡缁忕敵璇蜂慨鐞�
+ var uploadTime = '{!FSEApplyForRepairTime}';
+ if(uploadTime != 'null' && uploadTime){
+ var prompt = '鐢变簬褰撳墠淇悊鍗曞凡鐢宠淇悊锛岃闂槸鍚﹂噰鐢ㄥ苟涓婁紶鏁版嵁鍒癝AP锛�';
+ if(confirm(prompt)){
+ adoptSaveJs(address,true);
+ }
+ }else{
+ adoptSaveJs(address,false);
+ }
+
}
/* function onAdoptJs(){
if(checkedTrue != null){
- blockme();
+ b();
var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
var InputObj = rows[checkedTrue].cells[0].getElementsByTagName("input")[0];
@@ -340,6 +646,7 @@
//queryPI();
function q1(){
+ debugger
var index = 0;
var correct = 0;
var p = new Promise(function(resolve, reject){
@@ -355,7 +662,8 @@
temp.telephone = result.object.telephone;
temp.zipCode = result.object.zipCode;
temp.detailedAddress = result.object.detailedAddress;
- temp.awsDataId = awsDataId;
+ //temp.awsDataId = awsDataId;
+ temp.lastName = result.object.contactName;
PIData[Id] = temp;
};
for(var i=0;i<tableDataStr.length;i++){
@@ -364,7 +672,8 @@
AWSService.queryRepair(staticResource.queryUrl,
tableDataStr[i].address.AWS_Data_Id__c,
tableDataStr[i].address.Id,
- tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,
+ //tableDataStr[i].address.Contacts__r.AWS_Data_Id__c,
+ null,
searchCallBack,
staticResource.token);
}
@@ -381,48 +690,53 @@
return p;
}
+ //zhj PIPL 2022-06-08 start
function q2(){
- sforce.connection.sessionId = '{!GETSESSIONID()}';
- var p = new Promise(function(resolve, reject){
- //鏌ヨ鑱旂郴浜虹殑鏁版嵁
- let queryBack = function queryBack(result) {
- let contacts = result.object;
- if(contacts == null){
- return;
- }
- for(var i=0;i<result.object.length;i++){
- for(let key in PIData){
- if(result.object[i].dataId == PIData[key].awsDataId){
- PIData[key].lastName = result.object[i].lastName;
- }
- }
- }
- }
- var condition = ''
- for(var i=0;i<tableDataStr.length;i++){
- if(tableDataStr[i].address.Contacts__c){
- condition += "," + "\'"+tableDataStr[i].address.Contacts__c+"\'";
- }
- }
- condition = condition.substr(1);
- console.log('condition = ' + condition);
- var record = sforce.connection.query("select AWS_Data_Id__c from Contact where id in("+condition+")");
- var records = record.getArray("records");
- for(var i =0;i<records.length;i++){
- if(records[i].AWS_Data_Id__c){
- contactDataIds.push(records[i].AWS_Data_Id__c);
- }
- }
- let searchPayload = new Object();
- searchPayload.dataIds = contactDataIds;
- searchPayload.contactName = '';
- console.log('contactDataIds = ' + contactDataIds);
- AWSService.search(staticResourceContact.searchUrl, JSON.stringify(searchPayload), queryBack, staticResourceContact.token);
- });
+ // sforce.connection.sessionId = '{!GETSESSIONID()}';
+ // var p = new Promise(function(resolve, reject){
+ // //鏌ヨ鑱旂郴浜虹殑鏁版嵁
+ // let queryBack = function queryBack(result) {
+ // let contacts = result.object;
+ // if(contacts == null){
+ // return;
+ // }
+ // for(var i=0;i<result.object.length;i++){
+ // for(let key in PIData){
+ // if(result.object[i].dataId == PIData[key].awsDataId){
+ // PIData[key].lastName = result.object[i].lastName;
+ // }
+ // }
+ // }
+ // }
+ // var condition = ''
+ // for(var i=0;i<tableDataStr.length;i++){
+ // if(tableDataStr[i].address.Contacts__c){
+ // condition += "," + "\'"+tableDataStr[i].address.Contacts__c+"\'";
+ // }
+ // }
+ // condition = condition.substr(1);
+ // console.log('condition = ' + condition);
+ // var record = sforce.connection.query("select AWS_Data_Id__c from Contact where id in("+condition+")");
+ // var records = record.getArray("records");
+ // for(var i =0;i<records.length;i++){
+ // if(records[i].AWS_Data_Id__c){
+ // contactDataIds.push(records[i].AWS_Data_Id__c);
+ // }
+ // }
+ // let searchPayload = new Object();
+ // searchPayload.dataIds = contactDataIds;
+ // searchPayload.contactName = '';
+ // console.log('contactDataIds = ' + contactDataIds);
+ // AWSService.search(staticResourceContact.searchUrl, JSON.stringify(searchPayload), queryBack, staticResourceContact.token);
+ // });
}
+
+ //zhj PIPL 2022-06-08 end
+
+
//鏌ヨ鏁忔劅瀛楁
function queryPI(){
- //blockme();
+ //b();
tableDataStr = JSON.parse(document.getElementById('allPage:allForm:tableValueFrontEnd').value);
PIData = {};
contactDataIds = [];
@@ -430,7 +744,7 @@
q1().then(function(data){
return q2(data);
})
- //unblockUI();
+ //ub();
}
@@ -450,8 +764,8 @@
'\n閭紪: '+PIData[awsDataId].zipCode+
'\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
}else{
- piInformation =
- '鐢佃瘽: '+PIData[awsDataId].telephone+
+ piInformation = '鑱旂郴浜�: null'+
+ '\n鐢佃瘽: '+PIData[awsDataId].telephone+
'\n閭紪: '+PIData[awsDataId].zipCode+
'\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress
}
@@ -462,11 +776,11 @@
createDiv.style.left=x;
createDiv.style.top=y;
createDiv.style.height='100px';
- createDiv.style.width='100px';
+ createDiv.style.width='120px';
createDiv.style.background="#dddddd";
createDiv.style.position = "absolute";
parentNode.appendChild(createDiv);
- parentNode.style.position = "relative";
+ parentNode.style.position = "relative";
}
function hidePIDiv(awsDataId){
@@ -476,22 +790,22 @@
document.getElementById(awsDataId+'_PI').remove();
}
- function replaceSearchContactLookup() {
- if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c') != null){
- let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:oppBlock2:UpdAddressId:Contacts__c\')" 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:oppBlock2:UpdAddressId:Contacts__c').parentNode;
- parentNode.appendChild(lookUpNode);
- if(contactInfoStr){
- console.log('closePopup:'+contactInfoStr);
- let contactInfo = JSON.parse(contactInfoStr);
- let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
- document.getElementById(contactNodeId).value = contactInfo.ContactId;
- document.getElementById(closeField).value = contactInfo.Name;
- }
- }
- }
+ // function replaceSearchContactLookup() {
+ // if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c') != null){
+ // let contactHtmlString = '<img src="/img/s.gif" onclick="searchContact(\'allPage:allForm:contactId\',\'allPage:allForm:oppBlock2:UpdAddressId:Contacts__c\')" 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:oppBlock2:UpdAddressId:Contacts__c').parentNode;
+ // parentNode.appendChild(lookUpNode);
+ // if(contactInfoStr){
+ // console.log('closePopup:'+contactInfoStr);
+ // let contactInfo = JSON.parse(contactInfoStr);
+ // let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
+ // document.getElementById(contactNodeId).value = contactInfo.ContactId;
+ // document.getElementById(closeField).value = contactInfo.Name;
+ // }
+ // }
+ // }
function htmlToElement(html) {
var template = document.createElement('template');
@@ -501,28 +815,27 @@
}
//鑷畾涔塴ookup鏌ヨ
- function searchContact(contactNodeId,field){
- closeField = field;
- let searchContactKeyWord = document.getElementById(field).value
- let accountValue = "";
- if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) {
- let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid';
- accountValue = document.getElementById(accountNodeId).value;
- }
- console.log(accountValue);
- if(accountValue !='000000000000000'){
- let baseUrl = "/apex/SearchContactPage";
- let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord;
- 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('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�')
- }
- }
+ // function searchContact(contactNodeId,field){
+ // closeField = field;
+ // let accountValue = "";
+ // if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) {
+ // let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid';
+ // accountValue = document.getElementById(accountNodeId).value;
+ // }
+ // console.log(accountValue);
+ // if(accountValue !='000000000000000'){
+ // let baseUrl = "/apex/SearchContactPage";
+ // let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue;
+ // 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{
+ // console.log('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�')
+ // }
+ // }
function closePopupWindow() {
if (null != newSearchContactWindow) {
@@ -535,44 +848,89 @@
document.getElementById(contactNodeId).value = contactInfo.ContactId;
document.getElementById(closeField).value = contactInfo.Name;
}
- function queryRecordType(){
- if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').value){
- queryRecordType();
+ //2022 02 28 寮犲崕寤� display PI Data end
+ </script>
+ <script type="text/javascript">
+
+ function DecryptAddress(){
+ debugger
+ let arr1 = [];let a1=false;
+ let arr2 = [];let a2=false;
+ j$('td.oraddress').each(function(i,e){
+ let did = j$(e).attr('address-data-id');
+ if (did) {
+ arr1.push(did);
+ }
+
+ did = j$(e).attr('contact-data-id');
+ if (did) {
+ arr2.push(did);
+ }
+ })
+
+ if (arr1.length) {
+ b();
+ AWSService.post(staticResource.searchUrl,{
+ dataIds:arr1
+ },function(data){
+ ub();
+ if(data && data.object && data.object.length > 0){
+ for (let di in data.object) {
+ if (data.object[di] && data.object[di].dataId) {
+ addressAwsData[data.object[di].dataId] = data.object[di];
+ }
+ }
+
+ }
+ },staticResource.token)
+ }
+
+ if (arr2.length) {
+ b();
+ AWSService.post(staticResourceContact.searchUrl,{
+ dataIds:arr2
+ },function(data){
+ ub();
+ if(data && data.object && data.object.length > 0){
+ for (let di in data.object) {
+ if (data.object[di] && data.object[di].dataId) {
+ addressAwsData[data.object[di].dataId] = data.object[di];
+ }
+ }
+
+ }
+ },staticResourceContact.token)
}
}
- //2022 02 28 寮犲崕寤� display PI Data end
</script>
<apex:form id="allForm">
<apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}"/>
<apex:inputHidden value="{!contactId}" id="contactId"/>
<apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr"/>
- <apex:inputHidden value="{!sfRecordId}" id="sfRecordId"/>
<div id="tab01">
<!-- 椤甸潰鏁版嵁鍒濆鍖栨柟娉� -->
- <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="unblockUI();"></apex:actionFunction>
+ <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="ub();"></apex:actionFunction>
<!-- 妫�绱㈡暟鎹煡璇㈡柟娉� -->
- <apex:actionFunction name="searchBtn" action="{!searchBtn}" rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd" onComplete="unblockUI();">
+ <apex:actionFunction name="searchBtn" action="{!searchBtn}" rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd" onComplete="ub();DecryptAddress();">
<apex:param name="addressDataIds" assignTo="{!addressDataIds}" value=""></apex:param>
</apex:actionFunction>
<!-- 閲囩敤鏂规硶 -->
- <apex:actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="unblockUI();">
+ <!--<actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="ub();">
<apex:param name="adoptId" assignTo="{!adoptId}" value="" />
<apex:param name="isUpload" assignTo="{!isUpload}" value="" />
- </apex:actionFunction>
+ </actionFunction>-->
<!-- 淇濆瓨鍜屼慨鏀规柟娉� -->
- <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message,sfRecordId" onComplete="unblockUI();{!IF(isSearchBtn,'searchBtnJs()',false)};Trans();"></apex:actionFunction>
- <!-- 鏌ヨ瀹㈡埛璁板綍绫诲瀷鏂规硶 -->
- <apex:actionFunction name="queryRecordType" action="{!queryRecordType}" rerender="oppBlock2,message" onComplete="unblockUI();"></apex:actionFunction>
+ <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="ub();Trans()"></apex:actionFunction>
<!-- 鐐瑰嚮淇敼鎸夐挳鑾峰彇淇敼鏁版嵁鏂规硶 -->
- <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();unblockUI();">
+ <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();ub();">
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
</apex:actionFunction>
<!-- 澶嶅埗鏂规硶 -->
- <apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="decrypt();unblockUI();">
+ <apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="decrypt();ub();">
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
</apex:actionFunction>
<!-- 杩斿洖鐖堕〉闈� -->
- <apex:actionFunction name="redirectPag" action="{!redirectPag}" rerender="true" onComplete="unblockUI();"></apex:actionFunction>
+ <apex:actionFunction name="redirectPag" action="{!redirectPag}" rerender="true" onComplete="ub();"></apex:actionFunction>
<apex:pageBlock id="searchBlock" tabStyle="Report">
<table style="border-bottom-width: 0px; font-size:12px;width:100%">
<tr>
@@ -598,7 +956,7 @@
</a>
</td>
<td style="width: 20%">
- <apex:commandButton onclick="searchBtnJs();return false;" rendered="true" value="妫�绱�" style="width:60px;" onComplete="unblockUI();"/>
+ <apex:commandButton onclick="searchBtnJs();return false;" rendered="true" value="妫�绱�" style="width:60px;" onComplete=""/>
<!-- <apex:commandButton onclick="onAdoptJs();return false;" rendered="true" value="閲囩敤" style="width:60px;background:#98c1fbf7"/>
-->
@@ -649,12 +1007,13 @@
<td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
<apex:outputText value="{!or.address.Address_Classification__c}" />
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
+ <td align="left" class="Customer__c" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
<apex:outputfield value="{!or.address.Customer__c}" />
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" aws-data-id="{!or.address.AWS_Data_Id__c}">
+ <td align="left" class="oraddress" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" address-data-id="{!or.address.AWS_Data_Id__c}" contact-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">
<!-- <apex:outputfield value="{!or.address.Contacts__c}" id="{!or.address.Contacts__c}_{!or.address.Id}"/> -->
- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">{!or.address.Contacts__r.Name}</a>
+ <!-- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">{!or.address.Contacts__r.Name}</a> -->
+ <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.AWS_Data_Id__c}">{!or.address.ContactName__c}</a>
</td>
<td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
<apex:outputText value="{!or.address.Telephone__c}" />
@@ -678,7 +1037,7 @@
<apex:commandButton value=" 澶嶅埗 " onclick="onCopyJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canCopy};"/>
</td>
<td align="center" style="vertical-align: inherit;width:30px;">
- <apex:commandButton value=" 閲囩敤 " onclick="onAdoptJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/>
+ <apex:commandButton value=" 閲囩敤 " onclick="onAdoptJs(event,JSON.parse('{!or.addressJson}'));return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/>
</td>
</tr>
<apex:variable value="{!cnt + 1}" var="cnt" />
@@ -696,19 +1055,29 @@
</div>
<div id="tab03">
<apex:pageBlock id="oppBlock2" tabStyle="Report">
- <apex:pageblocksection title="缂栬緫鍦板潃" id="UpdAddressId" rendered="true" columns="4">
- <apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c" />
- <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" onchange="queryRecordType();" />
+ <!-- <apex:inputHidden id="LastName_Encrypted__c" value="{!newCon.LastName_Encrypted__c}"/>
+ <apex:inputHidden id="Con_AWS_Data_Id__c" value="{!newCon.AWS_Data_Id__c}"/> -->
+ <apex:inputHidden id="Add_AWS_Data_Id__c" value="{!insUpdData.AWS_Data_Id__c}"/>
+ <!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 start -->
+ <!-- <apex:inputHidden id="Telephone_Encrypted__c" value="{!insUpdData.Telephone_Encrypted__c}"/>
+ <apex:inputHidden id="ContactName_Encrypted__c" value="{!insUpdData.ContactName_Encrypted__c}"/>
+ <apex:inputHidden id="ZipCode_Encrypted__c" value="{!insUpdData.ZipCode_Encrypted__c}"/>
+ <apex:inputHidden id="Detailed_Address_Encrypted__c" value="{!insUpdData.Detailed_Address_Encrypted__c}"/> -->
+ <!-- zhj 鏂版柟妗堟敼閫� 2022-12-05 end -->
+ <apex:pageblocksection title="缂栬緫鍦板潃" id="UpdAddressId" rendered="true" columns="3">
+ <apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c"/>
+ <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" />
<!-- Before PIPL 20220308 -->
<!-- <apex:inputfield value="{!insUpdData.Contacts__c}" id="Contacts__c" required="false"/> -->
+ <!-- WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 start -->
<!-- Add By Li Jun for PIPL 20220308 Start -->
- <!-- <apex:inputText label="鑱旂郴浜�" disabled="true" value="{!contactNameValue}" id="Contacts__c">-->
- <apex:inputText label="鑱旂郴浜�" value="{!contactNameValue}" id="Contacts__c">
+ <!-- <apex:inputText label="鑱旂郴浜�" disabled="true" value="{!contactNameValue}" id="Contacts__c">
</apex:inputText>
- <apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/>
- <!-- Add By Li Jun for PIPL 20220308 End -->
- <apex:inputfield value="{!insUpdData.Create_Contacts__c}" id="Create_Contacts__c" required="false"/>
-
+ <apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/> -->
+ <apex:inputfield value="{!insUpdData.ContactName__c}" id="ContactName__c"/>
+ <!-- Add By Li Jun for PIPL 20220308 End -->
+ <!-- <apex:inputfield value="{!insUpdData.Create_Contacts__c}" id="Create_Contacts__c" required="false"/> -->
+ <!-- WLIG-CCX4BB 銆愬鎵樸�戜慨鐞嗙洿杩旀敹璐у湴鍧�鍔熻兘鏀归�� thh 20220513 end -->
<apex:inputfield value="{!insUpdData.Province__c}" id="Province__r_Name" style="" />
<apex:inputfield value="{!insUpdData.City__c}" id="City__r_name" />
<apex:inputfield value="{!insUpdData.Telephone__c}" id="Telephone__c" />
@@ -718,33 +1087,27 @@
<apex:inputfield value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;width: 98%"/>
<div id="errorMsg" class="errorMsg"></div>
-
- <apex:inputHidden id="LastName_Encrypted__c" value="{!newCon.LastName_Encrypted__c}"/>
- <apex:inputHidden id="Con_AWS_Data_Id__c" value="{!newCon.AWS_Data_Id__c}"/>
-
- <apex:inputHidden id="Add_AWS_Data_Id__c" value="{!insUpdData.AWS_Data_Id__c}"/>
- <apex:inputHidden id="Telephone_Encrypted__c" value="{!insUpdData.Telephone_Encrypted__c}"/>
- <apex:inputHidden id="ZipCode_Encrypted__c" value="{!insUpdData.ZipCode_Encrypted__c}"/>
- <apex:inputHidden id="Detailed_Address_Encrypted__c" value="{!insUpdData.Detailed_Address_Encrypted__c}"/>
- <apex:inputHidden id="CustomerRecordType" value="{!accRecordTypeId}"/>
</apex:pageblocksection>
<div style="text-align: center;">
<apex:commandButton immediate="true" value="淇濆瓨" onclick="savaJs();" rerender="dummy" />
</div>
- <script>
+ <!-- <script>
replaceSearchContactLookup();
- </script>
+ </script> -->
</apex:pageBlock>
</div>
</apex:form>
<apex:outputPanel id="checEventFrame">
<script type="text/javascript">
+
+
j$("select option[value='鍔炰簨澶�']")[1].remove();
+
+ DecryptAddress();
+
</script>
</apex:outputPanel>
- <script type="javascript/text">
-
- </script>
+
</apex:page>
\ No newline at end of file
--
Gitblit v1.9.1