From 7c7cb195462c2ded7bfe4105959ea36d1dd68ded Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 11 十月 2023 19:26:36 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/lwc/lexLoseReport/lexLoseReport.js |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
index 270d206..3caec8e 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
+++ b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-20 14:08:55
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-25 13:21:17
+ * @LastEditTime: 2023-10-10 17:35:29
  */
 /*
  * @Description: 
@@ -70,6 +70,11 @@
             this.salesOwnerBuchang = result.salesOwnerBuchang;
             this.salesOwnerBuchangID = result.salesOwnerBuchangID;
             this.cntLostCancelDraft = result.cntLostCancelDraft;
+            if(!result.isHavePower){
+                this.showToast('鎮ㄤ笉鑳藉垱寤哄け鍗�/閮ㄥ垎澶卞崟鎶ュ憡锛�','error');
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
             this.loseReport();
         })
     }
@@ -91,7 +96,7 @@
         //alert("鍏宠仈鎷涙姇鏍囬」鐩殑璇环锛屽彧鑳藉湪鏈夌粨鏋滃悗鍋氬け鍗曟姤鍛婏紒");
         //}
         else {
-            var url = '/apex/PCLLostReportPageLwc?pageStatus=Create&oppId=' + this.recordId + '&lostType=澶卞崟';
+            var url = '/lightning/n/PCLLostReportPageLwc#pageStatus=Create&oppId=' + this.recordId + '&lostType=澶卞崟';
             location.href = url;
             // location.href = '/a1U/e?retURL=%2F' + this.recordId +
             // '&RecordType=01210000000R4hM' +
@@ -108,13 +113,22 @@
         this.dispatchEvent(new CloseActionScreenEvent());
     }
     showToast(msg,type) {
-        const event = new ShowToastEvent({
-            title: ' ',
-            message: msg,
-            variant: type,
-            duration: 15000
-        });
-        this.dispatchEvent(event);
+        if(type == 'success'){
+            const event = new ShowToastEvent({
+                message: msg,
+                variant: type,
+            });
+            this.dispatchEvent(event);
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }else{
+            const event = new ShowToastEvent({
+                message: msg,
+                variant: type,
+                mode: 'sticky'
+            });
+            this.dispatchEvent(event);
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }   
     }
     //鏄剧ず淇℃伅
     showMyToast(title, message, variant) {

--
Gitblit v1.9.1