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
30
31
32
33
34
35
36
37
38
39
const conmentCancel = (defaultValues) =>{
    console.log('进入conmentCancel');
    console.log('window.history.length = ' + window.history.length);
    if(window.history.length == 1){
        window.close();
        return false;
    }
    //单独为学会培训新建备品申请
    if(JSON.stringify(defaultValues).indexOf('Return_To_Level1') != -1){
        window.history.back();
        return false;
    }
 
    //deloitte-zhj 20231106
    //单独为CIC
    if(JSON.stringify(defaultValues).indexOf('inquiry_detail__c') != -1){
        window.history.back();
        return false;
    }
 
    console.log('JSON.stringify(defaultValues) = ' + JSON.stringify(defaultValues));
    if(JSON.stringify(defaultValues) != '{}'){
        window.history.go(-2);
        setTimeout(function() {
            location.reload();
        }, 1000); // 延迟一秒(1000毫秒)
    }else{
        //window.history.back();
        window.history.go(-1);
        setTimeout(function() {
            location.reload();
        }, 1000); // 延迟一秒(1000毫秒)          
        
    }
    return false;
}
 
 
export {conmentCancel}