| | |
| | | import SystemModstamp from '@salesforce/schema/Account.SystemModstamp'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | import lexDateCss from '@salesforce/resourceUrl/lexDateCss'; |
| | |
| | | {label:"提前",value:"提前"}, |
| | | {label:"延后",value:"延后"}, |
| | | ] |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | handleRelationFn(event){ |
| | | |
| | |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | title: '', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | |
| | | SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{ |
| | | if (response == '成功') { |
| | | this.OnLoading(false); |
| | | this.showToast("保存成功","success"); |
| | | this.showToast("保存成功","success"); |
| | | // window.location.hash = "Refresh"+"=="+this.oppId; |
| | | const closeEvent = new CustomEvent('closeaction', { |
| | | bubbles: true, // 允许事件冒泡至父组件 |
| | | composed: true, // 允许事件穿越 Shadow DOM 界限 |
| | | }); |
| | | setTimeout(() => { |
| | | window.location = '/' + this.recordId; |
| | | }, 2000); |
| | | this.dispatchEvent(closeEvent); |
| | | }else{ |
| | | this.showToast(response,"error"); |