黄千龙
2023-08-09 626f3c3bb25e204568019e8d568e2d7547d1037a
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -18,7 +18,7 @@
} from 'lightning/platformShowToastEvent';
export default class LexServiceCutPriceApply extends LightningElement {
export default class lexServiceCutPriceApply extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
@@ -59,7 +59,6 @@
                        this.ServiceCutPriceApply();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -74,15 +73,18 @@
        if (power != '2F2A_RC' && power != '2F4_技术推进部' && power != '2F4_技术推进部_非SSO') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        var status = this.CutPriceStatusServiceC;
        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 == '驳回') {
@@ -92,8 +94,12 @@
                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("更新成功!", "success");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
            updateRepairQuotation02({
@@ -102,11 +108,13 @@
                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("审批提交成功!", "success");
                    location.reload();
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
        }