From 74e6a383570060d05c58f731fa7cd9f241db50bd Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期四, 20 四月 2023 14:07:42 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexComplete/lexComplete.js |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/lwc/lexComplete/lexComplete.js b/force-app/main/default/lwc/lexComplete/lexComplete.js
index 11e315a..fb737d5 100644
--- a/force-app/main/default/lwc/lexComplete/lexComplete.js
+++ b/force-app/main/default/lwc/lexComplete/lexComplete.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:21:30
+ */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
@@ -35,18 +43,14 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.status = result.status;
                 this.profileId = result.profileId;
                 this.complete();
-                this.dispatchEvent(new CloseActionScreenEvent());
                 //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
             }
         }).catch(error => {
             console.log("error");
             console.log(error);
-        }).finally(() => {
-            
         });   
         //this.updateRecordView(this.recordId);
     }
@@ -69,18 +73,24 @@
     complete () {
         // 闄嗚儨锛岃儭杩畨锛岀郴缁熺鐞嗗憳浠ュ娌℃湁鏉冮檺
         if (UserInfo_Owner.Id != "00510000004reg2" && UserInfo_Owner.Id != "00510000000gWAE" && this.profileId != "00e10000000Y3o5") {
-            ShowToastEvent("浣犳病鏈夋潈闄�","error");
+            this.showToast("浣犳病鏈夋潈闄�","error");
             return;
         }
         if (this.status == "瀹屾瘯") {
-            ShowToastEvent("宸茬粡瀹屾瘯锛�","error");
+            this.showToast("宸茬粡瀹屾瘯锛�","error");
             return;
         }
         updateForCompleteButton({
             recordId: this.recordId
         }).then(result =>{
-            this.updateRecordView(this.recordId);
-            this.showToast("瀹屾瘯鎴愬姛锛�","success");
+            if(result){
+                this.showToast(result,"error");
+            }else{
+                this.updateRecordView(this.recordId);
+                this.showToast("瀹屾瘯鎴愬姛锛�","success");
+            }
+            this.IsLoading = false;
+            this.dispatchEvent(new CloseActionScreenEvent());
         });
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1