From 5c79ed09628411b95f443ece77e63277e9752172 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 19 四月 2024 18:34:29 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js b/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
index 6809eb6..5136f38 100644
--- a/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
+++ b/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-06-21 10:42:48
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-21 10:55:05
+ * @LastEditTime: 2023-10-10 17:44:41
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -13,16 +13,31 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import LightningConfirm from 'lightning/confirm';
import updateOpportunity from '@salesforce/apex/OCMManagementProvinceWebService.updateOpportunity';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexUpdateToOpp extends LightningElement {
showToast(msg,type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
+ if(type == 'success'){
+ 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());
+ }
}
connectedCallback(){
+ Promise.all([
+ loadStyle(this, lwcCSS)
+ ]);
this.handleConfirmClick('鏄惁灏哋CSM绠$悊鐪佺殑鎷呭綋鑰呬俊鎭弽鏄犲埌鍏宠仈璇环锛�');
}
async handleConfirmClick(msg) {
--
Gitblit v1.9.1