From 2f4492ee18f90274582fcc2bb06f5e9bf64136e8 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 13 五月 2022 17:32:14 +0800 Subject: [PATCH] ProdBackup0513 --- force-app/main/default/pages/NewOpportunity.page | 71 +---------------------------------- 1 files changed, 3 insertions(+), 68 deletions(-) diff --git a/force-app/main/default/pages/NewOpportunity.page b/force-app/main/default/pages/NewOpportunity.page index da11553..5d469d7 100644 --- a/force-app/main/default/pages/NewOpportunity.page +++ b/force-app/main/default/pages/NewOpportunity.page @@ -1,75 +1,12 @@ <apex:page id="Page" Controller="NewOpportunityController" sidebar="true" showHeader="true" action="{!init}"> - <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> <script> - var staticResource = JSON.parse('{!staticResource}'); - 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'; - function getPIData(){ - let opportunityPayloadList = []; - let opportunityPIData = new Object(); - - if(document.getElementById(DealerSalesStaffNameId)){ - opportunityPIData.dealerSalesStaffName = document.getElementById(DealerSalesStaffNameId).value - } - if(document.getElementById(DealerServiceId)){ - opportunityPIData.dealerService = document.getElementById(DealerServiceId).value - } - opportunityPayloadList.push(opportunityPIData); - return JSON.stringify(opportunityPayloadList); - } function saveJs() { blockme(); - new Promise(function(resolve,reject){ - //鍔犲瘑 - let queryPostBack = function(data){ - if(document.getElementById(DealerSalesStaffNameId)){ - document.getElementById(DealerSalesStaffNameId).value = data.object[0].dealerSalesStaffName; - } - if(document.getElementById(DealerServiceId)){ - document.getElementById(DealerServiceId).value = data.object[0].dealerService; - } - if(document.getElementById(opportunityAWSDataId)){ - document.getElementById(opportunityAWSDataId).value = data.object[0].dataId; - } - txId = data.txId; - resolve('success'); - }; - AWSService.post(staticResource.newUrl,getPIData(),queryPostBack,staticResource.token); - }).then(function(data){ - saveBtn(); - Trans(); - }) - } - //aws 纭 - function Trans(){ - let b = HasError(); - if(b){ - //娓呯┖浠g悊鍟嗛攢鍞媴褰撹�呭悕 - if(document.getElementById(DealerSalesStaffNameId)){ - document.getElementById(DealerSalesStaffNameId).value='' - } - if(document.getElementById(DealerServiceId)){ - document.getElementById(DealerServiceId).value='' - } - } - AWSService.post(staticResource.transactionUrl, JSON.stringify({ - "txId":txId, - "isSuccess":b ? 0 : 1 - }), function(result){ - console.log('Trans result = '+ JSON.stringify(result)); - }, staticResource.token); - } - function HasError(){ - let e = document.getElementById("Page:mainForm:message"); - return e.children[0]!=null; + saveBtn(); } function saveYesJs() { @@ -154,10 +91,10 @@ <apex:outputLabel value="COMPO璇环" for="compo_opp"/> <apex:inputField value="{!opp.compo_opp__c}" id="compo_opp"/> </apex:pageBlockSectionItem> - <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'BS', true, false)}"> + <!-- <apex:pageBlockSectionItem rendered="{!IF(ProductSegment == 'BS', true, false)}"> <apex:outputLabel value="鐢ㄩ��" for="useing"/> <apex:inputField value="{!opp.useing__c}" id="useing"/> - </apex:pageBlockSectionItem> + </apex:pageBlockSectionItem> --> </apex:pageBlockSection> <apex:pageBlockSection title="缁撴灉淇℃伅" columns="2"> @@ -217,7 +154,6 @@ <apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕" for="opp_DealerService"/> <apex:inputField value="{!opp.DealerService__c}" id="opp_DealerService"/> </apex:pageBlockSectionItem> - <apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/> </apex:pageBlockSection> <apex:pageBlockSection title="绔炰簤鑰呬俊鎭�" columns="2"> @@ -399,7 +335,6 @@ <apex:outputLabel value="浠g悊鍟嗘湇鍔℃媴褰撹�呭悕." for="opp_DealerService"/> <apex:inputField value="{!opp.Dealer_Service_D__c}" id="opp_DealerService"/> </apex:pageBlockSectionItem> - <apex:inputHidden id="opportunityAWSDataId" value="{!opp.AWS_Data_Id__c}"/> </apex:pageBlockSection> <apex:pageBlockSection title="绔炰簤鑰呬俊鎭�" columns="2"> -- Gitblit v1.9.1