| force-app/main/default/lwc/lexReassign/lexReassign.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexReassign/lexReassign.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexReassign/lexReassign.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexReassign/lexReassign.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/lwc/lexReassign/lexReassign.css
New file @@ -0,0 +1,22 @@ .holder{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display : none !important; } .toast{ border: 1px solid #c9c9c9; border-radius: 10px; width: 50%; margin: 0 auto; font-size: 18px; font-weight: bold; padding: 10px 20px; background: #feb75d; display: flex; } force-app/main/default/lwc/lexReassign/lexReassign.html
New file @@ -0,0 +1,13 @@ <template> <div class="holder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> <div if:false={IsLoading} class="toast"> <span style="padding: 10px;">{msg}</span> <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" title="Close" style="color: black;"></lightning-icon> <span class="slds-assistive-text">Close</span> </button> </div> </template> force-app/main/default/lwc/lexReassign/lexReassign.js
New file @@ -0,0 +1,46 @@ import { LightningElement, track, wire, api} from 'lwc'; import LightningConfirm from 'lightning/confirm'; import rentalApplyEquipmentSetReassign from '@salesforce/apex/RentalApplyEquipmentSetWebService.rentalApplyEquipmentSetReassign'; export default class lexReassign extends LightningElement { @api recordId; //只获取当前list选中的一览Id @api rentalApplySetIds; IsLoading=true; //提示信息 msg; connectedCallback(){ console.log(this.recordId); console.log(JSON.stringify(this.rentalApplySetIds)); // if(this.rentalApplySetIds.length<1){ if (this.recordId && JSON.stringify(this.rentalApplySetIds)) { LightningConfirm.open({ message: '你确定要重新分配吗?', variant: 'headerless', label: 'this is the aria-label value', }).then(res=>{ if(res){ rentalApplyEquipmentSetReassign({ raesID: this.rentalApplySetIds[0] }).then(result=>{ if(result == '1'){ this.msg = "已重新分配"; this.closeAction(); }else{ this.msg = result; return; } }) } }) }else{ this.msg = "请选择借出备品一览"; return; } } closeAction() { //返回当前的备品申请 window.open("/"+this.recordId,'_self'); } } force-app/main/default/lwc/lexReassign/lexReassign.js-meta.xml
New file @@ -0,0 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexReassign"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> <target>lightning__FlowScreen</target> </targets> <targetConfigs> <targetConfig targets="lightning__FlowScreen"> <property name="recordId" type="String" label="recordId"/> <property name="rentalApplySetIds" type="String[]" label="rentalApplySetIds"/> </targetConfig> </targetConfigs> </LightningComponentBundle> force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.css
New file @@ -0,0 +1,22 @@ .holder{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display : none !important; } .toast{ border: 1px solid #c9c9c9; border-radius: 10px; width: 50%; margin: 0 auto; font-size: 18px; font-weight: bold; padding: 10px 20px; background: #feb75d; display: flex; } force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.html
New file @@ -0,0 +1,13 @@ <template> <div class="holder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> <div if:false={IsLoading} class="toast"> <span style="padding: 10px;">{msg}</span> <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" title="Close" style="color: black;"></lightning-icon> <span class="slds-assistive-text">Close</span> </button> </div> </template> force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.js
New file @@ -0,0 +1,116 @@ import { LightningElement,api, track, wire } from 'lwc'; import {CurrentPageReference} from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; import getUserId from '@salesforce/apex/RentalApplyControllerLWT.getUserId'; import init from '@salesforce/apex/SelectSubstituteControllerLWT.initFromSelectSubstituteButton'; import selectRentalApplyEquipmentSetByID from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyEquipmentSetByID'; import selectRentalApplyEquipmentSetByRACID from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyEquipmentSetByRACID'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class rentalApplyJumpLWC extends LightningElement { @api recordId; id; @api rentalApplyIds; RentalApplyId; //提示信息 msg; IsLoading=true; @wire(CurrentPageReference) getStateParameters(currentPageReference){ console.log("进入页面"); console.log(currentPageReference); if(currentPageReference){ const urvalue=currentPageReference.state.recordId; if(urvalue){ let str=`${urvalue}`; console.log('str'); console.log(str); this.recordId=str; } } } connectedCallback(){ console.log(this.recordId); init({recordId:this.recordId}).then(result=>{ if(result!=null){ this.id=result.id; this.RentalApplyId=result.RentalApplyId; this.cancelSubmit().then(res=>{ this.IsLoading=false; this.dispatchEvent(new CloseActionScreenEvent()); }); } }).catch(err=>{ console.log("error:"); console.log(err); }).finally(()=>{ }); } async cancelSubmit(){ // 可分配代替品前提1 -- 备品借出申请的状态:“已批准”到“已出库指示” var userIdArr = ['00510000001O6HoAAK','00510000001O6I2AAK','00510000000gW9pAAE','00510000000gW9BAAU','00510000008pVbWAAU','00510000001OOMjAAO','00510000005sEEMAA2','00510000004pNOtAAM','00510000005QJ2eAAG','00510000007iCmcAAE','00510000006kIg8AAE','00510000004rbkzAAA','00510000003LMHuAAO','00510000000gW92AAE']; //当前用户登录id var userId; await getUserId().then(res=>{ userId=res; }) .catch(err=>{ console.log("getUserIderr==="+err); }) //TODO==== userId = '00510000001O6HoAAK'; if(userIdArr.indexOf(userId)== -1){ this.msg = '对不起你没有此操作的权限!'; this.IsLoading = false; return; } else { console.log('this.rentalApplyIds=='+this.rentalApplyIds); if(this.rentalApplyIds == undefined || this.rentalApplyIds.length<1){ this.msg = '请选择借出备品一览记录'; this.IsLoading = false; return; }else{ let raid = this.RentalApplyId; await selectRentalApplyEquipmentSetByRACID({recordId:this.recordId}).then(res=>{ console.log('selectRentalApplyEquipmentSetByRACID=='+JSON.stringify(res)); var allRecords = res; var validSize= allRecords.length; var canJump = false; for(var i=0;i<validSize;i++){ if(allRecords[i].Allow_Adjust_Queue_Flag__c == true){ canJump = true; break; } } if(canJump == true){ this.msg = '请选择借出备品一览记录有已经允许插队的,请选择未允许的一览'; this.IsLoading = false; return; }else{ let records=[this.recordId]; window.open("/apex/RentalApplyJump?objId="+this.recordId+"&raesIds="+ this.rentalApplyIds, 'RentalApplyJump', 'width=700,height=300'); this.closeAction(); } }) .catch(error=>{ console.log('selectRentalApplyEquipmentSetByRACIDerr==='+error); }) } } } closeAction() { //返回当前的备品申请 window.open("/"+this.recordId,'_self'); } } force-app/main/default/lwc/rentalApplyJumpLWC/rentalApplyJumpLWC.js-meta.xml
New file @@ -0,0 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="rentalApplyJumpLWC"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> <target>lightning__FlowScreen</target> </targets> <targetConfigs> <targetConfig targets="lightning__FlowScreen"> <property name="recordId" type="String" label="recordId"/> <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/> </targetConfig> </targetConfigs> </LightningComponentBundle>