unknown
2023-08-24 ddb0231ef7c5cf2bad9d3f1afc2f733674ad38a5
force-app/main/default/lwc/lexConsumApply_FromAccount/lexConsumApply_FromAccount.js
@@ -7,7 +7,7 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexConsumApply_FromAccount extends LightningElement {
export default class LexConsumApply_FromAccount extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
@@ -34,8 +34,8 @@
            recordId: this.recordId
        }).then(result=>{
            UserInfo_Owner({}).then(res=>{
                if(res.isFormalStuff == 'true'){
                    this.showToast('试用期内,不能申请','warning');
                if(res.isFormalStuff){
                    this.showToast('试用期内,不能申请','error');
                    return;
                }else{
    
@@ -55,8 +55,8 @@
                        Account__c:result.name,
                        Name:'*',
                        demo_purpose2__c:'OPD试用',
                        Person_In_Charge__c:res.lastName + res.firstName,
                        applyUser__c:res.lastName + res.firstName
                        Person_In_Charge__c:res.id,
                        applyUser__c:res.id
                    });
    
                    this[NavigationMixin.Navigate]({
@@ -66,7 +66,7 @@
                            actionName: 'new'
                        },
                        state:{
                            defaultFieldValues: this.defaultValues
                            defaultFieldValues: defaultValues
                        }
                    })
                }
@@ -92,6 +92,7 @@
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}