From ac49e658cf9674065476431a5deb81a93d1bc25a Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 24 五月 2023 10:45:54 +0800
Subject: [PATCH] 0524LightningConfirm框修改

---
 force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
index 814dd7b..0bb19a0 100644
--- a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
+++ b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -2,6 +2,7 @@
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
 import { NavigationMixin } from 'lightning/navigation';
+import LightningConfirm from 'lightning/confirm';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import init  from '@salesforce/apex/QISReportController.initForOCMSubmitButton';
 import updateQis  from '@salesforce/apex/QISReportController.updateQisWithOCM';
@@ -86,18 +87,23 @@
          		this.dispatchEvent(new CloseActionScreenEvent());
 				return;
          	}
-
-         	if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
-         		this.dispatchEvent(new CloseActionScreenEvent());
-				return;
-			}
-			this.updateQisSubmit();
-			if (this.isaohuiproduct == 'true') {
-				this.dispatchEvent(new CloseActionScreenEvent());
-                this.updateRecordView(this.recordId);
-			}
-			this.dispatchEvent(new CloseActionScreenEvent());
-            this.updateRecordView(this.recordId);
+                LightningConfirm.open({
+                message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
+                variant: 'headerless',
+                label: 'this is the aria-label value',
+                }).then(res=>{
+                    if(res) {
+                        this.updateQisSubmit();
+                        if (this.isaohuiproduct) {
+                            this.dispatchEvent(new CloseActionScreenEvent());
+                            this.updateRecordView(this.recordId);
+                        }
+                    }else{
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        this.updateRecordView(this.recordId);
+                        return;
+                    }                 
+                });
         }).catch(error => {
             console.log('error='+error);
         }).finally(() => {

--
Gitblit v1.9.1