unknown
2023-08-24 ddb0231ef7c5cf2bad9d3f1afc2f733674ad38a5
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
@@ -33,7 +33,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -43,13 +42,10 @@
                this.Id = result.Id;
                this.YanshoudanRequest();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
        })
    }
    // 验收单回收申请
@@ -58,12 +54,15 @@
            recordId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                var indexs = result.indexOf(": ")
                var resolves = result.substring(indexs + 1, result.length);
                alert(resolves);
            if (result != null) {
                if (result.length > 0) {
                    var split = result.split(", ");
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            }
            location.reload();
            this.ShowToastEvent("已经申请过了,不允许重新申请", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }