From 993c5170391cfd6719f89c9b83bc17ab5e787035 Mon Sep 17 00:00:00 2001
From: zz <1842059105@qq.com>
Date: 星期五, 07 四月 2023 16:37:37 +0800
Subject: [PATCH] 招标项目 失单 新建医院 查看附件提交

---
 force-app/main/default/classes/TenderingButtonController.cls-meta.xml                            |    5 
 force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js              |   20 ---
 force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html            |    5 
 force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js              |   46 +++++++
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js                      |   72 ++++++++++++
 force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js          |   49 ++++++++
 force-app/main/default/classes/TenderingButtonController.cls                                     |   51 ++++++++
 force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml |   11 +
 force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js              |   16 -
 force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml     |   11 +
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html                    |    5 
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml             |   11 +
 force-app/main/default/classes/ApplicationButtonController.cls                                   |   22 ---
 force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html        |    5 
 14 files changed, 281 insertions(+), 48 deletions(-)

diff --git a/force-app/main/default/classes/ApplicationButtonController.cls b/force-app/main/default/classes/ApplicationButtonController.cls
index bf47671..ad88920 100644
--- a/force-app/main/default/classes/ApplicationButtonController.cls
+++ b/force-app/main/default/classes/ApplicationButtonController.cls
@@ -3,7 +3,6 @@
     public static InitData initSubmitButton (String recordId){
         InitData res = new initData();
         try{
-            // Request_tedner_doc__c report = [SELECT 	OwnerId,Id,Product_discription__c,Status__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
             Request_tedner_doc__c report = [SELECT 	OwnerId,Id FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
             res.OwnerId = report.OwnerId;
             res.Id = report.Id;
@@ -18,10 +17,9 @@
     @AuraEnabled
     public static String submit(String recordId) {
        try {
-        // Request_tedner_doc__c rac = [SELECT 	Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c,Request_target__c,Document_format__c,Bid_distributor__c,Product_discription__c,Tedner_date__c,Tender_active_day__c,tender_inactive_date__c,Tender_request_reason__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
         Request_tedner_doc__c rac = [SELECT 	Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
         rac.Status__c = LightingButtonConstant.STATUS_Application_Submitted;
-        rac.RecordTypeId = '01210000000RNXn';
+        rac.RecordTypeId = rac.RecordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_Application + LightingButtonConstant.STATUS_Application_Submitted).getRecordTypeId();
         rac.Submit_check_flag__c = true;
         rac.Submit_time__c = Datetime.now();
         update rac;
@@ -29,7 +27,6 @@
        } catch (Exception ex) {
         System.debug(LoggingLevel.INFO, '*** xu: ' + ex);
         return ex.getMessage();
-        // return ex.getMessage().split(',')[1];
        } finally {
 
        }
@@ -59,13 +56,10 @@
     public static UserResult UserInfo_Owner() {
         UserResult result = new UserResult();
         ID myUserID = UserInfo.getUserId();
-        
         try { 
-            User tempUser =
-                [select id from user where id = : myUserID ];
+            User tempUser = [select id from user where id = : myUserID ];
             result.id = tempUser.id;
         } catch (exception e) {
-            
             result.result = e.getMessage();
         }
         return result;
@@ -85,15 +79,5 @@
         }
         @AuraEnabled
         public string id;
-        //20210105 CHAN-BWX3YU you end
     }
-}
-
-    // if("{!Request_tedner_doc__c.OwnerId}" == "{!$User.Id}") {
-    //     var rac = new sforce.SObject("Request_tedner_doc__c");
-    //     rac.Id = "{!Request_tedner_doc__c.Id}";
-    //     rac.Status__c = "宸叉彁浜�";
-    //     rac.Submit_check_flag__c = "true";
-    //     rac.RecordTypeId = "01210000000RNXn";
-    //     var serverTimestamp = sforce.connection.getServerTimestamp();
-    //     rac.Submit_time__c = serverTimestamp.timestamp;
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
new file mode 100644
index 0000000..26eb6dd
--- /dev/null
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -0,0 +1,51 @@
+public class TenderingButtonController {
+    @AuraEnabled
+    public static InitData initTenderingController(String recordId) {
+        InitData res = new initData();
+        try{
+            Tender_information__c report = [SELECT 	OpportunityNum__c,OwnerId,Id,status__c,Name,IsRelateProject__c FROM Tender_information__c WHERE Id = :recordId LIMIT 1];
+            res.OwnerId = report.OwnerId;
+            res.Id = report.Id;
+            res.status = report.status__c;
+            res.name = report.Name;
+            res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+            res.isRelateProject = report.IsRelateProject__c;
+            res.profileId = UserInfo.getProfileId();
+            System.debug(LoggingLevel.INFO, '*** xu: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** xu: ' + e);
+        }
+        return res;
+    }
+
+    // 鎷涙爣椤圭洰澶卞崟 TenderOpportunityLink
+    // 璋冪敤璇ユ帴鍙ar sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
+    @AuraEnabled
+    public static List<Tender_Opportunity_Link__c> sqlResult (String id) {
+        try { 
+            List<Tender_Opportunity_Link__c> TenderOpportunityLink = [SELECT id FROM Tender_Opportunity_Link__c WHERE Tender_information__c = :id];
+            System.debug(LoggingLevel.INFO, '*** xu1: ' + TenderOpportunityLink);
+            return TenderOpportunityLink;
+        } catch (exception e) {
+            System.debug(LoggingLevel.INFO, '*** xu1111111: ' + e);
+            throw new AuraHandledException(e.getMessage());
+        }
+    }
+
+    public class InitData{
+        @AuraEnabled
+        public String Id;
+        @AuraEnabled
+        public String OwnerId;
+        @AuraEnabled
+        public String status;
+        @AuraEnabled
+        public String name;
+        @AuraEnabled
+        public String opportunityNum;
+        @AuraEnabled
+        public String isRelateProject;
+        @AuraEnabled
+        public String profileId;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/TenderingButtonController.cls-meta.xml b/force-app/main/default/classes/TenderingButtonController.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/TenderingButtonController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>56.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
index c75f6c5..9bb6831 100644
--- a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -1,13 +1,12 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
 import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
 import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
-export default class Submit extends LightningElement {
+export default class lexApplicationCancelSubmit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;
     monthlyReportId;
@@ -19,33 +18,29 @@
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
              let str = `${urlValue}`;
-             console.log("str:"+str);
              this.recordId = str;
            }
          }
      }
     
-
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
-            if (result != null) {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
                 this.monthlyReportId = result.Id;
                 this.cancelSubmit();
-            }
-        }).catch(error => {
-            console.log("error"+error);
+        }).catch(() => {
+
         }).finally(() => {
             
         });        
     }
