| | |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel'; |
| | | import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner'; |
| | | import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner'; |
| | | export default class lexApplicationCancelSubmit extends LightningElement { |
| | | @api recordId;//OwnerId |
| | | ownerId; |
| | |
| | | this.ownerId = result.OwnerId; |
| | | this.monthlyReportId = result.Id; |
| | | this.cancelSubmit(); |
| | | }).catch(() => { |
| | | |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | //授权申请 取消提交 |
| | | cancelSubmit(){ |
| | | //'获取当前登陆人id' |
| | | UserInfo_Owner({}).then(result=>{ |
| | | userInfo_Owner({}).then(result=>{ |
| | | if(this.ownerId == result.id){ |
| | | submitCancel({ |
| | | recordId: this.recordId |
| | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |