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/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
index 9bb6831..983dcf7 100644
--- a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -5,7 +5,7 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
-import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
+import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
export default class lexApplicationCancelSubmit extends LightningElement {
@api recordId;//OwnerId
ownerId;
@@ -31,16 +31,12 @@
this.ownerId = result.OwnerId;
this.monthlyReportId = result.Id;
this.cancelSubmit();
- }).catch(() => {
-
- }).finally(() => {
-
- });
+ })
}
//鎺堟潈鐢宠 鍙栨秷鎻愪氦
cancelSubmit(){
//'鑾峰彇褰撳墠鐧婚檰浜篿d'
- UserInfo_Owner({}).then(result=>{
+ userInfo_Owner({}).then(result=>{
if(this.ownerId == result.id){
submitCancel({
recordId: this.recordId
@@ -65,14 +61,21 @@
}
showToast(msg,type) {
- const event = new ShowToastEvent({
- message: msg,
- variant: type
- });
if(type == 'success'){
- this.updateRecordView();
- }
- this.dispatchEvent(event);
- this.dispatchEvent(new CloseActionScreenEvent());
+ 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());
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1