KKbes
2023-08-07 890eafcf31f5f8d519bb9e6f9c15303be5328e2d
review
1个文件已删除
10个文件已修改
5个文件已添加
2 文件已重命名
380 ■■■■ 已修改文件
force-app/main/default/classes/LexAgenceCopyPIController.cls 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexAgenceCopyPIController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexCommitNeedApprovalController.cls 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexInquiryController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexNewIntentionController.cls 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexOpdCommitApprovalController.cls 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexOpdCommitApprovalController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCommitNeedApproval/lexCommitNeedApproval.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewIntention/lexNewIntention.js 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.html 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.js 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.js-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexAgenceCopyPIController.cls
New file
@@ -0,0 +1,58 @@
public with sharing class LexAgenceCopyPIController {
    //.客户人员的复制按钮
    @AuraEnabled
    public static Agency_Contact__c init(String recordId){
        Agency_Contact__c res = new Agency_Contact__c();
        try{
            res = [SELECT Id,Name,Department_Class__c,Contact__c,Agency_ID__c,
            Type__c,    Doctor_Division1__c,    Agency_Hospital__c,AWS_Data_Id__c
                FROM Agency_Contact__c
                    WHERE Id=:recordId];
            return res;
        }
        catch (Exception e) {
            return null;
        }
    }
    //客户人员的复制按钮
    @AuraEnabled
    public static String init2(String recordId){
        String s='';
        try {
            String objectName = 'Contact'; // 要获取字段的对象名
            Map<String, Schema.SObjectType> globalDescribe = Schema.getGlobalDescribe();
            Schema.SObjectType objType = globalDescribe.get(objectName);
            if (objType != null) {
                Schema.DescribeSObjectResult objDescribe = objType.getDescribe();
                Map<String, Schema.SObjectField> fieldMap = objDescribe.fields.getMap();
                s+='SELECT ';
                // 现在,fieldMap中包含了对象的所有字段信息
                for (String fieldName : fieldMap.keySet()) {
                    if(!fieldName.equals('id'))
                        s+=fieldName+',';
                }
                s=s.removeEnd(',');
                s+=' FROM Contact where id=\''+recordId+'\'';
                system.debug('SQL:'+s);
                List<Contact> opportunitys = Database.query(s);
                s='';
                if(opportunitys.size()>0){
                    system.debug('in!');
                    for (String fieldName : fieldMap.keySet()) {
                        String formaF=fieldMap.get(fieldName).getDescribe().getName();
                        if(opportunitys.get(0).get(fieldName)!=null&&!opportunitys.get(0).get(fieldName).equals('null'))
                            s+=formaF+'='+opportunitys.get(0).get(fieldName)+',';
                    }
                    s=s.removeEnd(',');
                    return s;
                }
            }
            return s;
        } catch (Exception e) {
            System.debug('LexAgenceCopyPIController init2 error:'+e.getMessage());
        }
        return s;
    }
}
force-app/main/default/classes/LexAgenceCopyPIController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/LexCommitNeedApprovalController.cls
@@ -15,15 +15,17 @@
    }
    @AuraEnabled
    public static void  newUpdateMeetingDelayApply(String Id){
    public static String  newUpdateMeetingDelayApply(String Id){
        meeting_delay_apply__c res = new meeting_delay_apply__c();
        try{
            res.Id=Id;
            res.Status__c ='提交';
            update res;
            return 'succuse';
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            return e.getMessage();
        }
    } 
force-app/main/default/classes/LexInquiryController.cls
@@ -50,8 +50,8 @@
    public static String makeAndUpdateLead(String leadId,String Id,String QuoteIraiId){
        Lead res = new Lead();
        try{
            res.Id =  leadId;
            res.Opp_Name_Search__c =  Id;
            res.Id =  Id;
            res.Opp_Name_Search__c =  leadId;
                if(QuoteIraiId != ''){
                    res.LatestQuotationEntrustment__c=QuoteIraiId;
                }
force-app/main/default/classes/LexNewIntentionController.cls
@@ -11,12 +11,13 @@
            Sales_Method__c,Request__c,Request_Detail__c 
                FROM Agency_Opportunity__c
                    WHERE  Id = : recordId];
            return res;
        }
        catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            return null;
        }
        return res;
    }
