19626
2023-05-10 9c43ce3f3bf2d0a2f70b73a4ba89eccf5030a683
查漏补缺
5个文件已修改
67 ■■■■ 已修改文件
force-app/main/default/classes/MonthlyReportController.cls 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
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";
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");
    }
}
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";
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("从招标项目点击失单新建的询价,预测OCSM签约日(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');