From af7f2ebba1ca53c05ad1c47361c889afd53a9765 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期四, 10 八月 2023 17:26:26 +0800
Subject: [PATCH] 耗材备品
---
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
index a29af3b..d37c2db 100644
--- a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
+++ b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -36,7 +36,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -47,7 +46,6 @@
this.RepairC = result.RepairC;
this.DiscountRequest();
- this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(error => {
console.log(error);
@@ -61,14 +59,15 @@
}).then(repairs => {
if (repairs != null && repairs.length > 0) {
var rp = repairs[0];
- if (rp.Return_Without_Repair_IF__c == 'true') {
+ console.log(rp);
+ if (rp.Return_Without_Repair_IF__c == true) {
this.ShowToastEvent("鏈慨鐞嗗綊杩樼殑淇悊涓嶅厑璁稿噺浠风敵璇�", "error");
- // alert("鏈慨鐞嗗綊杩樼殑淇悊涓嶅厑璁稿噺浠风敵璇�");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
} else {
- if (rp.Return_Without_Repair__c == 'true') {
+ if (rp.Return_Without_Repair__c == true) {
this.ShowToastEvent("宸茬粡鐢宠鏈慨鐞嗚繑鍥烇紝濡傛灉闇�瑕佺户缁慨鐞嗚鍙栨秷\"鏈慨鐞嗗綊杩樼敵璇穃"鐨勫嬀閫夊悗鍐嶈繘琛屽噺浠风敵璇锋搷浣�", "error");
- // alert("宸茬粡鐢宠鏈慨鐞嗚繑鍥烇紝濡傛灉闇�瑕佺户缁慨鐞嗚鍙栨秷\"鏈慨鐞嗗綊杩樼敵璇穃"鐨勫嬀閫夊悗鍐嶈繘琛屽噺浠风敵璇锋搷浣�");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
}
@@ -79,7 +78,8 @@
console.log(result);
if (result.length > 0) {
var split = result.split(", ");
- alert(split[1]);
+ this.ShowToastEvent(split[1], "error");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
})
@@ -89,11 +89,11 @@
console.log(result);
if (result.length > 0) {
var split = result.split(", ");
- alert(split[1]);
+ this.ShowToastEvent(split[1], "error");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
})
- location.reload();
})
}
--
Gitblit v1.9.1