zhangqian
2023-07-04 f3a8b609580d160f2d15b0c2fab28784a38cba71
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
@@ -53,9 +53,7 @@
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // OCSM不要报告
@@ -63,29 +61,24 @@
        if (!confirm("不要报告后无法撤回,是否继续?")) {
            return;
        }
        if (this.OCSMAdministrativeReportNumberC != undefined ||
            this.OCSMAdministrativeReportDateC != undefined) {
            this.ShowToastEvent("已经报告的QIS,不可以点击OCSM不要报告。", "error")
            // alert("已经报告的QIS,不可以点击OCSM不要报告。");
            return;
        }
        if (this.AwareDateC != undefined) {
            updateRepair({
                recordId: this.Id
            }).catch(error => {
                if (error.body.pageErrors.length > 0) {
                    var errmsg = error.body.pageErrors[0].message.toString();
                    this.ShowToastEvent(errmsg.join("\n"), "error")
                    // alert(errmsg.join("\n"));
                    return;
                }
            }).then(result => {
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                }
                 window.location.reload();
            })
            window.location.reload();
        } else {
            this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error")
            // alert("没有AwareDate或已经OCSM行政报告,请确认。");
            return;
        }
    }