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/lexRCSubmit/lexRCSubmit.js |   49 +++++++++++++++++++++++++++++++++++--------------
 1 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
index 24708a5..3fa50fa 100644
--- a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
+++ b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.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.initForRCSubmitButton';
 import updateQis  from '@salesforce/apex/QISReportController.updateQisWithRC';
@@ -62,6 +63,7 @@
                 this.dispatchEvent(new CloseActionScreenEvent());
          		return;
          	}
+            console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null  && this.RCproblemnotfound));
          	if (this.CancelQISReason!=null) {
          		if (this.qisStatus == 'RC妫�娴嬬敵璇�') {
                     const evt = new ShowToastEvent({
@@ -93,6 +95,7 @@
                     this.dispatchEvent(new CloseActionScreenEvent());
 					return;
          		}
+
          		if (this.QISReplyDay!=null  && this.RCproblemnotfound) {
                     const evt = new ShowToastEvent({
                         title : '鏈�缁堝垽瀹氭椂锛岃鍙栨秷[鏁呴殰鏈彂鐜扮暀涓嬬户缁瀵焆骞堕�夋嫨[瀵瑰簲鏂规硶]',
@@ -103,23 +106,41 @@
                     this.dispatchEvent(new CloseActionScreenEvent());
 					return;
          		}
-         		if (confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
-         			this.type = '1';
-				}else{
-                    this.dispatchEvent(new CloseActionScreenEvent());
-                    return;
-                }
+                LightningConfirm.open({
+                message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
+                variant: 'headerless',
+                label: 'this is the aria-label value',
+                }).then(res=>{
+                    if(res) {
+                        this.type = '1';
+                        console.log('this.type='+this.type);
+                        this.updateQisSubmit();
+                    }else{
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+                    }
+                    
+                });
          	}else{
-         		if (confirm("涓�鏃︽彁浜ゅ叧闂璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
-					this.type = '2';
-				}else{
-                    this.dispatchEvent(new CloseActionScreenEvent());
-                    return;
-                }
+                LightningConfirm.open({
+                message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
+                variant: 'headerless',
+                label: 'this is the aria-label value',
+                }).then(res=>{
+                    if(res) {
+                        this.type = '2';
+                        console.log('this.type='+this.type);
+                        this.updateQisSubmit();
+                    }else{
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+                    }
+                    
+                });
          	}
-         	console.log('this.type='+this.type);
+         	
          	// this.dispatchEvent(new CloseActionScreenEvent());
-         	this.updateQisSubmit();
+         	
         }).catch(error => {
             console.log('error='+error);
         }).finally(() => {

--
Gitblit v1.9.1