| | |
| | | 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; |
| | |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | UserInfo_Owner({}).then(res=>{ |
| | | if(res.isFormalStuff == 'true'){ |
| | | this.showToast('试用期内,不能申请','warning'); |
| | | if(res.isFormalStuff){ |
| | | this.showToast('试用期内,不能申请','error'); |
| | | return; |
| | | }else{ |
| | | |
| | |
| | | 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]({ |
| | |
| | | actionName: 'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues: this.defaultValues |
| | | defaultFieldValues: defaultValues |
| | | } |
| | | }) |
| | | } |
| | |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | } |