123
chenjingwu
2024-04-15 a099abe8d0ff0699296c9bcc53ca00b98d167c73
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
@@ -65,15 +65,14 @@
        if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) {
            updateRepair({
                recordId: this.Id
            }).catch(error => {
                if (error.body.pageErrors.length > 0) {
                    // alert(messages.join("\n"));
                    var errmsg = error.body.pageErrors[0].message.toString();
                    this.ShowToastEvent(errmsg.join("\n"), "error")
                    return;
            }).then(result => {
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                }
                location.reload();
            })
            window.location.reload();
        } else {
            this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error")
            return;