unknown
2023-08-23 8749760be3e1ba64edd4ada506bdf628e5bee852
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -36,7 +36,6 @@
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -47,7 +46,6 @@
                this.RepairC = result.RepairC;
                this.DiscountRequest();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -61,14 +59,15 @@
        }).then(repairs => {
            if (repairs != null && repairs.length > 0) {
                var rp = repairs[0];
                if (rp.Return_Without_Repair_IF__c == 'true') {
                console.log(rp);
                if (rp.Return_Without_Repair_IF__c == true) {
                    this.ShowToastEvent("未修理归还的修理不允许减价申请", "error");
                    // alert("未修理归还的修理不允许减价申请");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                } else {
                    if (rp.Return_Without_Repair__c == 'true') {
                    if (rp.Return_Without_Repair__c == true) {
                        this.ShowToastEvent("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作", "error");
                        // alert("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作");
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }
                }
@@ -79,7 +78,8 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
            })
@@ -89,11 +89,11 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
            })
            location.reload();
        })
    }