-
+    //鎺堟潈鐢宠 鍙栨秷鎻愪氦
     cancelSubmit(){
+        //'鑾峰彇褰撳墠鐧婚檰浜篿d'
         UserInfo_Owner({}).then(result=>{
-            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
             if(this.ownerId == result.id){
                 submitCancel({
                     recordId: this.recordId
@@ -64,7 +59,6 @@
             }
         })
     }
-
 
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
diff --git a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
index ae57fdf..6a76d14 100644
--- a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
@@ -1,13 +1,12 @@
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
 import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
 import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
 import submit  from '@salesforce/apex/ApplicationButtonController.submit';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-export default class Submit extends LightningElement {
+export default class lexApplicationSubmitButton extends LightningElement {
     @api recordId;//OwnerId
     ownerId;//鎵�鏈変汉id
     id;//杩斿洖鍊肩殑id
@@ -16,33 +15,27 @@
 
     @wire(CurrentPageReference)
      getStateParameters(currentPageReference) {
-        console.log(currentPageReference,'666666666666');
          if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
              let str = `${urlValue}`;
-             console.log("str:"+str);
              this.recordId = str;
            }
          }
      }
     
-
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
-            console.log(result,"璇锋眰鎴愬姛浜嗗悧")
             if (result != null) {
                 this.IsLoading = false;
                 this.ownerId = result.OwnerId;
                 this.id = result.Id;
                 this.Submit();
             }
-        }).catch(error => {
-            console.log("error"+error);
+        }).catch(() => {
         }).finally(() => {
-            
         });        
     }
 
@@ -50,7 +43,6 @@
         this.arrMessage = [];
         //鑾峰彇鑾峰彇褰撳墠鐧婚檰浜�
         UserInfo_Owner({}).then(result=>{
-            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
             if(this.ownerId == result.id){
                 submit({
                     recordId: this.recordId
@@ -66,11 +58,6 @@
                             }
                             messageage += this.arrMessage[i+1];
                         }
-                        // if(requst.split(',')[1].slice(-1) == '寮�'){
-                        //     messageage = requst.split(',')[1] + "," + requst.split(',')[2] + "," +  requst.split(',')[3] + "," +  requst.split(',')[4] + "," +  requst.split(',')[5] + "," + requst.split(',')[6];
-                        // }else{
-                        //     messageage = requst.split(',')[1];
-                        // }
                         this.showToast(messageage,"error");
                     }
                 })
