黄千龙
2023-07-18 428f42fab44b654c69fbc461513203830743d7de
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
@@ -4,7 +4,14 @@
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;
@@ -36,8 +43,8 @@
            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);
@@ -60,13 +67,15 @@
                 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(() => {