unknown
2023-05-29 cbe8a54c8dc4bdf132df6003682d5bef85af5fe6
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -4,6 +4,7 @@
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import  sqlResult  from '@salesforce/apex/TenderingButtonController.sqlResult';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import LightningConfirm from 'lightning/confirm';
export default class lexTenderingLostButton extends LightningElement {
    @api recordId;//当前这条数据的id
    status;//状态
@@ -55,13 +56,19 @@
            }
            // 判断是否需要新建询价
            if(this.status == '05.询价中'|| this.status == '06.成交' || this.status == '07.部分成交' || this.status == '08.失单' || result.length > 0){
                if(confirm('此项目已关联询价,请确实是否新建询价提交失单。')) {
                LightningConfirm.open({
                    message: '此项目已关联询价,请确实是否新建询价提交失单。',
                    variant: 'headerless',
                    label: 'this is the aria-label value',
                    }).then(res=>{
                        if(res) {
                            window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
                }else{
                            this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
                    });
            }
            window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
        })
    }
    showToast(msg,type) {