| New file |
| | |
| | | <!-- |
| | | * @Description: |
| | | * @Author: [lijinhuan] |
| | | * @Date: 2023-04-26 17:25:35 |
| | | * @LastEditors: [lijinhuan] |
| | | * @LastEditTime: 2023-07-03 16:17:03 |
| | | --> |
| | | <aura:component |
| | | implements="lightning:actionOverride,lightning:isUrlAddressable,force:lightningQuickAction,force:hasRecordId" |
| | | access="global"> |
| | | <aura:html tag="style"> |
| | | .slds-modal__container{ |
| | | max-width: 65rem !important; |
| | | width:100% !important; |
| | | } |
| | | .cuf-content { |
| | | padding: 0 0rem !important; |
| | | } |
| | | .slds-p-around--medium { |
| | | padding: 0rem !important; |
| | | } |
| | | .slds-modal__content{ |
| | | overflow-y:auto !important; |
| | | height:unset !important; |
| | | max-height:unset !important; |
| | | min-height:8rem; |
| | | } |
| | | .slds-tile_board{ |
| | | padding:20px 40px; |
| | | } |
| | | </aura:html> |
| | | <c:lexTransferApplyNew /> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | ({ |
| | | myAction : function(component, event, helper) { |
| | | |
| | | } |
| | | }) |
| | |
| | | * @Author: [lijinhuan] |
| | | * @Date: 2023-06-25 20:04:41 |
| | | * @LastEditors: [lijinhuan] |
| | | * @LastEditTime: 2023-07-06 15:50:03 |
| | | * @LastEditTime: 2023-07-06 17:22:39 |
| | | */ |
| | | public without sharing class lexRentalApplyFaultReportController { |
| | | @AuraEnabled |
| | |
| | | //查当前明细下有多少故障报告 |
| | | // 0 没有报告 |
| | | // Id 有 最新一条为草案中 |
| | | // 2 有很多条 |
| | | Map<String,String> sIdMap = New Map<String,String>(); |
| | | for(Rental_Apply_Fault__c raf : [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c in :eIds Order By CreatedDate DESC]){ |
| | | if(!sIdMap.containsKey(raf.Rental_Apply_Equipment_Set_Detail__c)){ |
| | | sIdMap.put(raf.Rental_Apply_Equipment_Set_Detail__c,raf.Id); |
| | | // 2 有很多条 没有这个场景 |
| | | if(eIds.size() > 0){ |
| | | Map<String,String> sIdMap = New Map<String,String>(); |
| | | for(Rental_Apply_Fault__c raf : [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c in :eIds Order By CreatedDate DESC]){ |
| | | if(!sIdMap.containsKey(raf.Rental_Apply_Equipment_Set_Detail__c)){ |
| | | sIdMap.put(raf.Rental_Apply_Equipment_Set_Detail__c,raf.Id); |
| | | } |
| | | } |
| | | } |
| | | for(Rental_Apply_Equipment_Set_Detail__c rae : eList){ |
| | | RetObject temp = new RetObject(); |
| | | temp.rae = rae; |
| | | if(sIdMap.containsKey(rae.Id)){ |
| | | temp.faultId = sIdMap.get(rae.Id) ; |
| | | }else{ |
| | | temp.faultId = ''; |
| | | for(Rental_Apply_Equipment_Set_Detail__c rae : eList){ |
| | | RetObject temp = new RetObject(); |
| | | temp.rae = rae; |
| | | if(sIdMap.containsKey(rae.Id)){ |
| | | temp.faultId = sIdMap.get(rae.Id) ; |
| | | }else{ |
| | | temp.faultId = ''; |
| | | } |
| | | retObjectList.add(temp); |
| | | } |
| | | retObjectList.add(temp); |
| | | return retObjectList; |
| | | } |
| | | return retObjectList; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('*******lexRentalApplyFaultReportController******'+e.getMessage()); |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexTransferApplyNew from 'c/lexTransferApplyNew'; |
| | | |
| | | describe('c-lex-transfer-apply-new', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-transfer-apply-new', { |
| | | is: LexTransferApplyNew |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: 新建调拨重写 No. 默认* |
| | | * @Author: [lijinhuan] |
| | | * @Date: 2023-07-03 15:55:28 |
| | | * @LastEditors: [lijinhuan] |
| | | * @LastEditTime: 2023-07-06 18:05:15 |
| | | */ |
| | | import { LightningElement,wire } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | export default class LexTransferApplyNew extends NavigationMixin(LightningElement) { |
| | | recordTypeId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordTypeId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordTypeId = str; |
| | | let defaultFieldValues = {}; |
| | | defaultFieldValues['Name'] = '*'; |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'TransferApply__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: encodeDefaultFieldValues(defaultFieldValues), |
| | | recordTypeId: this.recordTypeId, |
| | | useRecordTypeCheck: 1, |
| | | navigationLocation: 'LIST_VIEW', |
| | | backgroundContext: '/lightning/o/TransferApply__c/list?filterName=Recent&0.source=alohaHeader' |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>false</isExposed> |
| | | </LightningComponentBundle> |