| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForOSHRecievedButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQis'; |
| | | |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | /* |
| | | * @Description: OSH现品收到 |
| | | * @Author: hql |
| | | * @Date: 2023-07-12 09:45:19 |
| | | * @LastEditTime: 2023-07-12 15:44:33 |
| | | * @LastEditors: |
| | | */ |
| | | export default class lexOSHRecieved extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | |
| | | console.log('this.qisStatus='+this.qisStatus); |
| | | if (this.qisStatus!='OSH检测申请' && this.qisStatus!='完毕') { |
| | | const evt = new ShowToastEvent({ |
| | | title : 'OSH已经收到实物', |
| | | message: '', |
| | | title : '', |
| | | message: 'OSH已经收到实物', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | console.log('result'+result); |
| | | if (result!='成功') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '更新失败', |
| | | message: result, |
| | | title : '', |
| | | message: '更新失败'+result, |
| | | 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(() => { |