| force-app/main/default/classes/LexRentalApplyPDFController.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/classes/LexRentalApplyPDFController.cls-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/classes/LexRentalApplyPDFController.cls
New file @@ -0,0 +1,38 @@ /** * * ODescription: GAuthor: sun xia @Date: 2023-07-11 15:31:56 GIastEditors: sun xia @IastEditTime: 2023-07-11 15:31:56 * */ public with sharing class LexRentalApplyPDFController { @AuraEnabled public static InitData initJumptoPDFButton(String recordId) { InitData res = new InitData(); try { List<Rental_Apply__c> raList = [SELECT Id,Shipment_requested_cnt__c from Rental_Apply__c where Id = :recordId]; if(raList.size() > 0){ Rental_Apply__c ra = raList[0]; List<Rental_Apply_Equipment_Set__c> raeSet = [SELECT Id from Rental_Apply_Equipment_Set__c where Rental_Apply__c = :recordId and Yi_Shipment_request__c > 0 and RAES_Status__c != '取消']; res.shipmentRequestedCnt = Integer.valueOf(ra.Shipment_requested_cnt__c); if(raeSet.size()>0){ Integer setLength = raeSet.size(); res.pageLength = Math.mod(setLength,10)== 0 ? setLength/10 : Math.round(setLength) +1 ; } } }catch(Exception e){ System.debug(LoggingLevel.INFO, '****e:' + e); } return res; } public class InitData{ @AuraEnabled public String id; @AuraEnabled public Integer pageLength; @AuraEnabled public Integer shipmentRequestedCnt; } } force-app/main/default/classes/LexRentalApplyPDFController.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/lexEquipmentRentalPDF/lexEquipmentRentalPDF.js
@@ -4,7 +4,7 @@ import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { updateRecord } from 'lightning/uiRecordApi'; import init from '@salesforce/apex/RentalApplyEquipmentRentalPDFController.initJumptoPDFButton'; import init from '@salesforce/apex/LexRentalApplyPDFController.initJumptoPDFButton'; export default class lexEquipmentRentalPDF extends LightningElement { @api recordId;