From 5adc17e982b1a460952eae05f5547e6d43245de7 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期二, 20 六月 2023 17:43:06 +0800
Subject: [PATCH] 附属品追加和选择
---
force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js b/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
index 1ac6018..5f363ea 100644
--- a/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
+++ b/force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
@@ -11,35 +11,36 @@
export default class LexAccessory_Add extends LightningElement {
@api recordId;
IsLoading = true;
+ @api rentalApplyEquipmentSetDetailIds;
+ msg;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
+ console.log(111);
+ console.log(currentPageReference);
if (currentPageReference) {
const urlValue = currentPageReference.state.recordId;
if (urlValue) {
let str = `${urlValue}`;
this.recordId = str;
+ this.connectedCallback();
}
}
}
connectedCallback(){
this.IsLoading = false;
- if (this.recordId.length == 0) {
- this.ShowToastEvent("璇烽�夋嫨涓�涓�熷嚭澶囧搧閰嶅涓�瑙堟槑缁嗕俊鎭�", "warning");
+ if (this.rentalApplyEquipmentSetDetailIds == undefined || this.rentalApplyEquipmentSetDetailIds.length == 0) {
+ this.msg = "璇烽�夋嫨涓�涓�熷嚭澶囧搧閰嶅涓�瑙堟槑缁嗕俊鎭�";
+ return;
} else {
- window.open("/apex/AccessoryAdd?recid=" + this.recordId, "_top");
+ window.open("/apex/AccessoryAdd?recid=" + this.rentalApplyEquipmentSetDetailIds, "_top");
+ this.closeAction();
}
}
- //寮规
- ShowToastEvent(msg,type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
+ closeAction() {
+ //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+ window.open("/"+this.recordId,'_self');
}
-
-}
+}
\ No newline at end of file
--
Gitblit v1.9.1