liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
import { LightningElement, track, wire, api } from 'lwc';
import transferApplySelectDetail from '@salesforce/apex/LexTransferApplyController.transferApplySelectDetail';
 
export default class lexTransferApplySelectDetail extends LightningElement {
    @api recordId;
    msg;
    IsLoading = true;
    IsShow = false;
    connectedCallback(){
        transferApplySelectDetail({
            recordId: this.recordId
        }).then(res=>{
            this.IsLoading = false; 
            if(res.TA_Status__c == '删除' || res.TA_Status__c == '取消' || res.TA_Status__c == '完了'){
                this.IsShow = true;
                this.msg = '调拨申请已经'+ res.TA_Status__c +',不能选择调拨明细'
            }else{
                //window.location.href = "/apex/TransferApplySelectDetail?id="+this.recordId
                window.open("/apex/TransferApplySelectDetail?id="+this.recordId);
                this.closeAction();
            }
        })
    }
 
    closeAction() {
        //返回当前的备品申请
        window.open("/"+this.recordId,'_self');
    }
}