From 845fcb95a8c04595424c315eef611e0980a5949b Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期三, 24 五月 2023 14:26:58 +0800
Subject: [PATCH] community backup 0524
---
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
index ed36fa7..26b7f7d 100644
--- a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
+++ b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -12,6 +12,7 @@
import init from '@salesforce/apex/buttonRepairQuotationCtl.init';
import updateRepairQuotation from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation';
import updateRepairQuotation02 from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation02';
+import initSelectProfile from '@salesforce/apex/buttonRepairQuotationCtl.initSelectProfile';
import {
ShowToastEvent
} from 'lightning/platformShowToastEvent';
@@ -24,6 +25,7 @@
Id;
CutPriceStatusServiceC;
profileId;
+ profileName;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -37,7 +39,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -48,31 +49,40 @@
this.CutPriceStatusServiceC = result.CutPriceStatusServiceC;
this.profileId = result.profileId;
- this.ServiceCutPriceApply();
+ initSelectProfile({
+ profileId: this.profileId
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.profileName = result[0].Name;
+ this.ServiceCutPriceApply();
+ }
+ })
this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(error => {
console.log(error);
})
+
+
}
//鏈嶅姟鏈儴鍑忎环鐢宠
ServiceCutPriceApply() {
- var power = this.profileId;
- if (power != '00e10000000xnnz' && power != '00e10000000xno9' && power != '00e10000000NbC4') {
+ var power = this.profileName;
+
+ if (power != '2F2A_RC' && power != '2F4_鎶�鏈帹杩涢儴' && power != '2F4_鎶�鏈帹杩涢儴_闈濻SO') {
this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
- // alert('瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�');
return;
}
var status = this.CutPriceStatusServiceC;
if (status == '瀹℃壒涓�') {
this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鎵瑰噯') {
this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -95,12 +105,11 @@
alert("鎻愪氦澶辫触 " + split[1]);
return;
} else {
- // alert("瀹℃壒鎻愪氦鎴愬姛锛�");
this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛锛�", "success");
+ location.reload();
}
})
}
- location.reload();
}
// 寮圭獥
--
Gitblit v1.9.1