From d29f75b84fccd06917fb8e2c2ee70e9d76f868cd Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 20:15:54 +0800
Subject: [PATCH] 123
---
force-app/main/default/lwc/lexStockApply/lexStockApply.js | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/lwc/lexStockApply/lexStockApply.js b/force-app/main/default/lwc/lexStockApply/lexStockApply.js
index 03e63f8..bb00fec 100644
--- a/force-app/main/default/lwc/lexStockApply/lexStockApply.js
+++ b/force-app/main/default/lwc/lexStockApply/lexStockApply.js
@@ -2,9 +2,17 @@
* @Description:
* @version:
* @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-10-11 17:59:10
+ */
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
* @Date: 2023-04-14 13:04:53
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-24 16:45:55
+ * @LastEditTime: 2023-10-10 17:41:57
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,6 +25,8 @@
import connection from '@salesforce/resourceUrl/connection20';
import submitProcess from '@salesforce/apex/OpportunityLightingButtonController.submitProcess';
import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexStockApply extends LightningElement {
@api recordId;
stockApplyStatus;
@@ -101,6 +111,9 @@
}
}
connectedCallback(){
+ Promise.all([
+ loadStyle(this, lwcCSS)
+ ]);
init({
recordId: this.recordId
}).then(result=>{
@@ -125,15 +138,25 @@
}
this.handleConfirmClick("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵");
}
+
showToast(msg,type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
- this.dispatchEvent(new CloseActionScreenEvent);
- }
+ 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());
+ }
+ }
updateRecordView(recordId) {
updateRecord({fields: { Id: recordId }});
}
--
Gitblit v1.9.1