zz
2023-05-31 b551d133c0b97297902564d3cdbd17bd0b0ad79d
force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
@@ -25,19 +25,18 @@
        init({
            recordId: this.recordId
        }).then(result => {
            if (result != null) {
                this.IsLoading = false;
                this.id = result.Id;
                this.isRelateProject = result.isRelateProject;
                this.EnquiryButton();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
            console.log(result);
            this.IsLoading = false;
            this.id = result.Id;
            this.isRelateProject = result.isRelateProject;
            this.EnquiryButton();
        })     
    }
    //招标项目 反应询价状态
    EnquiryButton(){
        if(this.isRelateProject == "否"){
            this.showToast('招投标项目不相关后不能反应询价状态!','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        var listss = [];
@@ -45,18 +44,20 @@
        updateOpportunityInformation({TenderIdList : listss}).then(result=>{
            if(result != 'OK'){
                this.showToast(result,'error');
                this.dispatchEvent(new CloseActionScreenEvent());
            }else {
                this.showToast('反映完了','success');
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        })
    }
    showToast(msg,type) {
        console.log(msg,type);
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}