| | |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import init from '@salesforce/apex/QISReportController.initForlexRCRecievedButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisForRCRecieved'; |
| | | |
| | | /* |
| | | * @Description: OCSM服务本部收到实物 |
| | | * @Author: hql |
| | | * @Date: 2023-07-12 09:45:19 |
| | | * @LastEditTime: 2023-07-12 15:44:33 |
| | | * @LastEditors: |
| | | */ |
| | | export default class lexRCRecieved extends LightningElement { |
| | | @api recordId; |
| | | err; |
| | |
| | | console.log('this.qisStatus='+this.qisStatus); |
| | | if (this.qisStatus!='RC检测申请') { |
| | | const evt = new ShowToastEvent({ |
| | | title : 'OCM服务本部已经收到实物', |
| | | message: '', |
| | | title : '', |
| | | message: 'OCM服务本部已经收到实物', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') { |
| | | if (this.isAEProfile == null ||(this.isPAEProfile == null && this.isCNBuy != 'true')) { |
| | | 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 }}); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |