From af7f2ebba1ca53c05ad1c47361c889afd53a9765 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期四, 10 八月 2023 17:26:26 +0800
Subject: [PATCH] 耗材备品
---
force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
index 5fd4900..cbd223a 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,8 @@
IsLoading = true;
Id;
StatusC;
- RecordTypeId;
+ RecordTypeDeveloperNameC;
+ msg;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -40,10 +38,9 @@
}).then(result => {
console.log(result);
if (result != null) {
- 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,10 +53,10 @@
// 鏂板缓缁翠慨鍚堝悓鎶ヤ环
CustomNew() {
if (this.StatusC != "寮曞悎涓�") {
- this.ShowToastEvent("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环", "error");
- // alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+ this.msg = "缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环";
+ this.IsLoading = false;
} 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");
@@ -67,13 +64,7 @@
}
}
- // 寮圭獥
- ShowToastEvent(msg, type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
+ closeAction() {
+ window.history.go(-1);
}
}
\ No newline at end of file
--
Gitblit v1.9.1