From be8dc1e5c21fccf84cf25497d55e5261e93fbb35 Mon Sep 17 00:00:00 2001
From: zhangchunxu <1842059105@qq.com>
Date: 星期三, 02 八月 2023 17:01:29 +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