binxie
2024-01-18 b1d36ea3e6653e59bd767aa192c688ee0d9d4c58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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(){
        console.log(this.recordId);
        console.log(JSON.stringify(this.rentalApplyIds));
        if (this.recordId && JSON.stringify(this.rentalApplyIds)) {
            window.open("/apex/RentalApplySplit?objId="+this.recordId+"&raesIds="+this.rentalApplyIds, 'RentalApplySplit', 'width=800,height=300');
            this.closeActionNew();
        }else{
            this.msg = '请选择借出备品一览记录';
            this.IsLoading = false;
        }
    }
    // closeAction() {
    //     //返回当前的备品申请
    //     window.open("/"+this.recordId,'_self');
    // }
    // 20231008 ljh add start
    closeActionNew() {
        //返回当前的备品申请
        window.open('/lightning/r/Rental_Apply__c/'+this.recordId+'/related/Rental_Apply_Equipment_Set__r/view','_self');
    }
    // 20231008 ljh add end
}