twysparks
2023-06-26 a8628cfe2640797ba9265e9be46c42430d9e7eba
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
@@ -61,7 +61,6 @@
                        this.RentalApplyDiscountApproval();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -74,16 +73,19 @@
        if (power != '2B2_备品中心检测&仓库管理') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        var status = this.RentalApplyDiscountStatusC;
        if (status == '审批中') {
            this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '批准') {
            this.ShowToastEvent("审批已批准,请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '草案中' || status == undefined || status == '驳回') {
@@ -94,12 +96,14 @@
                    console.log(result);
                    if (result.length > 0) {
                        var split = result.split(", ");
                        alert("提交失败 " + split[1]);
                        this.ShowToastEvent("提交失败 " + split[1], "error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }
                })
            } else {
                this.ShowToastEvent("提交失败", "error");
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
        }