unknown
2023-08-23 dfff58b7cd897b824a129edba6b5cdae20bb1e5c
force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
@@ -10,6 +10,9 @@
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
import selectMaintenanceContractEstimate from '@salesforce/apex/otherButtonMaintenanceContractCtl.selectMaintenanceContractEstimate';
export default class LexCustomAnewMaintenance extends LightningElement {
@@ -20,6 +23,7 @@
    StatusC;
    RecordTypeDeveloperNameC;
    URFContractC;
    msg;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -39,7 +43,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                this.StatusC = result.StatusC;
@@ -53,10 +56,12 @@
        })
    }
    //中止
    //合同再报价
    CustomAnew() {
        if (this.StatusC != "引合中") {
            alert("维修合同不是询价中的状态,不能再报价")
            this.msg = "维修合同不是询价中的状态,不能再报价";
            this.IsLoading = false;
            return;
        } else {
            selectMaintenanceContractEstimate({
                recordId: this.Id
@@ -72,11 +77,16 @@
                    } else {
                        window.open("/apex/SelectAssetEstimate?copyid=" + ids[0].Id, "_top");
                    }
                } else {
                    alert('请选择一个报价')
                    this.msg = '请选择一个报价';
                    this.IsLoading = false;
                    return;
                }
            })
        }
    }
    closeAction() {
        window.history.go(-1);
    }
}