| force-app/main/default/classes/ApplyJsCtl.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/classes/ApplyJsCtl.cls-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/classes/ApplyJsCtl.cls
New file @@ -0,0 +1,40 @@ /************************************************************************************************** * Name: ApplyJsCtl * Purpose: excute the java script of rental apply * Author: Prec-tech team * Create Date: 2021-11-17 * Modify History: * 2021-11-27 Create this class **************************************************************************************************/ global with sharing class ApplyJsCtl{ @AuraEnabled(cacheable=false) webService static String queueTop(String applyId) { try { System.debug(LoggingLevel.INFO, '*** applyId: ' + applyId); RentalFixtureSetAssignController.applysetMap = new Map<String,String>(); List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [SELECT Id,Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c, FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c, Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c, Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c, Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c, Salesdepartment_before__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c FROM Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply__c =:applyId AND Queue_Number__c > 0 AND Cancel_Select__c = false AND Is_Body__c = true]; System.debug(LoggingLevel.INFO, '*** raesdObjs: ' + raesdObjs); for(Rental_Apply_Equipment_Set_Detail__c detail:raesdObjs){ RentalFixtureSetAssignController.applysetMap.put(detail.Rental_Apply_Equipment_Set__c,detail.Rental_Apply_Equipment_Set__r.Name); } RentalFixtureSetAssignController.saveAgdustQueue(raesdObjs,'backEnd'); } catch (Exception e) { System.debug(LoggingLevel.INFO, '*** e.getMessage()+e.getLineNumber(): ' + e.getMessage()+e.getLineNumber()); return e.getMessage(); } return 'Success'; } } force-app/main/default/classes/ApplyJsCtl.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>53.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.css
New file @@ -0,0 +1,22 @@ .outerBorderCss{ border: 1px solid #D4D4D4; border-radius : 5px; border-top : 3px solid #565959; } .borderCss{ border: 1px solid #D4D4D4; border-radius : 5px; margin-bottom : 7px; border-top : 3px solid #565959; } .headerDorderCss{ border-top: 1px solid #565959; border-bottom: 1px solid #D4D4D4; padding:3px; } .centerCss{ text-align: center; } .centerCss .left{ margin-left: 100px; }/* sample css file */ force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.html
New file @@ -0,0 +1,5 @@ <template> <div class="sisToOPDHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> </template> force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js
New file @@ -0,0 +1,49 @@ import { LightningElement, track, wire, api } from 'lwc'; import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import queueTop from '@salesforce/apex/ApplyJsCtl.queueTop'; export default class lexTopInQueue extends LightningElement { @api recordId; IsLoading = true; @wire(CurrentPageReference) getStateParameters(currentPageReference){ if(currentPageReference) { const urlValue = currentPageReference.state.recordId; if(urlValue) { let str = `${urlValue}`; this.recordId = str; } } } connectedCallback(){ queueTop({ applyId: this.recordId }).then(res=>{ if(res == 'Success'){ const evt = new ShowToastEvent({ title : '置顶成功', message: '', variant: 'success' }); this.dispatchEvent(evt); this.dispatchEvent(new CloseActionScreenEvent()); }else{ const evterr = new ShowToastEvent({ title : res, message: '', variant: 'error' }); this.dispatchEvent(evterr); this.dispatchEvent(new CloseActionScreenEvent()); } }).catch(err=>{ this.dispatchEvent(new CloseActionScreenEvent()); }) } } force-app/main/default/lwc/lexTopInQueue/lexTopInQueue.js-meta.xml
New file @@ -0,0 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit"> <apiVersion>54.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle>