From 7c7cb195462c2ded7bfe4105959ea36d1dd68ded Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 11 十月 2023 19:26:36 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js |   13 ++++++++++---
 1 files changed, 10 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..d84a617 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,12 +268,15 @@
             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");

--
Gitblit v1.9.1