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/lexTenderingHospitalButton/lexTenderingHospitalButton.js     |   30 +-------------
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js             |   47 ++---------------------
 force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js |   30 ++-------------
 3 files changed, 11 insertions(+), 96 deletions(-)

diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
index 3c58a8d..f32c741 100644
--- a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
@@ -2,7 +2,6 @@
 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
@@ -18,37 +17,16 @@
            }
          }
      }
-    
+    //鎷涙爣椤圭洰鏌ョ湅闄勪欢
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(result => {
             this.IsLoading = false;
             this.id = result.Id;
-            this.AttachmentButton();
+            window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
             this.dispatchEvent(new CloseActionScreenEvent());
-        }).catch(error => {
-            console.log("error"+error);
-        }).finally(() => {
-            
-        });        
+        })    
     }
     
-    //鏌ョ湅闄勪欢
-    AttachmentButton(){
-        window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
-    }
-
-    showToast(msg,type) {
-        const event = new ShowToastEvent({
-            message: msg,
-            variant: type
-        });
-        this.dispatchEvent(event);
-    }
-}
-
-// var From= function(){
-//     window.open( "/apex/TenderInformationUploadPdf?id={!URLENCODE(Tender_information__c.Id)}");
-//     }
-//     From();
\ No newline at end of file
+}
\ 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
index 6999b54..46b2353 100644
--- a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
@@ -24,46 +24,22 @@
         init({
             recordId: this.recordId
         }).then(result => {
-            console.log(result)
                 this.IsLoading = false;
                 this.id = result.Id;
                 this.name = result.name;
                 this.Environment_Url = result.Environment_Url
                 this.HospitalButton();
                 this.dispatchEvent(new CloseActionScreenEvent());
-        }).catch(error => {
-            console.log("error"+error);
-        }).finally(() => {
-            
-        });        
+        })       
     }
 
-    //鏂板缓鍖婚櫌
+    //鎷涙爣椤圭洰鏂板缓鍖婚櫌
     HospitalButton(){
         var url = this.Environment_Url+'001/e?CF00N10000009I0o7='+encodeURIComponent(this.name)
         +'&CF00N10000009I0o7_lkid='+encodeURIComponent(this.id)
         +'&00N10000009HFQT='+encodeURIComponent('鎷涙爣椤圭洰')
         +'&RecordType=01210000000QemG'
         +'&retURL='+ encodeURIComponent(this.id);
-        console.log('url',url)
         window.location.href = url;
     }
-}
-
-
-// var foo = function() {
-
-//     var TenderId = '{!Tender_information__c.Id}';
-//     var Tendername = '{!Tender_information__c.Name}';
-//     var HospitalSource= '鎷涙爣椤圭洰';
-    
-//     var url = '{!$Label.Environment_Url}'+'001/e?CF00N10000009I0o7='+encodeURIComponent(Tendername)
-//     +'&CF00N10000009I0o7_lkid='+encodeURIComponent(TenderId)
-//     +'&00N10000009HFQT='+encodeURIComponent(HospitalSource)
-    
-//     +'&RecordType=01210000000QemG'
-//     +'&retURL='+ encodeURIComponent(TenderId);
-//     window.top.location.href = url;
-    
-//     }
-//     foo();
\ No newline at end of file
+}
\ 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
index a4576e1..f51a816 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -6,7 +6,6 @@
 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;
@@ -28,21 +27,16 @@
             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(error => {
-            console.log("error"+error);
-        }).finally(() => {
-            
-        });        
+        })        
     }
 
-    //澶卞崟
+    //鎷涙爣椤圭洰澶卞崟
     LoseButton(){
-        sqlResult({id: this.id}).then(result=>{
+        sqlResult({id: this.recordId}).then(result=>{
             //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
             if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
                 this.showToast("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�","error");
@@ -62,7 +56,7 @@
                     return;
                 }
             }
-            window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
+            window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
         })
     }
     showToast(msg,type) {
@@ -73,36 +67,3 @@
         this.dispatchEvent(event);
     }
 }
-
-
-// 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