黄千龙
2023-08-09 626f3c3bb25e204568019e8d568e2d7547d1037a
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -15,7 +15,7 @@
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexOSHNogoods extends LightningElement {
export default class lexOSHNogoods extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
@@ -48,7 +48,6 @@
                this.email = result.email;
                this.OSHNogoods();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -59,6 +58,8 @@
    OSHNogoods() {
        if (this.QISStatusC != 'OSH检测申请' && this.QISStatusC != '完毕') {
            this.ShowToastEvent("OSH已经收到实物", "error")
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        } else {
            updateOSHNogoods({
                Id: this.Id,
@@ -68,7 +69,11 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }else{
                    this.ShowToastEvent('更新成功', "success");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
        }