From 9c43ce3f3bf2d0a2f70b73a4ba89eccf5030a683 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 10 五月 2023 17:54:00 +0800
Subject: [PATCH] 查漏补缺
---
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js | 2
force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js | 48 +++++++++++++-----------
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js | 2
force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js | 10 +++--
force-app/main/default/classes/MonthlyReportController.cls | 5 --
5 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/force-app/main/default/classes/MonthlyReportController.cls b/force-app/main/default/classes/MonthlyReportController.cls
index e1d3f65..9b43a8e 100644
--- a/force-app/main/default/classes/MonthlyReportController.cls
+++ b/force-app/main/default/classes/MonthlyReportController.cls
@@ -28,8 +28,7 @@
Feedback__c,
Task_follow__c,
Other_issue__c,
- Next_week_plan__c,
- Dr_Sum_URL__c
+ Next_week_plan__c
FROM Monthly_Report__c WHERE Id = :recordId LIMIT 1];
String userName = UserInfo.getUserName();
User activeUser = [Select Email From User where Username = : userName limit 1];
@@ -41,9 +40,7 @@
res.taskFollow = report.Task_follow__c;
res.otherIssue = report.Other_issue__c;
res.nextWeekPlan = report.Next_week_plan__c;
- res.drSumUrl = report.Dr_Sum_URL__c;
res.userEmail = activeUser.Email;
-
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
diff --git a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
index 9f9694c..51c400e 100644
--- a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
+++ b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-21 14:32:09
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-21 14:44:55
+ * @LastEditTime: 2023-05-10 17:05:09
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
diff --git a/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js b/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
index 3130703..ff9e612 100644
--- a/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
+++ b/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
@@ -4,17 +4,17 @@
* @Author: chen jing wu
* @Date: 2023-03-27 13:53:40
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-10 14:22:27
+ * @LastEditTime: 2023-05-10 10:21:24
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/MonthlyReportController.initForCreateNoteEmailButton';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
export default class LexCreateNotesEmail extends LightningElement {
@api recordId;
+ objectName;
ownerEmail;
ownerAlias;
keyIssue;
@@ -22,9 +22,8 @@
taskFollow;
otherIssue;
nextWeekPlan;
- drSumUrl;
IsLoading = true;
- url;
+ Link;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -32,12 +31,19 @@
console.log(currentPageReference);
if (currentPageReference) {
- const urlValue = currentPageReference.state.recordId;
- if (urlValue) {
- let str = `${urlValue}`;
+ const urlValue1 = currentPageReference.state.recordId;
+ if (urlValue1) {
+ let str = `${urlValue1}`;
console.log("str");
console.log(str);
this.recordId = str;
+ }
+ const urlValue2 = currentPageReference.state.backgroundContext;
+ if (urlValue2) {
+ let str = `${urlValue2}`;
+ console.log("str");
+ console.log(str);
+ this.Link = str;
}
}
}
@@ -52,15 +58,14 @@
console.log(result);
if (result != null) {
this.IsLoading = false;
- this.ownerEmail = result.ownerEmail;
- this.ownerAlias = result.ownerAlias;
- this.keyIssue = result.keyIssue;
- this.feedBack = result.feedBack;
- this.taskFollow = result.taskFollow;
- this.otherIssue = result.otherIssue;
- this.nextWeekPlan = result.nextWeekPlan;
- this.drSumUrl = result.drSumUrl;
- this.userEmail = result.userEmail;
+ this.ownerEmail = result.ownerEmail == undefined ? '' : result.ownerEmail;
+ this.ownerAlias = result.ownerAlias == undefined ? '' : result.ownerAlias;
+ this.keyIssue = result.keyIssue == undefined ? '' : result.keyIssue;
+ this.feedBack = result.feedBack == undefined ? '' : result.feedBack;
+ this.taskFollow = result.taskFollow == undefined ? '' : result.taskFollow;
+ this.otherIssue = result.otherIssue == undefined ? '' : result.otherIssue;
+ this.nextWeekPlan = result.nextWeekPlan == undefined ? '' : result.nextWeekPlan;
+ this.userEmail = result.userEmail == undefined ? '' : result.userEmail;
this.createEmail();
this.dispatchEvent(new CloseActionScreenEvent());
}
@@ -73,11 +78,10 @@
}
createEmail() {
console.log("start");
-
- window.location.href = ("mailto:"
- + this.ownerEmail
+ window.location.href = ("mailto:"
+ + this.ownerEmail
+"?bcc="
- + this.userEmail
+ + this.userEmail
+"&subject=銆愬懆鎶�:"
+ this.ownerAlias
+ "銆�" + "&body=鍏堢敓/濂冲+" + "%0D%0A" + "%0D%0A" + "涓昏鎶ュ憡浜嬮」锛�"
@@ -90,8 +94,8 @@
+ this.otherIssue
+"%0D%0A" + "涓嬪懆璁″垝锛�"
+ this.nextWeekPlan
- +"%0D%0A" + "杩炴帴锛�"
- + this.drSumUrl
+ +"%0D%0A" + "杩炴帴锛�" + "%0D%0A"
+ + window.location.origin + this.Link
+"%0D%0A").substring(0,320).split("<br>").join("%0D%0A");
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
index 564dea5..36377b4 100644
--- a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
+++ b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-23 10:09:31
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-23 11:29:15
+ * @LastEditTime: 2023-05-10 17:38:56
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
diff --git a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
index c121740..6172921 100644
--- a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
+++ b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-12 10:46:24
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-12 13:48:26
+ * @LastEditTime: 2023-05-10 13:03:57
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -60,9 +60,10 @@
// 20221206 ljh DB202212030068 start
var DirectLossFLG = this.directLossFLG;
var CreatedDay = this.createdDay;
- var Day = Date('2022-12-03');
- if((DirectLossFLG == 'true' || DirectLossFLG == 1 ) && CreatedDay > Day){
+ var Day = '2022-12-03';
+ if((DirectLossFLG == true || DirectLossFLG == 1 ) && CreatedDay > Day){
this.showToast("浠庢嫑鏍囬」鐩偣鍑诲け鍗曟柊寤虹殑璇环锛岄娴婳CSM绛剧害鏃�(KPI)鍜岄娴嬪彂璐ф棩涓嶅厑璁镐慨鏀�","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
// 20221206 ljh DB202212030068 end
@@ -70,8 +71,9 @@
recordId: this.recordId
}).then(result=>{
var sqlResult = result;
- if (sqlResult.size > 0) {
+ if (sqlResult.length > 0) {
this.showToast("宸插瓨鍦ㄥ緟瀹℃壒鐨勫彉鏇寸敵璇凤紒","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
} else {
window.open('/apex/ImprovedForecastTime?id=' + this.recordId,'','height=500,width=800,top=200,left=250,location=no');
--
Gitblit v1.9.1