From 67c32f8d0600867b73eb15902798a568f77acd4e Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 13 四月 2023 17:36:49 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexCancel/lexCancel.js |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.js b/force-app/main/default/lwc/lexCancel/lexCancel.js
index 29ffc5c..77a0e59 100644
--- a/force-app/main/default/lwc/lexCancel/lexCancel.js
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.js
@@ -2,9 +2,9 @@
  * @Description: 
  * @version: 
  * @Author: chen jing wu
- * @Date: 2023-04-07 09:02:03
+ * @Date: 2023-03-27 13:47:21
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-11 09:00:54
+ * @LastEditTime: 2023-04-11 16:44:49
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -45,13 +45,10 @@
                 this.status = result.status;
                 console.log(this.status);
                 this.cancel();
-
             }
         }).catch(error => {
             console.log("error");
             console.log(error);
-        }).finally(() => {
-            
         });
 
     }
@@ -72,30 +69,34 @@
 
     cancel () {
         if (this.status == "鍙栨秷") {
-            ShowToastEvent("宸茬粡鍙栨秷锛�","error");
+            this.showToast("宸茬粡鍙栨秷锛�","error");
             this.dispatchEvent(new CloseActionScreenEvent());
             return;
             }
         if (this.status == "鎵瑰噯") {
-            ShowToastEvent("宸茬粡鎵瑰噯锛屼笉鑳藉垹闄わ紒","error");
+            this.showToast("宸茬粡鎵瑰噯锛屼笉鑳藉垹闄わ紒","error");
             this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.status == "瀹屾瘯") {
-            ShowToastEvent("宸茬粡瀹屾瘯锛屼笉鑳藉垹闄わ紒","error");
+            this.showToast("宸茬粡瀹屾瘯锛屼笉鑳藉垹闄わ紒","error");
             this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.status == "鎻愪氦") {
-            ShowToastEvent("宸茬粡鎻愪氦锛屼笉鑳藉垹闄わ紒","error");
+            this.showToast("宸茬粡鎻愪氦锛屼笉鑳藉垹闄わ紒","error");
             this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         updateForCancelButton({
             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