From e6a0a7f9ffb463c5ce78d6770b09eac739f88b15 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 24 五月 2023 16:57:53 +0800
Subject: [PATCH] 优化确认框以及修改页面
---
force-app/main/default/classes/OpportunityLightingButtonController.cls | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index 55cccf5..e88cb1e 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-12 11:16:07
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-15 13:40:51
+ * @LastEditTime: 2023-05-24 16:34:15
*/
public with sharing class OpportunityLightingButtonController {
@AuraEnabled
@@ -680,6 +680,42 @@
throw new AuraHandledException(e.getMessage());
}
}
+ @AuraEnabled
+ public static String changeTrade(String oppId){
+
+ List<Quote> quoList = [select id from Quote where OpportunityId = :oppId];
+ List<OpportunityLineItem> oppLI = [select id from OpportunityLineItem where Opportunity.id = :oppId];
+
+ Opportunity opp = new Opportunity();
+ opp.id = oppId;
+ opp.Estimation_Decision__c = false;
+ opp.Estimation_Id__c = null;
+ opp.Quote_Update_Sum__c = null;
+ opp.Estimation_No__c = null;
+ opp.Estimation_Proposal_Date__c = null;
+ opp.Estimation_Name__c = null;
+ // LHJ SWAG-C9QAAJ 鍘绘帀 Start
+ // opp.Authorized_Finish_Sales__c = null;
+ // opp.Authorized_DB_No__c = null;
+ // opp.Authorized_Date__c = null;
+ // opp.Autholization_Activated_Date__c = null;
+ // opp.Bidding_Content__c = null;
+ // opp.Bid_Date__c = null;
+ // opp.Bidding_No__c = null;
+ // opp.Bidding_Project_Name__c = null;
+ // LHJ End
+
+ Savepoint sp = Database.setSavepoint();
+ try {
+ delete quoList;
+ delete oppLI;
+ update opp;
+ return '1';
+ } catch (Exception ex) {
+ Database.rollback(sp);
+ return ex.getMessage() + ' | Line:' + ex.getLineNumber();
+ }
+ }
public class InitData{
@AuraEnabled
public Boolean directLossFLG;
--
Gitblit v1.9.1