From fdef1f682351a5311fe96c5f0f1770a9623b985f Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期一, 17 四月 2023 16:42:16 +0800
Subject: [PATCH] 调拨申请->受理批量更新,取消,提交待审批 按钮修改

---
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js |   34 +++++++++++++++++++++++++++++++---
 1 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
index 62dbcda..2076d74 100644
--- a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
@@ -1,3 +1,11 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-04-07 09:02:03
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-04-11 11:23:37
+ */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
@@ -10,9 +18,24 @@
     
 
 
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+            console.log(111);
+            console.log(currentPageReference);
+
+        if (currentPageReference) {
+          const urlValue = currentPageReference.state.recordId;
+          if (urlValue) {
+            let str = `${urlValue}`;
+            console.log("str");
+            console.log(str);
+            this.recordId = str;
+          }
+        }
+    }
+
     connectedCallback(){
         console.log(this.recordId);
-        this.IsLoading = false;
         this.DispatchOCSMQARA();
 
     }
@@ -35,8 +58,13 @@
             updateForDispatchOCSMQARAButton({
                 recordId: this.recordId
             }).then(result =>{
-                this.showToast("鎴愬姛","success");
-                this.updateRecordView(this.recordId);
+                if(result){
+                    this.showToast(result,"error");
+                }else{
+                    this.showToast("鎴愬姛","success");
+                    this.updateRecordView(this.recordId);
+                    this.IsLoading = false;
+                }
                 this.dispatchEvent(new CloseActionScreenEvent());
                 });
     }

--
Gitblit v1.9.1