From 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 14:54:59 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js b/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
index 1ac6018..5f363ea 100644
--- a/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
+++ b/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
@@ -11,35 +11,36 @@
 export default class LexAccessory_Add extends LightningElement {
     @api recordId;
     IsLoading = true;
+    @api rentalApplyEquipmentSetDetailIds;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
+        console.log(111);
+        console.log(currentPageReference);
         if (currentPageReference) {
             const urlValue = currentPageReference.state.recordId;
             if (urlValue) {
                 let str = `${urlValue}`;
                 this.recordId = str;
+                this.connectedCallback();
             }
         }
     }
 
     connectedCallback(){
         this.IsLoading = false;
-        if (this.recordId.length == 0) {
-            this.ShowToastEvent("璇烽�夋嫨涓�涓�熷嚭澶囧搧閰嶅涓�瑙堟槑缁嗕俊鎭�", "warning");
+        if (this.rentalApplyEquipmentSetDetailIds == undefined || this.rentalApplyEquipmentSetDetailIds.length == 0) {
+            this.msg =  "璇烽�夋嫨涓�涓�熷嚭澶囧搧閰嶅涓�瑙堟槑缁嗕俊鎭�";
+            return;
         } else {
-            window.open("/apex/AccessoryAdd?recid=" + this.recordId, "_top");
+            window.open("/apex/AccessoryAdd?recid=" + this.rentalApplyEquipmentSetDetailIds, "_top");
+            this.closeAction();
         }
      }
 
-     //寮规
-    ShowToastEvent(msg,type) {
-        const event = new ShowToastEvent({
-            title: '',
-            message: msg,
-            variant: type
-        });
-        this.dispatchEvent(event);
+     closeAction() {
+        //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+		window.open("/"+this.recordId,'_self');
     }
-
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1