| | |
| | | |
| | | import init from '@salesforce/apex/ISOpportunityDemand.initISOpportunityController'; |
| | | import submit from '@salesforce/apex/ISOpportunityDemand.submit'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | |
| | | export default class LexSiSubmit extends LightningElement { |
| | | @api recordId; |
| | |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | this.IsLoading = false; |
| | | // this.submit(); |
| | | init({recordId:this.recordId}) |
| | | .then(result=>{ |
| | | console.log("lexsubmit------>>>",result) |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | // if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | // return; |
| | | // } |
| | | // this.handleConfirmClick(); |
| | | LightningConfirm.open({ |
| | | message: "一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?", |
| | | variant: 'headerless', |
| | | label: '提示信息', |
| | | // setting theme would have no effect |
| | | }).then(res=>{ |
| | | if(!res) return; |
| | | if (result.checkTf !=true ) { |
| | | this.showToast('请营业担当提交审批','error') |
| | | return; |
| | |
| | | .finally(()=>{ |
| | | window.location.reload(); |
| | | }) |
| | | }) |
| | | }) |
| | | .catch(e=>{console.log(e)}) |
| | | .finally(()=>{ |
| | |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == "success"){ |
| | | const event = new ShowToastEvent({ |
| | | // title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | // title: '', |
| | | message: msg, |
| | | variant: type, |
| | | mode:'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |