黄千龙
2023-08-09 626f3c3bb25e204568019e8d568e2d7547d1037a
force-app/main/default/lwc/lexBidAnnouncementRejectButton/lexBidAnnouncementRejectButton.js
@@ -6,7 +6,7 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexBidAnnouncementRejectButton extends LightningElement {
    @api recordId;
    @api recordId;//OwnerId
    IsLoading = true;
    BidCancel = null;
@@ -36,7 +36,8 @@
                    recordId: this.recordId
                }).then(requst=>{
                    if(requst == '1'){
                        this.showToast("驳回请求成功","success");
                        this.updateRecordView();
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
                    if(requst != "1"){
                        var messageage = "";
@@ -47,19 +48,15 @@
            }
        })
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        if(type == 'success'){
            this.updateRecordView();
        }
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
}