| | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | const event = new ShowToastEvent({ |
| | | title: '检查状态', |
| | | message: |
| | | '只有状态为待提交报告的OPD计划才能进行无报告申请', |
| | | variant: 'error' |
| | | }); |
| | | export default class lexNoReportApplication extends LightningElement { |
| | | |
| | |
| | | } else if (error) { |
| | | this.error = error ; |
| | | } |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.OPDPlan__c=result; |
| | | this.NoReportApplication().then(result=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | }).catch(error=>{ |
| | | const eventError = new ShowToastEvent({ |
| | | title: '页面初始化错误', |
| | | message: |
| | | error.message, |
| | | }); |
| | | this.dispatchEvent(eventError); |
| | | }); |
| | | } |
| | | |
| | | @wire(CurrentPageReference) |
| | |
| | | |
| | | |
| | | |
| | | async connectedCallback(){ |
| | | await init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.OPDPlan__c=result; |
| | | this.NoReportApplication().then(result=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | }).catch(error=>{ |
| | | const eventError = new ShowToastEvent({ |
| | | title: '页面初始化错误', |
| | | message: |
| | | error.message, |
| | | }); |
| | | this.dispatchEvent(eventError); |
| | | }); |
| | | connectedCallback(){ |
| | | |
| | | } |
| | | |
| | | |