From a099abe8d0ff0699296c9bcc53ca00b98d167c73 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期一, 15 四月 2024 10:42:09 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
index cd815ff..69fa193 100644
--- a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
+++ b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
@@ -5,6 +5,7 @@
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';
@@ -18,6 +19,9 @@
{label:"鎻愬墠",value:"鎻愬墠"},
{label:"寤跺悗",value:"寤跺悗"},
]
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
handleRelationFn(event){
@@ -158,14 +162,14 @@
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'
@@ -264,15 +268,19 @@
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");
+ this.IsLoading = false;
}
});
}
--
Gitblit v1.9.1