@@ -80,19 +67,16 @@
         })
     }
 
-
     updateRecordView() {
         updateRecord({fields: { Id: this.recordId }});
     }
 
     showToast(msg,type) {
-        console.log(msg,type);
         const event = new ShowToastEvent({
             message: msg,
             variant: type
         });
         this.dispatchEvent(event);
-        console.log('璧板埌杩欓噷浜嗗悧');
         if(type == 'success'){
             this.updateRecordView();
         }
diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html
new file mode 100644
index 0000000..edb0a0d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="AttachmentButton" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
new file mode 100644
index 0000000..81c44a0
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
@@ -0,0 +1,49 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexTenderingAttachmentButton extends LightningElement {
+    @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+    id;//杩斿洖鍊肩殑id  Tender_information__c鎷涙爣椤圭洰鐨刬d
+    IsLoading = true;
+
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             this.recordId = str;
+           }
+         }
+     }
+    
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.id = result.Id;
+            this.AttachmentButton();
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }).catch(() => {
+
+        }).finally(() => {
+            
+        });        
+    }
+    
+    //鏌ョ湅闄勪欢
+    AttachmentButton(){
+        window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+	<apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html
new file mode 100644
index 0000000..dc43ef6
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="HospitalButton" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
new file mode 100644
index 0000000..37f9f44
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
@@ -0,0 +1,46 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
+export default class lexTenderingHospitalButton extends LightningElement {
+    @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+    id;//杩斿洖鍊肩殑id  Tender_information__c鎷涙爣椤圭洰鐨刬d
+    name;//鎷涙爣椤圭洰鍚�
+    IsLoading = true;
+
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             this.recordId = str;
+           }
+         }
+     }
+    
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result => {
+                this.IsLoading = false;
+                this.id = result.Id;
+                this.name = result.name;
+                this.HospitalButton();
+                this.dispatchEvent(new CloseActionScreenEvent());
+        }).catch(() => {
+        }).finally(() => {
+            
+        });        
+    }
+
+    //鏂板缓鍖婚櫌
+    HospitalButton(){
+        var url = 'https://ocsm.my.salesforce.com/?ec=302&startURL=%2F'+'001/e?CF00N10000009I0o7='+encodeURIComponent(this.name)
+        +'&CF00N10000009I0o7_lkid='+encodeURIComponent(this.id)
+        +'&00N10000009HFQT='+encodeURIComponent('鎷涙爣椤圭洰')
+        +'&RecordType=01210000000QemG'
+        +'&retURL='+ encodeURIComponent(this.id);
+        window.location.href = url;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+	<apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
new file mode 100644
index 0000000..e94a2ef
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="LostButton" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
new file mode 100644
index 0000000..cb7beef
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -0,0 +1,72 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
+import  sqlResult  from '@salesforce/apex/TenderingButtonController.sqlResult';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexTenderingLostButton extends LightningElement {
+    @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+    id;//杩斿洖鍊肩殑id  Tender_information__c鎷涙爣椤圭洰鐨刬d
+    status;//鐘舵��
+    profileId;//profileId id
+    IsLoading = true;
+
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             this.recordId = str;
+           }
+         }
+     }
+    
+
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result => {
+                this.IsLoading = false;
+                this.id = result.Id;
+                this.status = result.status;
+                this.profileId = result.profileId.slice(0,15);
+                this.LoseButton();
+                this.dispatchEvent(new CloseActionScreenEvent());
+        }).catch(() => {
+        }).finally(() => {
+        });        
+    }
+
+    //澶卞崟
+    LoseButton(){
+        sqlResult({id: this.id}).then(result=>{
+            //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
+            if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
+                this.showToast("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�","error");
+                return;
+            }
+            // 鍒ゆ柇鍐呴儴纭鐘舵��
+            if(this.status == '01.寰呯‘璁�'|| this.status == '02.涓嶇浉鍏�'){ 
+                this.showToast("鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�","error");
+                return;
+            }
+            // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
+            if(this.status == '05.璇环涓�'|| this.status == '06.鎴愪氦' || this.status == '07.閮ㄥ垎鎴愪氦' || this.status == '08.澶卞崟' || result.length > 0){
+                if(confirm('姝ら」鐩凡鍏宠仈璇环锛岃纭疄鏄惁鏂板缓璇环鎻愪氦澶卞崟銆�')) {
+                    
+                }else{
+                    return;
+                }
+            }
+            window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
+        })
+    }
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+	<apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file

--
Gitblit v1.9.1