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/lexCustomNewMaintenance/lexCustomNewMaintenance.js |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
index 5fd4900..ac46aa5 100644
--- a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
@@ -10,9 +10,6 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
-import {
-    ShowToastEvent
-} from 'lightning/platformShowToastEvent';
 
 export default class LexCustomNewMaintenance extends LightningElement {
     @api recordId;
@@ -20,7 +17,7 @@
     IsLoading = true;
     Id;
     StatusC;
-    RecordTypeId;
+    RecordTypeDeveloperNameC;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -43,7 +40,7 @@
                 this.IsLoading = false;
                 this.Id = result.Id;
                 this.StatusC = result.StatusC;
-                this.RecordTypeId = result.RecordTypeId;
+                this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
 
                 this.CustomNew();
                 this.dispatchEvent(new CloseActionScreenEvent());
@@ -56,24 +53,13 @@
     // 鏂板缓缁翠慨鍚堝悓鎶ヤ环
     CustomNew() {
         if (this.StatusC != "寮曞悎涓�") {
-            this.ShowToastEvent("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环", "error");
-            // alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
         } else {
-            if (this.RecordTypeId == "01210000000gTYq") {
+            if (this.RecordTypeDeveloperNameC == "NewMaintenance_Contract") {
                 window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
             } else {
                 window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top");
             }
         }
-    }
-
-    // 寮圭獥
-    ShowToastEvent(msg, type) {
-        const event = new ShowToastEvent({
-            title: '',
-            message: msg,
-            variant: type
-        });
-        this.dispatchEvent(event);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1