From d77b6353ca9b59a6398df3eae9912f9fd766946d Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期六, 05 八月 2023 17:04:22 +0800
Subject: [PATCH] fix: lightning 页面确认

---
 force-app/main/default/lwc/lexReassign/lexReassign.js |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/lwc/lexReassign/lexReassign.js b/force-app/main/default/lwc/lexReassign/lexReassign.js
new file mode 100644
index 0000000..7d4e00c
--- /dev/null
+++ b/force-app/main/default/lwc/lexReassign/lexReassign.js
@@ -0,0 +1,46 @@
+import { LightningElement, track, wire, api} from 'lwc';
+import LightningConfirm from 'lightning/confirm';
+import rentalApplyEquipmentSetReassign from '@salesforce/apex/RentalApplyEquipmentSetWebService.rentalApplyEquipmentSetReassign';
+export default class lexReassign extends LightningElement {
+	@api recordId;
+	//鍙幏鍙栧綋鍓峫ist閫変腑鐨勪竴瑙圛d
+	@api rentalApplySetIds;
+    IsLoading=true;
+    //鎻愮ず淇℃伅
+    msg;
+
+	connectedCallback(){
+		console.log(this.recordId);
+		console.log(JSON.stringify(this.rentalApplySetIds));
+		// if(this.rentalApplySetIds.length<1){
+		if (this.recordId && JSON.stringify(this.rentalApplySetIds)) {
+			LightningConfirm.open({
+		        message: '浣犵‘瀹氳閲嶆柊鍒嗛厤鍚�?',
+		        variant: 'headerless',
+		        label: 'this is the aria-label value',
+	    	}).then(res=>{
+	    		if(res){
+	    			rentalApplyEquipmentSetReassign({
+	    				raesID: this.rentalApplySetIds[0]
+	    			}).then(result=>{
+	    				if(result == '1'){
+	    					this.msg = "宸查噸鏂板垎閰�";
+	    					this.closeAction();
+	    				}else{
+	    					this.msg = result;
+	    					return;
+	    				}
+	    			})
+	    		}
+	    	})
+		}else{
+			this.msg = "璇烽�夋嫨鍊熷嚭澶囧搧涓�瑙�";
+			return;
+		}
+	}
+
+	closeAction() {
+        //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+		window.open("/"+this.recordId,'_self');
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.1