| | |
| | | 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; |
| | | |
| | |
| | | recordId: this.recordId |
| | | }).then(requst=>{ |
| | | if(requst == '1'){ |
| | | this.showToast("驳回请求成功","success"); |
| | | this.updateRecordView(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | if(requst != "1"){ |
| | | var messageage = ""; |
| | |
| | | } |
| | | }) |
| | | } |
| | | 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 }}); |
| | | } |
| | | |
| | | } |