From fbd4bea7bd57b4d4a33cb9ed0ebc15d9bf6551c0 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 12 七月 2023 17:54:54 +0800
Subject: [PATCH] 近日更新按钮,页面以及apex类

---
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js |   45 +++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
index ff5d294..a4576e1 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -33,10 +33,14 @@
                 this.profileId = result.profileId.slice(0,15);
                 this.LoseButton();
                 this.dispatchEvent(new CloseActionScreenEvent());
-        })        
+        }).catch(error => {
+            console.log("error"+error);
+        }).finally(() => {
+            
+        });        
     }
 
-    //鎷涙爣椤圭洰澶卞崟
+    //澶卞崟
     LoseButton(){
         sqlResult({id: this.id}).then(result=>{
             //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
@@ -46,6 +50,7 @@
             }
             // 鍒ゆ柇鍐呴儴纭鐘舵��
             if(this.status == '01.寰呯‘璁�'|| this.status == '02.涓嶇浉鍏�'){ 
+                console.log('娌¤蛋鍚�');
                 this.showToast("鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�","error");
                 return;
             }
@@ -66,6 +71,38 @@
             variant: type
         });
         this.dispatchEvent(event);
-        this.dispatchEvent(new CloseActionScreenEvent());
     }
-}
\ No newline at end of file
+}
+
+
+// var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
+// var sqlResult = sforce.connection.query(sql);
+
+
+// //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
+// if ('{!$Profile.Id}' != '00e10000000xnp2' && '{!$Profile.Id}' != '00e10000000xnpH' && '{!$Profile.Id}' != '00e10000000Y3o5') {
+// alert("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�");
+// return;
+// }
+
+// // 鍒ゆ柇鍐呴儴纭鐘舵��
+// if({!Tender_information__c.status__c == '01.寰呯‘璁�'|| Tender_information__c.status__c == '02.涓嶇浉鍏�'}){
+// alert('鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�');
+// return;
+// }
+
+// // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
+// if({!Tender_information__c.status__c == '05.璇环涓�'|| Tender_information__c.status__c == '06.鎴愪氦' || Tender_information__c.status__c == '07.閮ㄥ垎鎴愪氦' || Tender_information__c.status__c == '08.澶卞崟'} || sqlResult.size > 0){
+// if(!confirm('姝ら」鐩凡鍏宠仈璇环锛岃纭疄鏄惁鏂板缓璇环鎻愪氦澶卞崟銆�')) {
+// return;
+// }
+// }
+
+// // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
+// //if(sqlResult.size > 0){
+// //if(!confirm('宸叉湁鍏宠仈璇环锛屾槸鍚﹀垱寤烘柊鐨勮浠枫��')) {
+// //return;
+// //}
+// //}
+
+// window.open('/apex/TenderLostPage?id={!Tender_information__c.Id}','','height=500,width=800,top=200,left=250,location=no');
\ No newline at end of file

--
Gitblit v1.9.1