zhangzhengmei
2023-05-18 1ce13a35baf4d4a8cd047aacfb27afaae3278073
force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
New file
@@ -0,0 +1,28 @@
import { LightningElement,api, track, wire } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
// 2023/05/11 借出备品配套一览  分单按钮
export default class lexSplitApplyFlowLWC extends NavigationMixin(LightningElement) {
   @api recordId;
   //只获取当前list选中的一览Id
   @api rentalApplyIds;
    IsLoading=true;
    //提示信息
    msg;
   connectedCallback(){
      if (this.recordId && JSON.stringify(this.rentalApplyIds)) {
          window.open("/apex/RentalApplySplit?objId="+this.recordId+"&raesIds="+this.rentalApplyIds, 'RentalApplySplit', 'width=600,height=200');
         this.closeAction();
      }else{
         this.msg = '请选择借出备品一览记录';
         this.IsLoading = false;
      }
   }
    closeAction() {
        //返回当前的备品申请
      window.open("/"+this.recordId,'_self');
    }
}