unknown
2023-05-15 4363dfe1869bda7e042d4755ab005f8997b45ae0
现场统一收货

备品借出申请-现场统一收货(按钮)修改
2个文件已修改
24 ■■■■ 已修改文件
force-app/main/default/classes/AllReceivedFseController.cls 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AllReceivedFseController.cls
@@ -1,14 +1,11 @@
public with sharing class AllReceivedFseController {
    public AllReceivedFseController() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new InitData();
        Rental_Apply__c ra = [SELECT Id, Loaner_received_ng_num__c from Rental_Apply__c where Id = :recordId];
        res.Id = ra.Id;
        res.LoanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
        res.id = ra.Id;
        res.loanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
        return res;
    }
@@ -28,7 +25,7 @@
        if(updateList.size()>0){
            try {
                update updateList;
                Update updateList;
                return 'SUCCESS';
            }
            catch (Exception e) {
@@ -41,8 +38,8 @@
    public Class InitData{
        @AuraEnabled
        public String Id;
        public String id;
        @AuraEnabled
        public Integer LoanerReceivedNgNum;
        public Integer loanerReceivedNgNum;
    }
}
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
@@ -25,13 +25,15 @@
        init({
            recordId: this.recordId
        }).then(res=>{
            if(res.LoanerReceivedNgNum == 0){
            console.log('loanerReceivedNgNum==='+ res.loanerReceivedNgNum);
            if(res.loanerReceivedNgNum == 0){
                const evt = new ShowToastEvent({
                        title : '现场已经全部收到实物了',
                        message: '',
                        variant: 'success'
                        variant: 'error'
                    });
                this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
            }else{
                getRaeSet({
                    recordId: this.recordId
@@ -57,9 +59,12 @@
                    }
                    
                })
                .catch(err=>{
                    console.log('getRaeSet==='+err);
                })
            }
        }).catch(err=>{
            console.log(err);
            console.log('init==='+err);
        })
    }
}