From 5f16ffd9a4cb1cf8658d37dfa96b1c831b5b8af7 Mon Sep 17 00:00:00 2001
From: zz <1842059105@qq.com>
Date: 星期三, 10 五月 2023 17:34:06 +0800
Subject: [PATCH] 招标项目 失单 新建医院 附件查看 修改

---
 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