| 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/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>