| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForRCSubmitButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisWithRC'; |
| | | |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | /* |
| | | * @Description: 提交待审批 |
| | | * @Author: hql |
| | | * @Date: 2023-07-12 09:45:19 |
| | | * @LastEditTime: 2023-07-12 15:44:33 |
| | | * @LastEditors: |
| | | */ |
| | | export default class lexRCSubmit extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | |
| | | return; |
| | | } |
| | | console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null && this.RCproblemnotfound)); |
| | | if (this.CancelQISReason!=null) { |
| | | if (this.CancelQISReason==null) { |
| | | if (this.qisStatus == 'RC检测申请') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '需要先点击[OCM服务本部收到实物]', |
| | | message: '', |
| | | title : '', |
| | | message: '需要先点击[OCM服务本部收到实物]', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | } |
| | | if (this.Rcid ==null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '判定担当必须填写', |
| | | message: '', |
| | | title : '', |
| | | message: '判定担当必须填写', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | } |
| | | if (this.RCinspectionDate == null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : 'OCM服务本部还没有检测完毕', |
| | | message: '', |
| | | title : '', |
| | | message: 'OCM服务本部还没有检测完毕', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | |
| | | if (this.QISReplyDay!=null && this.RCproblemnotfound) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]', |
| | | message: '', |
| | | title : '', |
| | | message: '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | this.err = result; |
| | | if (result!='成功') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '更新失败', |
| | | message: this.err, |
| | | title : '', |
| | | message: '更新失败'+this.err, |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | } |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(error => { |
| | | console.log('error='+error); |