From 80a09ee5d8bd6f939bb07de410f07200ddd02441 Mon Sep 17 00:00:00 2001
From: zz <1842059105@qq.com>
Date: 星期五, 26 五月 2023 14:57:38 +0800
Subject: [PATCH] 提交 “任务” OLY中标和竞争对手竞标按钮代码
---
force-app/main/default/classes/OppLoseController.cls | 48 +++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/OppLoseController.cls b/force-app/main/default/classes/OppLoseController.cls
index fb78bab..e2917ed 100644
--- a/force-app/main/default/classes/OppLoseController.cls
+++ b/force-app/main/default/classes/OppLoseController.cls
@@ -4,12 +4,13 @@
public static InitData init(String taskId){
InitData res = new initData();
try{
- task__c task = [SELECT id, OpportunityId__c
+ task__c task = [SELECT id, OpportunityId__c , taskStatus__c
FROM task__c
WHERE Id =: taskId
LIMIT 1];
res.task = task;
+ res.taskStatus = task.taskStatus__c;
res.OpportunityId = task.OpportunityId__c;
Opportunity opp = [SELECT Sales_owner_buchangID__c,Manager_name__c,Sales_owner_buchang__c,
@@ -38,18 +39,53 @@
System.debug(LoggingLevel.INFO, '*** e: ' + e);
}
return res;
- }
-
+ }
+
public class ReturnData{
}
-
+ //OLY涓爣
+ @AuraEnabled
+ public static String taskOLYwinBid(String recordId) {
+ String messageText = '';
+ try {
+ Opportunity opp = [SELECT Id,ConfirmationofAward__c FROM Opportunity WHERE Id = :recordId LIMIT 1];
+ opp.Id = recordId;
+ opp.ConfirmationofAward__c = LightingButtonConstant.STATUS_OLYwinBid;
+ messageText = '1';
+ update opp;
+ System.debug(LoggingLevel.INFO, '*** winBid: ' + opp);
+ return messageText;
+ } catch (Exception ex) {
+ System.debug(LoggingLevel.INFO, '*** winBidXu: ' + ex);
+ messageText = ex.getMessage();
+ return messageText;
+ }
+ }
+ //绔炰簤瀵规墜涓爣
+ @AuraEnabled
+ public static String taskLoseBid(String recordId) {
+ String messageText = '';
+ try {
+ Opportunity opp = [SELECT Id,ConfirmationofAward__c FROM Opportunity WHERE Id = :recordId LIMIT 1];
+ opp.Id = recordId;
+ opp.ConfirmationofAward__c = LightingButtonConstant.STATUS_Bid_LoseBid;
+ messageText = '1';
+ update opp;
+ System.debug(LoggingLevel.INFO, '*** winBid: ' + opp);
+ return messageText;
+ } catch (Exception ex) {
+ System.debug(LoggingLevel.INFO, '*** winBidXu: ' + ex);
+ messageText = ex.getMessage();
+ return messageText;
+ }
+ }
public class InitData{
//璇环鏁版嵁
@AuraEnabled
public Opportunity opp;
@AuraEnabled
- public String stageName;
+ public String StageName;
@AuraEnabled
public Boolean SAP_Send_OK;
@AuraEnabled
@@ -73,6 +109,8 @@
@AuraEnabled
public String OpportunityId;
@AuraEnabled
+ public String taskStatus;
+ @AuraEnabled
public task__c task;
}
--
Gitblit v1.9.1