zhangchunxu
2023-08-04 5658927d15c7d3d5b896ea5ed62f25bf377846e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.open("/apex/TransferApplySelectDetail?id="+this.recordId, "_top"); 
            }
        })
    }
}