19626
2023-06-26 5fb60d0de53f40f1d519a23f8c071954dd599d8f
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
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';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexSpecilaApplyCreate extends NavigationMixin(LightningElement) {
    @api oppId;
    @api oppName;
    @api oppForecastStatus;
    msg;
    IsLoading = true;
    connectedCallback(){
        // const defaultValues = encodeDefaultFieldValues({
        //     Opportunity__c: this.oppId, // 关联主记录 ID
        //     Apply_Content_Old__c: this.oppForecastStatus == undefined ? '' : this.oppForecastStatus
        // });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'OpportunitySpecialApply__c',
                actionName: 'new'
            },
            // state: {
            //     defaultFieldValues: defaultValues,
            //     RecordTypeId: '01210000000gTCW'
            // }
        });
        // var url = 'a3W/e?RecordType=01210000000gTCW&CF00N10000008qvFQ='+ encodeURIComponent(this.oppName) + '&CF00N10000008qvFQ_lkid='+ encodeURIComponent(this.oppId) + '&00N10000008qvFX='+ encodeURIComponent(this.oppForecastStatus)+'&retURL='+ encodeURIComponent(this.oppId);
        // window.location.href = url;
    }
}