From df4601a9026b57f78c0b1b6619e366525d13f9fc Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 19:26:35 +0800
Subject: [PATCH] 123
---
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