From 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 14:54:59 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js b/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
index 3bbe3fc..94315cd 100644
--- a/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
+++ b/force-app/main/default/lwc/lexBidAnnouncementApplyForButton/lexBidAnnouncementApplyForButton.js
@@ -5,8 +5,9 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexBidAnnouncementApplyForButton extends LightningElement {
- @api recordId;//
+ @api recordId;//OwnerId
IsLoading = true;
+ arrMessage = [];
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -27,16 +28,24 @@
ApplyFor(){
ApplyFor({recordId:this.recordId}).then(res=>{
if(res == '1'){
- this.showToast('璇锋眰鐢宠鎴愬姛,鐢宠涓�傘�傘��','success');
this.updateRecordView();
+ this.dispatchEvent(new CloseActionScreenEvent());
}else{
var messageage = "";
- messageage = res.split(',')[1];
+ if(res.split(',')[1].slice(-2) == '[]'){
+ messageage = res.split(',')[1].slice(0,-4);
+ }else{
+ messageage = res;
+ }
this.showToast(messageage,'error');
}
})
}
-
+
+ updateRecordView() {
+ updateRecord({fields: { Id: this.recordId }});
+ }
+
showToast(msg,type) {
const event = new ShowToastEvent({
message: msg,
@@ -45,9 +54,4 @@
this.dispatchEvent(event);
this.dispatchEvent(new CloseActionScreenEvent());
}
-
- updateRecordView() {
- updateRecord({fields: { Id: this.recordId }});
- }
-
-}
\ No newline at end of file
+}
--
Gitblit v1.9.1