From a8628cfe2640797ba9265e9be46c42430d9e7eba Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期一, 26 六月 2023 10:01:44 +0800
Subject: [PATCH] 服务按钮样式调整

---
 force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
index c5bd082..bf632b6 100644
--- a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
@@ -10,6 +10,9 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 import selectMaintenanceContractEstimate from '@salesforce/apex/otherButtonMaintenanceContractCtl.selectMaintenanceContractEstimate';
 
 export default class LexCustomAnewMaintenance extends LightningElement {
@@ -20,6 +23,7 @@
     StatusC;
     RecordTypeDeveloperNameC;
     URFContractC;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -39,7 +43,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                 this.StatusC = result.StatusC;
@@ -53,10 +56,12 @@
         })
     }
 
-    //涓
+    //鍚堝悓鍐嶆姤浠�
     CustomAnew() {
         if (this.StatusC != "寮曞悎涓�") {
-            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�")
+            this.msg = "缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�";
+            this.IsLoading = false;
+            return;
         } else {
             selectMaintenanceContractEstimate({
                 recordId: this.Id
@@ -72,11 +77,16 @@
                     } else {
                         window.open("/apex/SelectAssetEstimate?copyid=" + ids[0].Id, "_top");
                     }
-
                 } else {
-                    alert('璇烽�夋嫨涓�涓姤浠�')
+                    this.msg = '璇烽�夋嫨涓�涓姤浠�';
+                    this.IsLoading = false;
+                    return;
                 }
             })
         }
     }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.1