@@ -29,8 +30,9 @@
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            return null;
        }
        return null;
    }
        @AuraEnabled
@@ -41,7 +43,8 @@
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            return null;
        }
        return null;
    }
}
force-app/main/default/classes/LexOpdCommitApprovalController.cls
New file
@@ -0,0 +1,36 @@
public with sharing class LexOpdCommitApprovalController {
    @AuraEnabled
    public static CancelPostponePlan__c init(String recordId){
        CancelPostponePlan__c res = new CancelPostponePlan__c();
        try{
            res = [Select Id,Status__c,CancelOPDPlan__c
                FROM CancelPostponePlan__c
                    WHERE  Id = : recordId];
        }
        catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static String  newUpdateCancelPostponePlan(String Id,String Status){
        CancelPostponePlan__c res = new CancelPostponePlan__c();
        try{
            res.Id=Id;
            if(Status == '取消'){
                res.Status__c ='提交';
            }
            else if (Status == '延期报告'){
                res.Status__c ='延期提交';
            }
            update res;
            return 'success';
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            return e.getMessage();
        }
    }
}
force-app/main/default/classes/LexOpdCommitApprovalController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js
File was deleted
force-app/main/default/lwc/lexCommitNeedApproval/lexCommitNeedApproval.js
@@ -59,6 +59,7 @@
    async commitNeedApproval(){
        var changeFlg=0;
        var NowStatus = this.MeetingDelayApply.status__c;
        if(NowStatus == "草案中" || NowStatus == "驳回"){
            var campaignId = this.MeetingDelayApply.campaign__c; //学会id
@@ -83,7 +84,6 @@
            message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
            variant: 'headerless',
            label: 'this is the aria-label value',
            // setting theme would have no effect
        });
        if(!result){
            return;
@@ -92,16 +92,20 @@
        if(NowStatus == "草案中" || NowStatus == "驳回"){
            await newUpdateMeetingDelayApply({Id : this.recordId })
            .then(result=>{
            }).catch(error=>{
                const event2 = new ShowToastEvent({
                       message:
                    error.message,
                    variant : 'error'
            });
            this.dispatchEvent(event2);
        });
                if(result!='success'){
                    const event2 = new ShowToastEvent({
                           message:
                            result,
                            variant : 'error'
                    });
                    changeFlg+=1;
                    this.dispatchEvent(event2);
                }
            });
        }
        if(changeFlg!=0){
            return;
        }
        //4. 进程生成器
force-app/main/default/lwc/lexExistingInquiry/lexExistingInquiry.js
@@ -1,5 +1,4 @@
//author : kk   
//self  review  更新失败返回的错误信息没有之前class的好。给出的都是意义不明的报错
import { LightningElement, track, wire , api  } from 'lwc';
@@ -74,11 +73,9 @@
     connectedCallback(){
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.Task = result;
                this.ExistingInquiry().then(result=>{
@@ -86,9 +83,6 @@
                    this.dispatchEvent(new CloseActionScreenEvent());
                });
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        });
    }
