| | |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForRCSubmitButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisWithRC'; |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null && this.RCproblemnotfound)); |
| | | if (this.CancelQISReason!=null) { |
| | | if (this.qisStatus == 'RC检测申请') { |
| | | const evt = new ShowToastEvent({ |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | if (this.QISReplyDay!=null && this.RCproblemnotfound) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]', |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | this.type = '1'; |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | LightningConfirm.open({ |
| | | message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | this.type = '1'; |
| | | console.log('this.type='+this.type); |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | }else{ |
| | | if (confirm("一旦提交关闭此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | this.type = '2'; |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | LightningConfirm.open({ |
| | | message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | this.type = '2'; |
| | | console.log('this.type='+this.type); |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | console.log('this.type='+this.type); |
| | | |
| | | // this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.updateQisSubmit(); |
| | | |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |