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/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js b/force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js
index ff768cb..43cf679 100644
--- a/force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js
+++ b/force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js
@@ -3,6 +3,19 @@
import AssignBtn from '@salesforce/apex/RentalApplyWebService.AssignBtn';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+const event1 = new ShowToastEvent({
+ title: '璇锋鏌ョ敵璇风姸鎬�',
+ message:
+ '涓嶈兘寮曞綋锛岃纭鐢宠鐨勭姸鎬�',
+ });
+const event2 = new ShowToastEvent({
+ title: 'Get Help',
+ message:
+ '鏂规硶閿欒锛岃鑱旂郴绠$悊鍛�',
+ });
+
export default class lexEquipmentSetRental_Order extends LightningElement {
@api recordId;
@@ -10,19 +23,19 @@
Rental_Apply__c;
- @wire(CurrentPageReference)
- getStateParameters(currentPageReference){
- if(currentPageReference){
- console.log(currentPageReference);
- console.log("杩涘叆鑾峰彇page鍙傛暟")
- const IdValue=currentPageReference.state.recordId;
- if(IdValue){
- let str=`${IdValue}`;
- this.recordId=str;
- console.log("recordId="+str);
- }
- }
- }
+ // @wire(CurrentPageReference)
+ // getStateParameters(currentPageReference){
+ // if(currentPageReference){
+ // console.log(currentPageReference);
+ // console.log("杩涘叆鑾峰彇page鍙傛暟")
+ // const IdValue=currentPageReference.state.recordId;
+ // if(IdValue){
+ // let str=`${IdValue}`;
+ // this.recordId=str;
+ // console.log("recordId="+str);
+ // }
+ // }
+ // }
connectedCallback(){
@@ -60,7 +73,7 @@
this.Rental_Apply__c.demo_purpose2__c == '鍩硅涓績'
)
&& this.Rental_Apply__c.Status__c == '鑽夋涓�') {
- alert("涓嶈兘寮曞綋锛岃纭鐢宠鐨勭姸鎬�");
+ this.dispatchEvent(event1);
} else if(
(this.Rental_Apply__c.demo_purpose2__c == '璇曠敤锛堟棤璇环锛�' ||
this.Rental_Apply__c.demo_purpose2__c == '璇曠敤锛堟湁璇环锛�' ||
@@ -72,11 +85,11 @@
&& this.Rental_Apply__c.Status__c != '鎵瑰噯瀹屼簡'
&& this.Rental_Apply__c.Status__c != '寮曞綋瀹屼簡'
&& this.Rental_Apply__c.Status__c != '鍑哄簱鎸囩ず瀹屼簡') {
- alert("涓嶈兘寮曞綋锛岃纭鐢宠鐨勭姸鎬�");
+ this.dispatchEvent(event1);
} else if(rtn == 'Fin') {
window.open("/apex/EquipmentRentalApply?raid="+URLENCODE(this.Rental_Apply__c.Id));
} else{
- alert(rtn);
+ this.dispatchEvent(event2);
}
}
--
Gitblit v1.9.1