19626
2023-05-16 cca92679ebebf35a6cbff4da9c6181ea7204a841
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:09:14
 * @LastEditTime: 2023-05-15 09:17:27
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -16,7 +16,7 @@
export default class LexOCSMToReport extends LightningElement {
    @api recordId;
    IsLoading = true;
    OCSMAdministrativeReportStatus;
    theOCSMAdministrativeReportStatus;
    awareDate;
@@ -43,15 +43,13 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
                this.theOCSMAdministrativeReportStatus = result.theOCSMAdministrativeReportStatus;
                this.awareDate = result.awareDate;
                this.toReport();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
    }
@@ -77,13 +75,17 @@
            return;
            }
        if(this.OCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
        if(this.theOCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
            updateForOCSMToReportButton({
                recordId: this.recordId
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                if(result){
                    this.showToast(result,"error");
                }else{
                    this.showToast("成功","success");
                    this.updateRecordView(this.recordId);
                    this.IsLoading = false;
                }
                this.dispatchEvent(new CloseActionScreenEvent());
                });
        }else{