@@ -112,13 +106,10 @@
                    await getQuoteIrai({QuoteIraiId : this.Task.QuoteIraiId__c
                    }).then(res=>{
                        this.NewTask=res;
                    }).catch(err=>{
                        console.log("err:",err.message);
                    });
                    if(this.NewTask.Lead__c){
                         // Lead作成并更
                        await makeAndUpdateLead({ Lead_c : this.Opportunity.Lead__c, Id : this.NewTask.Id,
                        await makeAndUpdateLead({ Lead_c : this.Opportunity.Id, Id : this.NewTask.Lead__c,
                               QuoteIraiId__c : this.Task.QuoteIraiId__c
                        }).then(res=>{
                            if(res !='success'){
@@ -135,7 +126,7 @@
                            return;
                        }
                        // 判断报价委托
                            if( this.Task.QuoteIraiId__c != '') {
                            if( this.Task.QuoteIraiId__c != '' && this.Task.QuoteIraiId__c!=undefined) {
                                // 报价委托作成
                                await makeAndUpdateQuoteIrai({ QuoteIraiStatus : "已有询价", Id : this.Task.QuoteIraiId__c 
                                }).then(res=>{
@@ -196,4 +187,4 @@
    
}
}
force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js
@@ -15,27 +15,27 @@
const event1 = new ShowToastEvent({
                    message:
                    "存在审批中的会议延期申请,无法再次提交延期申请。!",
                    variant : "warning"
                    variant : "error"
});
const event2 = new ShowToastEvent({
                    message:
                    "耗材借出申请的状态未处于`草案中`或`取消`,该会议只能取消,无法延期。",
                     variant : "warning"
                     variant : "error"
});
const event3 = new ShowToastEvent({
                    message:
                    "备品借出申请的状态未处于`草案中`或`取消`,该会议只能取消,无法延期。",
                     variant : "warning"
                     variant : "error"
});
const event4 = new ShowToastEvent({
                    message:
                    "该活动信息已发送到智慧医疗,请确认后再操作",
                     variant : "warning"
                     variant : "error"
});
const event5 = new ShowToastEvent({
                    message:
                    "该会议不在公开中或申请中,只能取消,无法延期。",
                     variant : "warning"
                     variant : "error"
});
export default class lexMeetingDelayApplyCampaign extends NavigationMixin(LightningElement) {
    @api recordId;
@@ -50,14 +50,12 @@
          if (urlValue) {
            let str = `${urlValue}`;
            this.recordId = str;
            console.log(this.recordId);
          }
        }
    }
    connectedCallback(){
        init({recordId:this.recordId}).then(res=>{
            console.log(res);
            this.Campaign=res;
            this.meetingDelayApply().then(res=>{
                this.IsLoading=false;
force-app/main/default/lwc/lexNewIntention/lexNewIntention.js
@@ -4,10 +4,18 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/LexNewIntentionController.init';
import getRecordIdByName  from '@salesforce/apex/LexSubmitCampaignController.getRecordIdByName';
import getAccountByLongName  from '@salesforce/apex/LexNewIntentionController.getAccountByLongName';
import getAccountByShortName  from '@salesforce/apex/LexNewIntentionController.getAccountByShortName';
import Agency_Opportunity from '@salesforce/label/c.Agency_Opportunity';
import Opportunity_stage from '@salesforce/label/c.Opportunity_stage';
import Opp_Name from '@salesforce/label/c.Opp_Name';
import Purchase_Reason from '@salesforce/label/c.Purchase_Reason';
import Fund_Basis from '@salesforce/label/c.Fund_Basis';
import Purchase_Type from '@salesforce/label/c.Purchase_Type';
import Sales_Method from '@salesforce/label/c.Sales_Method';
import Request from '@salesforce/label/c.Request';
import Request_Detail from '@salesforce/label/c.Request_Detail';
  const event1 = new ShowToastEvent({
@@ -30,7 +38,6 @@
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log(str);
            this.recordId = str;
          }
        }
@@ -43,17 +50,14 @@
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.AgencyOpportunity = result;
                this.newIntention().then(result=>{
                    IsLoading=false;
                    this.dispatchEvent(new CloseActionScreenEvent());
                });
                this.judageWhertherNull();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        });
    }
@@ -71,35 +75,32 @@
    var accountID = '';
        if(accountrecords.length > 0){
            accountID = accountrecords[0].Id;
            console.log('长name返回长度大于0')
        }
        if (accountID == '') {
            accountName = this.AgencyOpportunity.Department_Class_Opp_Name__c;
            accountrecords =  await getAccountByShortName({Name : accountName});
                if(accountrecords.length > 0){
                    accountID = accountrecords[0].Id;
                    console.log('shortName return size 》 0')
                }
        }
    var url = '/apex/NewAndEditLead?' + '00N10000009HKSP=' + this.AgencyOpportunity.Id
    + '&LeadSource=经销商' + '&00N10000006qOFb=' + this.AgencyOpportunity.StageName__c
    + '&00N10000006qOF0=' + this.AgencyOpportunity.Close_Forecasted_Date__c
    + '&00N10000002EjE1=' + this.AgencyOpportunity.Name
    + '&00N10000008rqHf=' + this.AgencyOpportunity.Purchase_Reason__c
    + '&00N10000008rqHd=' + this.AgencyOpportunity.Fund_Basis__c
    + '&00N10000008rqHg=' + this.AgencyOpportunity.Purchase_Type__c
    +'&00N10000008rqHj=' + this.AgencyOpportunity.Sales_Method__c
    + '&00N10000008rqHi=' + this.AgencyOpportunity.Request__c
    + '&00N10000008rqHh=' + this.AgencyOpportunity.Request_Detail__c
    //后端代码取参数数据,一一对应
    var recordTypeId= await getRecordIdByName({Name : '拜访获取的意向'})
    var url = '/apex/NewAndEditLead?' + Agency_Opportunity+'=' + this.AgencyOpportunity.Id
    + '&LeadSource=经销商' + '&'+Opportunity_stage+'=' + this.AgencyOpportunity.StageName__c
    + '&00N10000006qOF0=' +     this.AgencyOpportunity.Close_Forecasted_Date__c
    + '&'+Opp_Name+'=' +         this.AgencyOpportunity.Name
    + '&'+Purchase_Reason+'=' + this.AgencyOpportunity.Purchase_Reason__c
    + '&'+Fund_Basis+'=' +         this.AgencyOpportunity.Fund_Basis__c
    + '&'+Purchase_Type+'=' +     this.AgencyOpportunity.Purchase_Type__c
    +'&'+Sales_Method+'=' +     this.AgencyOpportunity.Sales_Method__c
    + '&'+Request+'=' +         this.AgencyOpportunity.Request__c
    + '&'+Request_Detail+'=' +  this.AgencyOpportunity.Request_Detail__c
    + '&CF00N10000002CvC5=' + accountName
    + '&CF00N10000002CvC5_lkid=' + accountID
    + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.AgencyOpportunity.Id;
    + '&RecordTypeId='+recordTypeId + '&retURL=%2F' + this.AgencyOpportunity.Id;
    window.open(url);
    
    }
}
force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js
@@ -7,7 +7,7 @@
const event1 = new ShowToastEvent({
                    message:
                    "科室状态为无效,不允许新建OPD计划",
                    variant : "warning"
                    variant : "error"
});
import init  from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton';
export default class lexNewOPDButtonAccount extends NavigationMixin(LightningElement) {
@@ -31,7 +31,6 @@
    connectedCallback(){
        init({recordId:this.recordId}).then(res=>{
            if (res!=null) {
                console.log(res);
                this.Account=res;
                this.newOPDButtonAccount().then(res=>{
                    this.IsLoading=false;
force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js
@@ -7,7 +7,7 @@
const event1 = new ShowToastEvent({
                    message:
                    "询价状态为:失单、取消、注残、发货、完毕,不允许创建OPD计划",
                    variant : "warning"
                    variant : "error"
});
import init  from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton2';
export default class lexNewOPDButtonOpportunity extends NavigationMixin(LightningElement) {
@@ -30,7 +30,6 @@
    connectedCallback(){
        init({recordId:this.recordId}).then(res=>{
            if (res!=null) {
                console.log(res);
                this.Opportunity=res;
                this.newOPDButtonOpportunity().then(res=>{
                    this.IsLoading=false;
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.html
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.js
New file
@@ -0,0 +1,106 @@
//author:kkbes   增加LexOpdCommitApprovalController
import { LightningElement, track, wire,api } from 'lwc';
import LightningConfirm from 'lightning/confirm';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/LexOpdCommitApprovalController.init';
import newUpdateCancelPostponePlan  from '@salesforce/apex/LexOpdCommitApprovalController.newUpdateCancelPostponePlan';
import changeTrade  from '@salesforce/apex/OpdPlanWebService.changeTrade';
const event1 = new ShowToastEvent({
                    title: '状态错误',
                    message:
                    "只有取消或者延期报告状态才可以进行审批!",
});
export default class lexOPDCommitNeedApproval extends LightningElement {
    @api recordId;
    IsLoading=true;
    CancelPostponePlan;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
            if (result != null) {
                this.CancelPostponePlan = result;
                this.OPDCommitApproval().then(result=>{
                    this.IsLoading=false;
                    this.dispatchEvent(new CloseActionScreenEvent());
                });
            }
        }).catch(error => {
            const event3 = new ShowToastEvent({
                   title: '页面初始化错误',
                   message:
                error.message,
            });
            this.dispatchEvent(event3);
        });
    }
    async  OPDCommitApproval(){
        var changeFlg=0;
        var NowStatus = this.CancelPostponePlan.Status__c;
        if(NowStatus == "取消" || NowStatus == "延期报告"){
            var opdplanid = this.CancelPostponePlan.CancelOPDPlan__c; //学会id
            var rtn = await changeTrade({opdplanId:opdplanid});
            if (rtn != 'OK') {
                const event = new ShowToastEvent({
                    title: '失败',
                    message:
                    rtn,
                });
                this.dispatchEvent(event);
                return;
            }
        }
        if(NowStatus != "取消" && NowStatus != "延期报告"){
            this.dispatchEvent(event1);
            return;
        }
        const result = await LightningConfirm.open({
            message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
            variant: 'headerless',
            label: 'this is the aria-label value',
        });
        if(!result){
            return;
        }
        await newUpdateCancelPostponePlan({Id : this.recordId ,Status : this.CancelPostponePlan.Status__c})
        .then(result=>{
            if(result!='success'){
                const event2 = new ShowToastEvent({
                      message:
                    result,
                    variant : 'error'
                });
                changeFlg+=1;
                this.dispatchEvent(event2);
            }
        });
        if(changeFlg!=0){
            return;
        }
        setTimeout(function(){
                window.location.href = window.location;
            }, 1500 )
    }
}
force-app/main/default/lwc/lexOPDCommitNeedApproval/lexOPDCommitNeedApproval.js-meta.xml
File was renamed from force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexAgenceCopyPI">
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOPDCommitNeedApproval">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
force-app/main/default/lwc/lexProductRepairQuoteProduct/lexProductRepairQuoteProduct.js
@@ -13,10 +13,8 @@
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          console.log(currentPageReference);
          if (urlValue) {
            let str = `${urlValue}`;
            console.log(str);
            this.recordId = str;
          }
@@ -25,20 +23,18 @@
    connectedCallback(){
        this.productRepairQuoteProduct().then(res=>{
            this.IsLoading=false;
            this.dispatchEvent(new CloseActionScreenEvent());
      this.productRepairQuoteProduct().then(res=>{
              this.IsLoading=false;
              this.dispatchEvent(new CloseActionScreenEvent());
        });
    }
    async productRepairQuoteProduct(){
    async productRepairQuoteProduct(){
        window.open ('/apex/ProductRepairQuote?productid=' + this.recordId +
            '&flag=productsearch', '', 'height=500, width=1200, top=300, left=350,location=no');
            '&flag=productsearch', '', 'height=500, width=1200, top=300, left=350,location=no');
    }