From 1363fbac72b3c291821917fc883587c1928f1651 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 08 八月 2023 17:38:39 +0800
Subject: [PATCH] 20230808上传修改伟意代码

---
 force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
index 26b7f7d..33d2a1b 100644
--- a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
+++ b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -59,7 +59,6 @@
                         this.ServiceCutPriceApply();
                     }
                 })
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -74,15 +73,18 @@
 
         if (power != '2F2A_RC' && power != '2F4_鎶�鏈帹杩涢儴' && power != '2F4_鎶�鏈帹杩涢儴_闈濻SO') {
             this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         var status = this.CutPriceStatusServiceC;
         if (status == '瀹℃壒涓�') {
             this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鎵瑰噯') {
             this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -92,8 +94,12 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
+                }else{
+                    this.ShowToastEvent("鏇存柊鎴愬姛锛�", "success");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                 }
             })
             updateRepairQuotation02({
@@ -102,11 +108,13 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert("鎻愪氦澶辫触 " + split[1]);
+                    this.ShowToastEvent("鎻愪氦澶辫触 " + split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 } else {
                     this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛锛�", "success");
                     location.reload();
+                    this.dispatchEvent(new CloseActionScreenEvent());
                 }
             })
         }

--
Gitblit v1.9.1