From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
index 30da2db..8f2dd4a 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-12 14:51:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-19 09:11:02
+ * @LastEditTime: 2023-05-11 13:46:32
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -37,6 +37,11 @@
     isCorrosion;
     profileId;
     ifAuthorizingLock;
+    systemProfileId;
+    j3ProfileId;
+    s61ProfileId;
+    s62ProfileId;
+    m4ProfileId;
     IsLoading = true;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -76,6 +81,11 @@
             this.isCorrosion = result.isCorrosion;
             this.profileId = result.profileId;
             this.ifAuthorizingLock = result.ifAuthorizingLock;
+            this.systemProfileId = result.systemProfileId;
+            this.j3ProfileId = result.j3ProfileId;
+            this.s61ProfileId = result.s61ProfileId;
+            this.s62ProfileId = result.s62ProfileId;
+            this.m4ProfileId = result.m4ProfileId;
             this.AgencyAuthorize();
         })
     }
@@ -89,9 +99,10 @@
         var oppid = this.recordId;
         var angency = this.agency1Id;
         var profileId = this.profileId;
-        
-        if (profileId != '00e10000000Y3o5' && profileId != '00e10000000Nab7' && profileId != '00e10000000xnpR' && profileId != '00e10000000xyK6' && profileId != '00e10000000NbCE'
-        && profileId != '00e10000000xyK6' && profileId != '00e10000000Nb7i') {
+         //娴嬭瘯宸查攣瀹氭巿鏉冨悎鍚岀敵璇蜂负鈥�1鈥�
+        this.estimationId = 'test';
+        this.detailNum = 1;
+        if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) {
             this.showToast("鎮ㄦ病鏈夋巿鏉冪敵璇风殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��","error");
             return;
         }
@@ -108,9 +119,10 @@
             this.showToast("鑰楁潗涓嶅彲涓庡ゥ杈変骇鍝佸悓鏃跺瓨鍦紒","error");
             return;
         } else if (this.cntLostCancelDraft > 0) {
-        if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
-            return ;
-        }
+            if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return ;
+            }     
         } else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
             this.showToast('璇环鏈夊凡鎻愪氦鐨勫彇娑�/澶卞崟鎶ュ憡銆�',"error");
             return;
@@ -123,16 +135,11 @@
         } else if (this.salesRoot != '璨╁2搴�') {
             this.showToast('鍖婚櫌鐩撮攢涓嶉渶瑕佹巿鏉冪敵璇枫��',"error");
             return;
-        }
-        // else if ('{!Opportunity.AcecideCntCheck__c}' != '1') {
-        // alert('闃胯タ璧涘璇环鍙兘鍖呭惈鍗卞寲鍝侊紝鎴栬�咃紝鏅�氳浠蜂笉鑳藉寘鍚嵄鍖栧搧銆�');
-        // return;
-        // }
-        else if (this.ifSubmit == '1') {
+        }else if (this.ifSubmit == '1') {
             this.showToast('涓婁紶澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�!',"error");
             return;
         }
-        if (this.ifAuthorizingLock == 'true') {
+        if (this.ifAuthorizingLock == true) {
             this.showToast('璇环姝e湪鎺堟潈涓紝璇蜂笉瑕侀噸澶嶆彁浜ゃ��',"error");
             return;
         }

--
Gitblit v1.9.1