| | |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonQISReportCtl.init'; |
| | | import { |
| | | NavigationMixin |
| | | } from 'lightning/navigation'; |
| | | import { |
| | | encodeDefaultFieldValues |
| | | } from 'lightning/pageReferenceUtils'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexQISMBCrequestNew extends LightningElement { |
| | | export default class LexQISMBCrequestNew extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | |
| | | // 新建QIS M-BC申请. |
| | | QISMBCRequestNew() { |
| | | var status = this.QISStatusC; |
| | | |
| | | if (status != '完毕' && status != '已回答' && status != '取消') { |
| | | this.ShowToastEvent("QIS没有审批完毕或取消,不可以创建QIS M-BC!", "error"); |
| | | return; |
| | | } |
| | | var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id; |
| | | window.top.location.href = url; |
| | | const url = encodeDefaultFieldValues({ |
| | | Name: this.Name, |
| | | QIS_request_name__c: this.Id |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'QIS_M_BC__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: url |
| | | } |
| | | }); |
| | | // var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id; |
| | | // window.open(url); |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |