1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
public with sharing class LexQuoteEntryDecidebottonController {
    @AuraEnabled
    public static String updateOpportunity(String recordId){
        try {
            Opportunity opp = new Opportunity();
            opp.Id = recordId;
            opp.Estimation_Decision__c = false;
            opp.Stock_Confrim_Date__c = null;
            update opp;
            return 'success';
        } catch (Exception e) {
            return '取消Decide失败:'+e.getMessage();
        }
    }
    @AuraEnabled
    public static Opportunity selectOpportunityById(String recordId){
        Opportunity opp = [select id,Estimation_Decision__c from Opportunity where Id = :recordId];
        return opp;
    }
    @AuraEnabled
    public static User selectUser(){
        User us = new User();
        String userid = UserInfo.getUserId();
        if (userid != null) {
            us = [Select Id,Quote_Correct__c From User Where Id = :userid];
        }
        return us;
    }
 
   
}