From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/pages/NewOpportunity.page | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/force-app/main/default/pages/NewOpportunity.page b/force-app/main/default/pages/NewOpportunity.page
index da11553..e6b049c 100644
--- a/force-app/main/default/pages/NewOpportunity.page
+++ b/force-app/main/default/pages/NewOpportunity.page
@@ -9,18 +9,18 @@
var txId = '';
// var DealerSalesStaffNameId = 'Page:mainForm:idSearchSetProduct:j_id53:j_id56:opp_DealerSalesStaffName';
// var DealerServiceId = 'Page:mainForm:idSearchSetProduct:j_id53:j_id62:opp_DealerService';
- var DealerSalesStaffNameId = 'page:form:block:j_id50:6:j_id51:j_id52:1:j_id53';
- var DealerServiceId = 'page:form:block:j_id50:6:j_id51:j_id52:2:j_id53';
- var opportunityAWSDataId = 'Page:mainForm:idSearchSetProduct:j_id53:opportunityAWSDataId';
+ var DealerSalesStaffNameId = 'PIAPIBACK_opp_DealerSalesStaffName';
+ var DealerServiceId = 'PIAPIBACK_opp_DealerService';
+ var opportunityAWSDataId = 'Page:mainForm:idSearchSetProduct:j_id55:opportunityAWSDataId';
function getPIData(){
let opportunityPayloadList = [];
let opportunityPIData = new Object();
- if(document.getElementById(DealerSalesStaffNameId)){
- opportunityPIData.dealerSalesStaffName = document.getElementById(DealerSalesStaffNameId).value
+ if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
+ opportunityPIData.dealerSalesStaffName = document.getElementsByClassName(DealerSalesStaffNameId)[0].value
}
- if(document.getElementById(DealerServiceId)){
- opportunityPIData.dealerService = document.getElementById(DealerServiceId).value
+ if(document.getElementsByClassName(DealerServiceId)[0]){
+ opportunityPIData.dealerService = document.getElementsByClassName(DealerServiceId)[0].value
}
opportunityPayloadList.push(opportunityPIData);
return JSON.stringify(opportunityPayloadList);
@@ -30,11 +30,11 @@
new Promise(function(resolve,reject){
//鍔犲瘑
let queryPostBack = function(data){
- if(document.getElementById(DealerSalesStaffNameId)){
- document.getElementById(DealerSalesStaffNameId).value = data.object[0].dealerSalesStaffName;
+ if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
+ document.getElementsByClassName(DealerSalesStaffNameId)[0].value = data.object[0].dealerSalesStaffName;
}
- if(document.getElementById(DealerServiceId)){
- document.getElementById(DealerServiceId).value = data.object[0].dealerService;
+ if(document.getElementsByClassName(DealerServiceId)[0]){
+ document.getElementsByClassName(DealerServiceId)[0].value = data.object[0].dealerService;
}
if(document.getElementById(opportunityAWSDataId)){
document.getElementById(opportunityAWSDataId).value = data.object[0].dataId;
@@ -53,11 +53,11 @@
let b = HasError();
if(b){
//娓呯┖浠g悊鍟嗛攢鍞媴褰撹�呭悕
- if(document.getElementById(DealerSalesStaffNameId)){
- document.getElementById(DealerSalesStaffNameId).value=''
+ if(document.getElementsByClassName(DealerSalesStaffNameId)[0]){
+ document.getElementsByClassName(DealerSalesStaffNameId)[0].value=''
}
- if(document.getElementById(DealerServiceId)){
- document.getElementById(DealerServiceId).value=''
+ if(document.getElementsByClassName(DealerServiceId)[0]){
+ document.getElementsByClassName(DealerServiceId)[0].value=''
}
}
AWSService.post(staticResource.transactionUrl, JSON.stringify({
@@ -201,12 +201,12 @@
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕" for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/>
+ <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName" required="true"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
@@ -215,7 +215,7 @@
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/>
- <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/>
+ <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService" styleClass="PIAPIBACK_opp_DealerService"/>
</apex:pageBlockSectionItem>
<apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/>
</apex:pageBlockSection>
@@ -382,13 +382,13 @@
<!-- <apex:outputPanel layout="none" rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}"> -->
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', false, true)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
</apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<!-- <apex:outputPanel rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}" layout="inline"> -->
<apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'NDT' || ProductSegment == 'ANI', true, false)}">
<apex:outputLabel value="浠g悊鍟嗛攢鍞媴褰撹�呭悕." for="opp_DealerSalesStaffName"/>
- <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true"/>
+ <apex:inputField value="{!opp.Dealer_Sales_Staff_Name_D__c}" id="opp_DealerSalesStaffName" required="true" styleClass="PIAPIBACK_opp_DealerSalesStaffName"/>
</apex:pageBlockSectionItem>
<!-- </apex:outputPanel> -->
<apex:pageBlockSectionItem >
@@ -397,7 +397,7 @@
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕." for="opp_DealerService"/>
- <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService"/>
+ <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService" styleClass="PIAPIBACK_opp_DealerService"/>
</apex:pageBlockSectionItem>
<apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/>
</apex:pageBlockSection>
--
Gitblit v1.9.1