From 988f9735377909b6310301e582c15804e004783f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 07 十月 2023 10:36:13 +0800
Subject: [PATCH] 近期修改cjw
---
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
index 1caae11..a0eccad 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -9,6 +9,9 @@
import queryForRecords2 from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords2';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+
export default class LexNewOpportunityAgency extends NavigationMixin(LightningElement) {
@api recordId;
agency1Id;
@@ -41,6 +44,10 @@
}
}
connectedCallback(){
+ Promise.all([
+ loadStyle(this, lwcCSS)
+ ]);
+
init({
recordId: this.recordId
}).then(result=>{
@@ -206,8 +213,21 @@
// + encodeURIComponent(this.opportunityCategory);
// console.log(url);
// window.open(url);
+ if(this.closeForecastedDate){
+ if(!this.closeForecastedDate.includes(' ')){
+ this.closeForecastedDate += ' 00:00:00'
+ }
+ this.closeForecastedDate = this.closeForecastedDate.replace(' ','T').replaceAll('/','-') + '.000Z';
+ console.log(this.closeForecastedDate);
+ }
+ if(this.bidPlannedDate){
+ if(!this.bidPlannedDate.includes(' ')){
+ this.bidPlannedDate += ' 00:00:00'
+ }
+ this.bidPlannedDate = this.bidPlannedDate.replace(' ','T').replaceAll('/','-') + '.000Z';
+ }
const defaultValues = encodeDefaultFieldValues({
- Name: '(OLYMPUS)',
+ Name: '(OLYMPUS)' + this.name,
Close_Forecasted_Date__c: this.closeForecastedDate,
Bid_Planned_Date__c: this.bidPlannedDate,
OCM_Change_To_Opportunity_Flg__c: '1',
@@ -245,9 +265,10 @@
}
showToast(msg,type) {
const event = new ShowToastEvent({
- title: '',
+ title: ' ',
message: msg,
- variant: type
+ variant: type,
+ mode: 'sticky'
});
this.dispatchEvent(event);
}
--
Gitblit v1.9.1