| | |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForQisUniversalFailureCodeButton'; |
| | | import sqlForPAE from '@salesforce/apex/QISReportController.sqlForPAE'; |
| | | |
| | | /* |
| | | * @Description: Final universal code编辑 |
| | | * @Author: hql |
| | | * @Date: 2023-07-12 09:45:19 |
| | | * @LastEditTime: 2023-07-12 15:44:33 |
| | | * @LastEditors: |
| | | */ |
| | | export default class lexQisUniversalFailureCode extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | qisReportId; |
| | | paeId; |
| | | @wire(CurrentPageReference) |
| | | @api recordId; |
| | | IsLoading = true; |
| | | qisReportId; |
| | | paeId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | |
| | | this.qisReportId = result.Id; |
| | | var RecordTypeId = "ASACDecision"; |
| | | sqlForPAE({ |
| | | qisReportId: this.qisReportId |
| | | }).then(result => { |
| | | if (result!=null) { |
| | | this.paeId = result.pAEid; |
| | | console.log('result='+this.paeId); |
| | | } |
| | | var url = ''; |
| | | if (result!=null){ |
| | | url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ; |
| | | } else { |
| | | url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId; |
| | | } |
| | | console.log('url='+url); |
| | | // window.open(url,'_self'); |
| | | qisReportId: this.qisReportId |
| | | }).then(result => { |
| | | if (result!=null) { |
| | | this.paeId = result.pAEid; |
| | | console.log('result='+this.paeId); |
| | | } |
| | | var url = ''; |
| | | if (result!=null&& this.paeId!=null){ |
| | | url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ; |
| | | } else { |
| | | url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId; |
| | | } |
| | | console.log('url='+url); |
| | | // window.open(url,'_self'); |
| | | window.location.replace(url); |
| | | }); |
| | | }); |
| | | } |
| | | }).catch(error => { |
| | | console.log('error='+error); |