From d533f39b6fa798e238810d17e928dee75d5b1af7 Mon Sep 17 00:00:00 2001
From: yumenghui <953181891@qq.com>
Date: 星期五, 11 八月 2023 16:02:17 +0800
Subject: [PATCH] 备注添加改造
---
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js b/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
index 5bd9188..e06e449 100644
--- a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
+++ b/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
@@ -33,6 +33,7 @@
urfFlag;
rtn1;
rtn;
+
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
if (currentPageReference) {
@@ -45,7 +46,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -66,32 +66,25 @@
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 涓婁紶SAP
uploadToSap() {
if (this.MCApprovalStatusC != 'Pass') {
this.ShowToastEvent("鍚堝悓澶嶆牳鎵瑰噯鍚庢墠鍙互涓婁紶SAP銆�", "error")
- // alert("鍚堝悓澶嶆牳鎵瑰噯鍚庢墠鍙互涓婁紶SAP銆�");
} else if (this.MaintenanceContractNoC == undefined) {
this.ShowToastEvent('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�', "error")
- // alert('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�');
} else if (this.uploadToSapTimeC != undefined) {
this.ShowToastEvent('宸茬粡涓婁紶SAP锛屼笉鑳介噸澶嶄笂浼犮��', "error")
- // alert('宸茬粡涓婁紶SAP锛屼笉鑳介噸澶嶄笂浼犮��');
} else {
if (this.oldIsRecognitionModelC) {
if (this.uploadToRMTimeC == undefined) {
this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓鐨勭粡閿�鍟嗘槸鍏堟瀵硅薄锛岄渶瑕佸厛銆愪笂浼犺娆惧悎鍚屻�戯紝鐒跺悗瀹屾垚璁ゆ浠ュ悗鎵嶈兘涓婁紶SAP銆�', "error")
- // alert('褰撳墠缁翠慨鍚堝悓鐨勭粡閿�鍟嗘槸鍏堟瀵硅薄锛岄渶瑕佸厛銆愪笂浼犺娆惧悎鍚屻�戯紝鐒跺悗瀹屾垚璁ゆ浠ュ悗鎵嶈兘涓婁紶SAP銆�');
return;
} else {
if (!this.IsRecognitionModelTrueC) {
this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�', "error")
- // alert('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�');
return;
}
}
@@ -101,7 +94,6 @@
}).then(result => {
if (result != '1') {
this.ShowToastEvent('涓婁紶SAP澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触', "error")
- // alert('涓婁紶SAP澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触');
}
});
updateFirstContract({
@@ -109,7 +101,6 @@
}).then(result => {
if (result != '1') {
this.ShowToastEvent(result, "error")
- // alert(result);
}
});
this.urfFlag = this.URFContractFC;
@@ -130,15 +121,12 @@
});
if (this.rtn == '1') {
this.ShowToastEvent("涓婁紶SAP鎴愬姛", "success")
- // alert("涓婁紶SAP鎴愬姛");
- window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Maintenance_Contract__c/" + this.recordId + "/view");
+ location.href = "/" + this.Id;
} else {
this.ShowToastEvent(this.rtn, "error")
- // alert(this.rtn);
}
} else {
this.ShowToastEvent(this.rtn1, "error")
- // alert(this.rtn1);
}
}
}
--
Gitblit v1.9.1