From 63f4c248149d330215d2da44d3f9de08fdb3c0ef Mon Sep 17 00:00:00 2001
From: zhangchunxu <1842059105@qq.com>
Date: 星期五, 14 七月 2023 10:24:52 +0800
Subject: [PATCH] “营业管理自定义”左侧栏和”新建意向“vf跳转
---
force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
index a322e7d..a10ac7e 100644
--- a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
+++ b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
@@ -1,9 +1,10 @@
import { LightningElement,wire,track,api} from 'lwc';
-import { CurrentPageReference } from "lightning/navigation";
+import { CurrentPageReference ,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-export default class lexTenderingIntentionButton extends LightningElement {
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+export default class lexTenderingIntentionButton extends NavigationMixin(LightningElement) {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
IsLoading = true;
@@ -23,16 +24,30 @@
init({
recordId: this.recordId
}).then(result => {
- if (result != null) {
this.IsLoading = false;
this.id = result.Id;
- alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
- // this.showToast('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�','success');
- var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + this.id
- + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.id ;
- window.open(url);
- this.dispatchEvent(new CloseActionScreenEvent());
- }
+ // alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
+ this.showToast('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�','success');
+ // var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + this.id
+ // + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.id ;
+ // window.open(url);
+ const defaultValues = encodeDefaultFieldValues({
+ Tender_information__c :this.id,
+ LeadSource:'鎷涙爣缃�',
+ RecordTypeId:result.NewDaily_Report,
+
+ });
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Lead',
+ actionName: 'new'
+ },
+ state:{
+ defaultFieldValues: defaultValues
+ }
+ });
+ this.dispatchEvent(new CloseActionScreenEvent());
})
}
showToast(msg,type) {
--
Gitblit v1.9.1