From 84b24801b8e0e071589ea57b29e64f73e13b1c0c Mon Sep 17 00:00:00 2001
From: 付煜 <fuyu3103346691@163.com>
Date: 星期一, 21 三月 2022 14:54:15 +0800
Subject: [PATCH] SWAG-CCEB67【委托】【重要】保有设备所属变更审批报错
---
force-app/main/default/pages/NewRepair.page | 45 ++++++++++++++++++++++++++++++++++-----------
1 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/pages/NewRepair.page b/force-app/main/default/pages/NewRepair.page
index e3f4b2a..e2f6490 100644
--- a/force-app/main/default/pages/NewRepair.page
+++ b/force-app/main/default/pages/NewRepair.page
@@ -2,7 +2,7 @@
@description :
@author : ChangeMeIn@UserSettingsUnder.SFDoc
@group :
- @last modified on : 03-17-2022
+ @last modified on : 03-19-2022
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="Repair__c" extensions="NewRepairController" id="page">
@@ -19,6 +19,8 @@
</style>
<script>
//Initial Required Information
+ var staticResourceContact = JSON.parse('{!staticResourceContact}');
+ var staticResourceAddress = JSON.parse('{!staticResourceAddress}');
var staticResources = JSON.parse('{!staticResource}');
var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}');
var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}');
@@ -41,16 +43,16 @@
}
//Query Required Parameter
- var queryBack = function queryBack(data) {
- console.log('data = ' + data);
- document.querySelector("[data-id='address_Contacts__c']").value = data.object.addressContacts;
- document.querySelector("[data-id='address_Contacts_Name__c']").value = data.object.addressContactsName;
- document.querySelector("[data-id='address_Telephone__c']").value = data.object.addressTelephone;
- document.querySelector("[data-id='address_ZipCode__c']").value = data.object.addressZipCode;
- document.querySelector("[data-id='Detailed_Address__c']").value = data.object.detailedAddress;
- document.querySelector("[data-id='RepairApplicant__c']").value = data.object.repairApplicant;
- unblockUI();
- };
+ // var queryBack = function queryBack(data) {
+ // console.log('data = ' + data);
+ // document.querySelector("[data-id='address_Contacts__c']").value = data.object.addressContacts;
+ // document.querySelector("[data-id='address_Contacts_Name__c']").value = data.object.addressContactsName;
+ // document.querySelector("[data-id='address_Telephone__c']").value = data.object.addressTelephone;
+ // document.querySelector("[data-id='address_ZipCode__c']").value = data.object.addressZipCode;
+ // document.querySelector("[data-id='Detailed_Address__c']").value = data.object.detailedAddress;
+ // document.querySelector("[data-id='RepairApplicant__c']").value = data.object.repairApplicant;
+ // unblockUI();
+ // };
//Check If Insert Or Update
var insertOrUpdateBack = function insertOrUpdateBack(payloadJson, result, isNewMode) {
@@ -167,6 +169,27 @@
AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
}
+ var queryBack = function queryBack(data) {
+ console.log(data);
+ document.querySelector("[data-id='address_Contacts__c']").innerHTML = data.object.addressContacts;
+ document.querySelector("[data-id='address_Contacts_Name__c']").innerHTML = data.object.addressContactsName;
+ document.querySelector("[data-id='address_Telephone__c']").innerHTML = data.object.addressTelephone;
+ document.querySelector("[data-id='address_ZipCode__c']").innerHTML = data.object.addressZipCode;
+ document.querySelector("[data-id='Detailed_Address__c']").innerHTML = data.object.detailedAddress;
+ document.querySelector("[data-id='RepairApplicant__c']").innerHTML = data.object.repairApplicant;
+ AWSService.query(staticResourceAddress.queryUrl, '{!DecryptAWSDataId}', queryBackDecrypt, staticResourceAddress.token);
+ };
+ var queryBackContact = function queryBack(data) {
+ console.log(data);
+ document.querySelector("[data-id='address_Contacts__c']").innerHTML = data.object.lastName;
+ };
+ var queryBackDecrypt = function queryBack(data) {
+ document.querySelector("[data-id='Detailed_Address__c']").innerHTML = data.object.detailedAddress;
+ document.querySelector("[data-id='address_ZipCode__c']").innerHTML = data.object.zipCode;
+ document.querySelector("[data-id='address_Telephone__c']").innerHTML = data.object.telephone;
+ AWSService.query(staticResourceContact.queryUrl, '{!ContactAWSDataId}', queryBackContact, staticResourceContact.token);
+ }
+
//Update Sensitive Information to AWS
function UpdatePIToAWS(repairJson, payloadForNewPI) {
let controllerSaveMethod = '{!$RemoteAction.NewRepairController.saveRepair}';
--
Gitblit v1.9.1