| force-app/main/default/classes/lexReturnDeliveryController.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/classes/lexReturnDeliveryController.cls-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/classes/lexReturnDeliveryController.cls
New file @@ -0,0 +1,31 @@ public with sharing class lexReturnDeliveryController { @AuraEnabled public static InitData init(String recordId){ InitData res = new InitData(); try { res.flag = true; List<Consum_Apply_Equipment_Set_Detail__c> caeList = [SELECT Asset_Center_Confirm_F__c FROM Consum_Apply_Equipment_Set_Detail__c WHERE Cancel_Select__c = false AND Consum_Apply__c = :recordId]; if(caeList.size()>0){ res.size = caeList.size(); for(Consum_Apply_Equipment_Set_Detail__c cae : caeList){ if(cae.Asset_Center_Confirm_F__c != 'OK'){ res.flag = false; } } } } catch (Exception e) { System.debug('********lexReturnDeliveryController*****'+e.getMessage()); } return res; } public class InitData{ @AuraEnabled public Boolean flag; @AuraEnabled public Integer size; } } force-app/main/default/classes/lexReturnDeliveryController.cls-meta.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>50.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/lwc/lexReturnDeliverySlipConsumApply/lexReturnDeliverySlipConsumApply.js
@@ -22,12 +22,16 @@ init({ recordId: this.recordId }).then(res=>{ if(!res.flag){ if(res){ if(!res.flag){ this.showToast('未完成到货确认或备品中心未确认不能上传试用表','warning'); return; } if(res.size > 0){ window.open("/apex/consumTrialConfirm?id=" + this.recordId); } if(res.size > 0){ this.dispatchEvent(new CloseActionScreenEvent()); window.open("/apex/consumTrialConfirm?id=" + this.recordId); return; } } }) }