19626
2023-05-15 f6a201e215d929bda9815e1689907d166a603519
5月15日陈京武按钮开发
15个文件已添加
20个文件已修改
958 ■■■■ 已修改文件
force-app/main/default/classes/LightingButtonConstant.cls 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonController.cls 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ReportController.cls 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLightingButtonConstant.cls 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLightingButtonConstant.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelReport/lexCancelReport.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoseBid/lexLoseBid.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LightingButtonConstant.cls
@@ -89,6 +89,17 @@
    public static final String LU_SHENG_NAME = '陆 胜';
    public static final String HU_DI_AN_NAME = '胡 迪安';
    public static final String SYSTEM_PROFILE_NAME = '系统管理员';
    public static final String TwoS10_FSE_ManagerMent = '2S10_FSE管理者';
    public static final String TwoS1_Sales_Hospital = '2S1_销售医院担当';
    public static final String TwoS1_Sales_Hospital_Non_Singleton = '2S1_销售医院担当(非单点)';
    public static final String TwoS2_Sales_Product = '2S2_销售产品担当';
    public static final String TwoS4_Sales_Manager = '2S4_销售管理者';
    public static final String TwoS4_Sales_Manager_Non_Singleton = '2S4_销售管理者(非单点)';
    public static final String TwoS4_Sales_Manager_Majordomo = '2S4_销售管理者(总监)';
    public static final String TwoS6_Trade_Assistant = '2S6-2_营业助理';
    public static final String TwoS6_Sales_Headquarters = '2S6-1_销售本部窗口';
    public static final String TwoS7_Sales_Headquarters = '2S7_销售本部合同管理窗口';
    public static final String TwoM4_Marketplace_Manager = '2M4_市场产品本部担当(询价)';
    public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
    public static final String  SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
    public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '非对象';
force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 11:16:07
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-23 14:55:57
 * @LastEditTime: 2023-05-15 13:40:51
 */
public with sharing class OpportunityLightingButtonController {
    @AuraEnabled
@@ -65,8 +65,12 @@
            res.trade = opportunity.Trade__c;
            res.isCorrosion = opportunity.Is_Corrosion__c;
            res.ifAuthorizingLock = opportunity.If_Authorizing_Lock__c;
            String profile18 = UserInfo.getProfileId();
            res.profileId = profile18.substring(0,profile18.length() - 3);
            res.profileId = UserInfo.getProfileId();
            res.systemProfileId = getProfileIdByName(lexLightingButtonConstant.SYSTEM_PROFILE_NAME);
            res.j3ProfileId = getProfileIdByName(lexLightingButtonConstant.J3_PROFILE_NAME);
            res.s61ProfileId = getProfileIdByName(lexLightingButtonConstant.S61_PROFILE_NAME);
            res.s62ProfileId = getProfileIdByName(lexLightingButtonConstant.S62_PROFILE_NAME);
            res.m4ProfileId = getProfileIdByName(lexLightingButtonConstant.M4_PROFILE_NAME);
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
@@ -117,7 +121,7 @@
        return res;
    }
    @AuraEnabled
    public static InitData initFoBeforeOPDPDFBtnButton(String recordId){
    public static InitData initForBeforeOPDPDFBtnButton(String recordId){
        InitData res = new InitData();
        try {
            Opportunity opportunity = [
@@ -176,8 +180,10 @@
            res.bidPlannedDate = opportunity.Bid_Planned_Date__c;
            res.salesAssistantName = opportunity.Sales_assistant_name__c;
            res.salesAssistantID = opportunity.Sales_assistant_ID__c;
            String profileId18 = UserInfo.getProfileId();
            res.profileId = profileId18.substring(0, profileId18.length() - 3);
            res.profileId = UserInfo.getProfileId();
            res.systemProfileId = getProfileIdByName(lexLightingButtonConstant.SYSTEM_PROFILE_NAME);
            res.s1ProfileId = getProfileIdByName(lexLightingButtonConstant.S1_PROFILE_NAME);
            res.s4ProfileId = getProfileIdByName(lexLightingButtonConstant.S4_PROFILE_NAME);
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
@@ -387,6 +393,65 @@
        return res;
    }
    @AuraEnabled
    public static InitData initForCreateActivityButton(String recordId){
        InitData res = new InitData();
        try {
            Opportunity opp = [
                select
                AccountId
                from Opportunity where Id =: recordId
            ];
            res.accountId = opp.AccountId;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    @AuraEnabled
    public static InitData initForAssignTaskButtonButton(String recordId){
        InitData res = new InitData();
        try {
            Opportunity opp = [
                select
                AccountId,
                Name
                from Opportunity where Id =: recordId
            ];
            Account acc = [
                select
                Name
                from Account where Id =:opp.AccountId
            ];
            res.accountId = opp.AccountId;
            res.accountName = acc.Name;
            res.name = opp.Name;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    @AuraEnabled
    public static InitData initForChangeContractTypeButton(String recordId){
        InitData res = new InitData();
        try {
            Opportunity opp = [
                select
                StageName,
                Estimation_Decision__c,
                SAP_Send_OK__c,
                If_Authorizing_Lock__c
                from Opportunity where Id =: recordId
            ];
            res.stageName = opp.StageName;
            res.estimationDecision = opp.Estimation_Decision__c;
            res.sapSendOK = opp.SAP_Send_OK__c;
            res.ifAuthorizingLock = opp.If_Authorizing_Lock__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    @AuraEnabled
    public static string updateForAgencyAuthorizeButton(String recordId){
        try {
            Opportunity opp = new Opportunity();
@@ -441,9 +506,9 @@
            Opportunity opp = new Opportunity();
            opp.Id = recordId;
            if(flag){
                opp.Stock_apply_status__c  = '填写完毕';
                opp.Stock_apply_status__c  = lexLightingButtonConstant.STOCK_APPLY_STATUS_WRITE_OVER;
            }else {
                opp.Stock_apply_status__c = '草案中';
                opp.Stock_apply_status__c = lexLightingButtonConstant.STOCK_APPLY_STATUS_DRAFT;
            }
            update opp;
            return null;
@@ -503,7 +568,7 @@
                select id,
                Tender_information__r.subInfoType__c
                from Tender_Opportunity_Link__c 
                where (Tender_information__r.subInfoType__c = '3-1:废标公告' OR Tender_information__r.subInfoType__c ='3-2:流标公告') and Opportunity__c =: recordId
                where (Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_SCRAPPED_LABEL OR Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_FLOW_LABEL) and Opportunity__c =: recordId
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
@@ -518,7 +583,7 @@
            quotes = [
                select 
                id 
                from QuoteIrai__c where Note__c like :opportunityId and QuoteIrai_Status__c = '草案中'
                from QuoteIrai__c where Note__c like :opportunityId and QuoteIrai_Status__c =:lexLightingButtonConstant.QUOTEIRAI_STATUS_DRAFT
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
@@ -585,6 +650,34 @@
            Integer left = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
        }
    }
    @AuraEnabled
    public static string getUserIdByName(String userName){
        User user = null;
        try {
            user = [
                select
                Id
                from User where Name =: userName
            ];
            return user.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
    }
    @AuraEnabled
    public static string getProfileIdByName(String profileName){
        Profile pro = null;
        try {
            pro = [
                select
                Id
                from Profile where Name =: profileName
            ];
            return pro.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
    }
    public class InitData{
@@ -688,5 +781,21 @@
        public String siDecideID;
        @AuraEnabled
        public String opportunityNo;
        @AuraEnabled
        public String systemProfileId;
        @AuraEnabled
        public String j3ProfileId;
        @AuraEnabled
        public String s62ProfileId;
        @AuraEnabled
        public String s61ProfileId;
        @AuraEnabled
        public String m4ProfileId;
        @AuraEnabled
        public String s4ProfileId;
        @AuraEnabled
        public String s1ProfileId;
        @AuraEnabled
        public String accountName;
    }
}
force-app/main/default/classes/ReportController.cls
@@ -77,8 +77,8 @@
        try {
            Report__c report = [select Status__c,VOC_Satisfy__c,VOC_Satisfy1__c from Report__c where Id = :recordId];
            res.status = report.Status__c;
            res.Satisfy = report.VOC_Satisfy__c;
            res.Satisfy1 = report.VOC_Satisfy1__c;
            res.satisfy = report.VOC_Satisfy__c;
            res.satisfy1 = report.VOC_Satisfy1__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -105,8 +105,8 @@
        InitData res = new InitData();
        try {
            Report__c report = [select OCSMAdministrativeReportNumber__c,OCSMAdministrativeReportDate__c,Aware_date__c from Report__c where Id = :recordId];
            res.OCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
            res.OCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
            res.theOCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
            res.theOCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
            res.awareDate = report.Aware_date__c;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -134,7 +134,7 @@
        InitData res = new InitData();
        try {
            Report__c report = [select OCSMAdministrativeReportStatus__c,AwareDate__C from Report__c where Id = :recordId];
            res.OCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
            res.theOCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
            res.awareDate = report.AwareDate__C;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -163,11 +163,11 @@
        try {
            PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c =  :recordId  And RecordType.DeveloperName = :developerName Order by LastModifiedDate desc];
            if (report != null && !report.isEmpty()) {
                res.LastModifiedDate = report[0].LastModifiedDate;
                res.Id = report[0].Id;
                res.Name = report[0].Name;
                res.LastModifiedById = report[0].LastModifiedById;
                res.DeveloperName = report[0].RecordType.DeveloperName;
                res.lastModifiedDate = report[0].LastModifiedDate;
                res.id = report[0].Id;
                res.name = report[0].Name;
                res.lastModifiedById = report[0].LastModifiedById;
                res.developerName = report[0].RecordType.DeveloperName;
            }
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -184,11 +184,11 @@
        try {
            PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c =  :recordId  And RecordType.DeveloperName = :recordTypeId Order by LastModifiedDate desc];
            if (report != null && !report.isEmpty()) {
                res.LastModifiedDate = report[0].LastModifiedDate;
                res.Id = report[0].Id;
                res.Name = report[0].Name;
                res.LastModifiedById = report[0].LastModifiedById;
                res.DeveloperName = report[0].RecordType.DeveloperName;
                res.lastModifiedDate = report[0].LastModifiedDate;
                res.id = report[0].Id;
                res.name = report[0].Name;
                res.lastModifiedById = report[0].LastModifiedById;
                res.developerName = report[0].RecordType.DeveloperName;
            }
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -379,15 +379,15 @@
    
    //VOC结果确认更新相应数据
    @AuraEnabled
    public static String updateForVOCConfirmButton(String recordId,String Satisfy,String Satisfy1){
    public static String updateForVOCConfirmButton(String recordId,String satisfy,String satisfy1){
        try {
            Report__c rac = new Report__c();
            rac.Id = recordId;
            if (Satisfy == LightingButtonConstant.CN_YES) {
            if (satisfy == LightingButtonConstant.CN_YES) {
                rac.Status__c = LightingButtonConstant.STATUS_VOC_CONFIRMED;
                } else if (Satisfy == LightingButtonConstant.CN_NO) {
                } else if (satisfy == LightingButtonConstant.CN_NO) {
                // 対応結果(一回目)に値なければ、一回目の「否」と見なす
                if (Satisfy1 != LightingButtonConstant.CN_NO) {
                if (satisfy1 != LightingButtonConstant.CN_NO) {
                Report__c[] records = [SELECT Id, VOC_Satisfy__c, VOC_Unsatisfy_Reason__c, VOC_follow_up_result__c, VOC_solution_category__c FROM Report__c WHERE Id = :recordId];
                rac.VOC_Satisfy__c = null;
                rac.VOC_Unsatisfy_Reason__c = null;
@@ -579,29 +579,29 @@
        @AuraEnabled
        public String ownerId;
        @AuraEnabled
        public String Satisfy;
        public String satisfy;
        @AuraEnabled
        public String Satisfy1;
        public String satisfy1;
        @AuraEnabled
        public String profileId;
        @AuraEnabled
        public String OCSMAdministrativeReportNumber;
        public String theOCSMAdministrativeReportNumber;
        @AuraEnabled
        public Date OCSMAdministrativeReportDate;
        public Date theOCSMAdministrativeReportDate;
        @AuraEnabled
        public Date awareDate;
        @AuraEnabled
        public String OCSMAdministrativeReportStatus;
        public String theOCSMAdministrativeReportStatus;
        @AuraEnabled
        public Datetime LastModifiedDate;
        public Datetime lastModifiedDate;
        @AuraEnabled
        public String Id;
        public String id;
        @AuraEnabled
        public String Name;
        public String name;
        @AuraEnabled
        public String LastModifiedById;
        public String lastModifiedById;
        @AuraEnabled
        public String DeveloperName;
        public String developerName;
        @AuraEnabled
        public String userId;
        @AuraEnabled
force-app/main/default/classes/lexLightingButtonConstant.cls
New file
@@ -0,0 +1,112 @@
public with sharing class lexLightingButtonConstant {
    //中标通知书的状态‘处理完毕’
    public static final String STATUS_Bid_Announcement_Consent = '处理完毕';
    //中标通知书的状态‘草案中’
    public static final String STATUS_Bid_Announcement_Reject = '草案中';
    //中标通知书的状态‘申请中’
    public static final String STATUS_Bid_Announcement_ApplyFor = '申请中';
    //授权申请的状态‘已提交’
    public static final String STATUS_Application_Submitted = '已提交';
    //授权申请的状态‘草案中’
    public static final String  STATUS_Application_CancelSubmit= '草案中';
    //授权申请的记录类型名‘授权申请’
    public static final String RECORD_TYPE_NAME_Application = '授权申请';
    //周报月报的状态‘草案中’
    public static final String STATUS_DRAFT = '草案中';
    //报告书的状态‘完毕’
     public static final String STATUS_COMPLETE = '完毕';
     //报告书的状态‘取消’
     public static final String STATUS_CANCEL = '取消';
     //OCSM报告的状态‘待报告’
     public static final String STATUS_TO_BE_REPORTED = '待报告';
     //OCSM报告的状态‘无需报告’
     public static final String STATUS_TO_NOT_REPORT = '无需报告';
     //VOC报告的状态‘结果确认完毕’
     public static final String STATUS_VOC_CONFIRMED = '结果确认完毕';
     //VOC报告的状态‘回答完毕’
     public static final String STATUS_VOC_END_OF_ANSWER = '回答完毕';
     //VOC报告的状态‘申请中’
     public static final String STATUS_VOC_APPLYING = '申請中';
     //VOC报告的状态‘判定完毕’
     public static final String STATUS_VOC_CHECK_OVER = '判定完毕';
     //VOC报告的状态‘填写完毕’
     public static final String STATUS_VOC_WRITE_OVER = '填写完毕';
     //备货申请的状态‘填写完毕’
     public static final String STOCK_APPLY_STATUS_WRITE_OVER = '填写完毕';
     //备货申请的状态‘草案中’
     public static final String STOCK_APPLY_STATUS_DRAFT = '草案中';
     //VOC报告的状态‘完毕’
     public static final String STATUS_VOC_FINISH = '完毕';
     //报价委托功能的状态‘草案中’
     public static final String QUOTEIRAI_STATUS_DRAFT = '草案中';
     //QIS的状态‘OSH检测中’
     public static final String STATUS_QIS_OSH_TESTING = 'OSH检测中';
     //QIS的状态‘OSH填写完毕’
     public static final String STATUS_QIS_OSH_COMPLATED = 'OSH填写完毕';
     //QIS的状态‘OSH检测申请’
     public static final String STATUS_QIS_OSH_TESTING_APP = 'OSH检测申请';
     //QIS的状态‘RC填写完毕’
     public static final String STATUS_QIS_RC_COMPLATED = 'RC填写完毕';
     //QIS的状态‘取消申请’
     public static final String STATUS_QIS_CANCEL = '取消申请';
     //QIS的状态‘RC检测中’
     public static final String STATUS_QIS_RC_CHECKING = 'RC检测中';
     //QIS的状态‘FSE填写完毕’
     public static final String STATUS_QIS_FSE_COMPLATED = 'FSE填写完毕';
     //QIS的状态‘完毕’
     public static final String STATUS_QIS_COMPLATED = '完毕';
    //招标项目的阶段补充说明‘3-1:废标公告’
    public static final String SUB_INFO_TYPE_SCRAPPED_LABEL = '3-1:废标公告';
    //招标项目的阶段补充说明‘3-2:流标公告’
    public static final String SUB_INFO_TYPE_FLOW_LABEL = '3-2:流标公告';
    //周报月报的记录类型名‘周报’
    public static final String RECORD_TYPE_NAME_BY_MONTHLY_REPORT = '周报';
    //报告书的记录类型‘提交’
    public static final String RECORD_TYPE_NAME_BY_SUBMIT = '提交';
     //报告书的记录类型‘跟台’
     public static final String RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE = '跟台';
      //报告书的记录类型‘OPD’
      public static final String RECORD_TYPE_NAME_BY_OPD= 'OPD';
      //QIS的记录类型‘3.OSH’
      public static final String RECORD_TYPE_NAME_BY_OSH= '3.OSH';
      //QIS的记录类型‘4.OSH回答完毕’
      public static final String RECORD_TYPE_NAME_BY_OSH_FINASH= '4.OSH回答完毕';
      //QIS的记录类型‘9.Final 完毕’
      public static final String RECORD_TYPE_NAME_BY_FINAL= '9.Final 完毕';
      //QIS的记录类型‘5.现场结案’
      public static final String RECORD_TYPE_NAME_BY_COMP= '5.现场结案';
    //记录类型的developerName‘ASRCDecision’
    public static final String DEVELOPER_NAME_ASRC_DECISION = 'ASRCDecision';
    //记录类型的developerName‘ASACDecision’
    public static final String DEVELOPER_NAME_ASAC_DECISION = 'ASACDecision';
    //工作分类的销售服务
    public static final String TYPE_OF_SALES_SERVICES = '销售服务';
    //userAccess参数后缀_Edit
    public static final String USER_ACCESS_EDIT = '_Edit';
    //userAccess参数后缀_Read
    public static final String USER_ACCESS_READ = '_Read';
    //任务的名字‘中标结果确认’
    public static final String TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID = '中标结果确认';
    //询价的ConfirmationofAward__c字段值‘OLY中标’
    public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_OLY_WIN_BID = 'OLY中标';
     //询价的ConfirmationofAward__c字段值‘竞争对手中标’
     public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_LOSE_BID = '竞争对手中标';
    public static final String PREDICTED_DATE_STATUS = '审批中';
    public static final String CN_YES = '是';
    public static final String CN_NO = '否';
    public static final String VOC_NAME = 'VOC';
    public static final String OK = 'OK';
    public static final String LU_SHENG_NAME = '陆 胜';
    public static final String HU_DI_AN_NAME = '胡 迪安';
    public static final String SYSTEM_PROFILE_NAME = '系统管理员';
    public static final String J3_PROFILE_NAME = '2J3_特约店窗口';
    public static final String S62_PROFILE_NAME = '2S6-2_营业助理';
    public static final String S61_PROFILE_NAME = '2S6-1_销售本部窗口';
    public static final String M4_PROFILE_NAME = '2M4_市场产品本部担当(询价)';
    public static final String S1_PROFILE_NAME = '2S1_销售医院担当';
    public static final String S4_PROFILE_NAME = '2S4_销售管理者';
    public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
    public static final String  SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
    public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '非对象';
    public static final String REPAIR_FIELD_SAP_CONDITION_IS_TRUE = 'true';
}
force-app/main/default/classes/lexLightingButtonConstant.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>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
@@ -1,14 +1,22 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 09:20:08
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForASACEditorButton';
export default class LexASACEditor extends LightningElement {
    @api recordId;
    LastModifiedDate
    Id
    Name
    LastModifiedById
    DeveloperName
    lastModifiedDate
    id
    name
    lastModifiedById
    developerName
    IsLoading = true;
    url;
    @wire(CurrentPageReference)
@@ -35,12 +43,11 @@
            console.log(result);
            if (result != undefined) {
                console.log("if");
                this.LastModifiedById = result.LastModifiedById;
                this.LastModifiedDate = result.LastModifiedDate;
                this.Id = result.Id;
                this.Name = result.Name;
                this.DeveloperName = result.DeveloperName;
                console.log(this.Id);
                this.lastModifiedById = result.lastModifiedById;
                this.lastModifiedDate = result.lastModifiedDate;
                this.id = result.id;
                this.name = result.name;
                this.developerName = result.developerName;
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
@@ -61,8 +68,8 @@
    }
    editor(){
        if (this.Id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
        if (this.id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            console.log(this.url);
            } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 09:22:15
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -5,11 +13,11 @@
export default class LexASRCEditor extends LightningElement {
    @api recordId;
    LastModifiedDate
    Id
    Name
    LastModifiedById
    DeveloperName
    lastModifiedDate
    id
    name
    lastModifiedById
    developerName
    IsLoading = true;
    url;
    @wire(CurrentPageReference)
@@ -36,12 +44,11 @@
            console.log(result);
            if (result != undefined) {
                console.log("if");
                this.LastModifiedById = result.LastModifiedById;
                this.LastModifiedDate = result.LastModifiedDate;
                this.Id = result.Id;
                this.Name = result.Name;
                this.DeveloperName = result.DeveloperName;
                console.log(this.Id);
                this.lastModifiedById = result.lastModifiedById;
                this.lastModifiedDate = result.lastModifiedDate;
                this.id = result.id;
                this.name = result.name;
                this.developerName = result.developerName;
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
@@ -62,8 +69,8 @@
    }
    editor(){
        if (this.Id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
        if (this.id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            console.log(this.url);
            } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
   <apiVersion>54.0</apiVersion>
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 14:51:44
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-19 09:11:02
 * @LastEditTime: 2023-05-11 13:46:32
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -37,6 +37,11 @@
    isCorrosion;
    profileId;
    ifAuthorizingLock;
    systemProfileId;
    j3ProfileId;
    s61ProfileId;
    s62ProfileId;
    m4ProfileId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -76,6 +81,11 @@
            this.isCorrosion = result.isCorrosion;
            this.profileId = result.profileId;
            this.ifAuthorizingLock = result.ifAuthorizingLock;
            this.systemProfileId = result.systemProfileId;
            this.j3ProfileId = result.j3ProfileId;
            this.s61ProfileId = result.s61ProfileId;
            this.s62ProfileId = result.s62ProfileId;
            this.m4ProfileId = result.m4ProfileId;
            this.AgencyAuthorize();
        })
    }
@@ -89,9 +99,10 @@
        var oppid = this.recordId;
        var angency = this.agency1Id;
        var profileId = this.profileId;
        if (profileId != '00e10000000Y3o5' && profileId != '00e10000000Nab7' && profileId != '00e10000000xnpR' && profileId != '00e10000000xyK6' && profileId != '00e10000000NbCE'
        && profileId != '00e10000000xyK6' && profileId != '00e10000000Nb7i') {
         //测试已锁定授权合同申请为“1”
        this.estimationId = 'test';
        this.detailNum = 1;
        if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) {
            this.showToast("您没有授权申请的权限。请联系系统管理员。","error");
            return;
        }
@@ -108,9 +119,10 @@
            this.showToast("耗材不可与奥辉产品同时存在!","error");
            return;
        } else if (this.cntLostCancelDraft > 0) {
        if(!confirm('询价有草案中的取消/失单报告,是否继续?')){
            return ;
        }
            if(!confirm('询价有草案中的取消/失单报告,是否继续?')){
                this.dispatchEvent(new CloseActionScreenEvent());
                return ;
            }
        } else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
            this.showToast('询价有已提交的取消/失单报告。',"error");
            return;
@@ -123,16 +135,11 @@
        } else if (this.salesRoot != '販売店') {
            this.showToast('医院直销不需要授权申请。',"error");
            return;
        }
        // else if ('{!Opportunity.AcecideCntCheck__c}' != '1') {
        // alert('阿西赛多询价只能包含危化品,或者,普通询价不能包含危化品。');
        // return;
        // }
        else if (this.ifSubmit == '1') {
        }else if (this.ifSubmit == '1') {
            this.showToast('上传失败,请联系系统管理员!',"error");
            return;
        }
        if (this.ifAuthorizingLock == 'true') {
        if (this.ifAuthorizingLock == true) {
            this.showToast('询价正在授权中,请不要重复提交。',"error");
            return;
        }
force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexAssignTaskButton from 'c/lexAssignTaskButton';
describe('c-lex-assign-task-button', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-assign-task-button', {
            is: LexAssignTaskButton
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="lexAssignTaskButtonHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
New file
@@ -0,0 +1,68 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-15 11:14:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 11:50:12
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/OpportunityLightingButtonController.initForAssignTaskButtonButton';
export default class LexAssignTaskButton extends LightningElement {
    @api recordId;
    accountName;
    accountId;
    oppName;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
     }
     connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result=>{
            this.accountId = result.accountId;
            this.accountName = result.accountName;
            this.oppName = result.name;
            this.assignTask();
        }).catch(error=>{
            console.log("error");
            console.log(error);
        });
     }
     assignTask(){
        //基础路径
        var url = '/setup/ui/recordtypeselect.jsp?ent=01I100000016llf';
        //记录类型
        url += '&p3=01210000000cWfw';
        url += '&retURL=%2F';
        url += '&save_new_url=%2Fa3V%2Fe%3FretURL%3D%252Fa3V%252Fo';
        //客户
        url += '&CF00N100000095tn6=' + this.accountName;
        url += '&CF00N100000095tn6_lkid=' + this.accountId;
        //询价
        url += '&CF00N100000095zcA=' + this.oppName;
        url += '&CF00N100000095zcA_lkid=' + this.recordId;
        //任务状态
        url += '&00N100000095tnR=01 分配';
        //任务区分
        url += '&00N100000095tnP=上级分配任务';
        //任务名称
        url += '&Name=*';
        window.open(url);
        this.dispatchEvent(new CloseActionScreenEvent());
     }
}
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
   <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
@@ -4,12 +4,12 @@
 * @Author: chen jing wu
 * @Date: 2023-04-13 15:08:43
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-14 15:37:35
 * @LastEditTime: 2023-05-11 15:49:41
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/OpportunityLightingButtonController.initFoBeforeOPDPDFBtnButton';
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForBeforeOPDPDFBtnButton';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import selectCommonSequence from '@salesforce/apex/ControllerUtil.selectCommonSequence';
import addReportOPWithEvaluationPDF from '@salesforce/apex/Add_Report.addReportOPWithEvaluationPDF';
force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
@@ -5,6 +5,7 @@
import queryForCancelReportButton  from '@salesforce/apex/OpportunityLightingButtonController.queryForCancelReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import ConSent from '@salesforce/apex/BidAnnouncementController.ConSent';
export default class LexCancelReport extends LightningElement {
    @api recordId;
    stageName;
@@ -40,19 +41,20 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            this.stageName = result.stageName;
            this.sapSendOK = result.sapSendOK;
            this.cntLostCancelDraft = result.cntLostCancelDraft;
            this.cntLostCancelReport = result.cntLostCancelReport;
            this.jobCategory = result.jobCategory;
            this.biddingProjectNameBid = result.biddingProjectNameBid;
            this.name = result.name;
            this.salesAssistantID = result.salesAssistantID;
            this.salesAssistantName = result.salesAssistantName;
            this.managerName = result.managerName;
            this.salesManagerDepartmentID = result.salesManagerDepartmentID;
            this.salesOwnerBuchang = result.salesOwnerBuchang;
            this.salesOwnerBuchangID = result.salesOwnerBuchangID;
            console.log(result);
            this.stageName = result.stageName == undefined ? '' : result.stageName;
            this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK;
            this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft;
            this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport;
            this.jobCategory = result.jobCategory == undefined ? '' : result.jobCategory;
            this.biddingProjectNameBid = result.biddingProjectNameBid == undefined ? '' : result.biddingProjectNameBid;
            this.name = result.name == undefined ? '' : result.name;
            this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID;
            this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName;
            this.managerName = result.managerName == undefined ? '' : result.managerName;
            this.salesManagerDepartmentID = result.salesManagerDepartmentID == undefined ? '' : result.salesManagerDepartmentID;
            this.salesOwnerBuchang = result.salesOwnerBuchang == undefined ? '' : result.salesOwnerBuchang;
            this.salesOwnerBuchangID = result.salesOwnerBuchangID == undefined ? '' : result.salesOwnerBuchangID;
            this.cancelReport();
        })
    }
@@ -83,17 +85,17 @@
                
            }
            else if (this.sapSendOK == '1') {
                this.showToast("已经上传SAP、不能做 取消 了!","");
                this.showToast("已经上传SAP、不能做 取消 了!","error");
            }
            else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
                this.showToast("询价已经有 取消/失单报告 了!","error");
            }
            else if (this.jobCategory == '支援') {
                this.showToast("询价所有人是助理的,先请修改到销售担当!","");
                this.showToast("询价所有人是助理的,先请修改到销售担当!","error");
            }
            //XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 start
            //else if({!NOT(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))}&& '{!Opportunity.subInfoType__c}' != '3-1:废标公告' &&'{!Opportunity.subInfoType__c}' != '3-2:流标公告'){
            else if(this.biddingProjectNameBid != undefined && sqlResult.size == 0){
            else if(this.biddingProjectNameBid != '' && sqlResult.length == 0){
                this.showToast("有招投标项目时只能做失单或部分失单报告!","error");
            }
            //XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 end
force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexChangeContractType from 'c/lexChangeContractType';
describe('c-lex-change-contract-type', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-change-contract-type', {
            is: LexChangeContractType
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
New file
@@ -0,0 +1,10 @@
.lexChangeContractTypeHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="lexChangeContractTypeHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
New file
@@ -0,0 +1,113 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-15 13:17:26
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 15:01:19
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/OpportunityLightingButtonController.initForChangeContractTypeButton';
import changeTrade from '@salesforce/apex/OpportunityWebService.changeTrade';
export default class LexChangeContractType extends LightningElement {
    @api recordId;
    stageName;
    estimationDecision;
    sapSendOK;
    ifAuthorizingLock;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result=>{
            this.stageName = result.stageName;
            this.estimationDecision = result.estimationDecision;
            this.sapSendOK = result.sapSendOK;
            this.ifAuthorizingLock = result.ifAuthorizingLock;
            this.changeContractType();
        }).catch(error=>{
            console.log("error");
            console.log(error);
        });
    }
    changeContractType(){
        var oppId = this.recordId;
        var str ;
        var status = this.stageName;
        var quostatus = this.estimationDecision;
        var win = this.sapSendOK;
        var Auth = this.ifAuthorizingLock;
        if(status != '引合'){
            this.showToast('只有状态1是询价的可以更改合同类型','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(Auth == '1'){
            this.showToast('询价正在授权申请中,请在SPO中驳回后再做转换。','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(quostatus == 'true' || quostatus == true){
            this.showToast('已决定报价,不能修改内贸/外贸','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(win == 'true' || win == true){
            this.showToast('请先取消WIN, 再转换内外贸','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(confirm('变更合同类型会删除全部报价,是否继续?')){
            changeTrade({
                oppId: oppId
            }).then(result=>{
                str = result;
                if(str != '1'){
                    this.showToast(str,"error");
                }
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
                window.location.href = 'https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Opportunity/' + this.recordId + '/view';
            }).catch(error=>{
                console.log("error");
                console.log(error);
            });
        }else{
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
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-05-10 17:05:09
 * @LastEditTime: 2023-05-12 15:25:47
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexCreateActivity from 'c/lexCreateActivity';
describe('c-lex-create-activity', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-create-activity', {
            is: LexCreateActivity
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="lexCreateActivityHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
New file
@@ -0,0 +1,51 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-15 09:50:42
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 10:34:33
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/OpportunityLightingButtonController.initForCreateActivityButton';
export default class LexCreateActivity extends LightningElement {
    @api recordId;
    accountId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result=>{
            console.log(result);
            this.accountId = result.accountId;
            this.createActivity();
        }).catch(error=>{
            console.log("error");
            console.log(error);
        });
    }
    createActivity(){
        window.open(
        "/apex/SimpleEventRegister?retURL=%2Fapex%2FVFClosePage&accid="
        + this.accountId + "&oid="
        + this.recordId + "&source=AccountPCL&save_new=1&sfdc.override=1");
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:33
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-11 14:48:31
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 14:08:55
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-24 13:58:53
 * @LastEditTime: 2023-05-12 11:35:46
 */
/*
 * @Description: 
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -60,13 +60,13 @@
            if(this.closeForecastedDate == undefined){
                this.closeForecastedDate = '';
            }else{
                this.closeForecastedDate = new String(this.closeForecastedDate).replace("-","/");
                this.closeForecastedDate = new String(this.closeForecastedDate).replaceAll("-","/");
            }
            console.log(this.closeForecastedDate);
            if(this.bidPlannedDate == undefined){
                this.bidPlannedDate = '';
            }else{
                this.bidPlannedDate = new String(this.bidPlannedDate).replace("-","/");
                this.bidPlannedDate = new String(this.bidPlannedDate).replaceAll("-","/");
            }
            if(this.dealerFinalPrice == undefined){
                this.dealerFinalPrice = '';
@@ -86,14 +86,17 @@
            if (this.agency1Id == undefined) {
                newflag = false;
                this.showToast("经销商不存在,不能转成【经销商目标询价】。","error");
                this.dispatchEvent(new CloseActionScreenEvent());
            }
            else if (this.agencyOpportunity != undefined) {
                newflag = false;
                this.showToast("已经转成过【经销商目标询价】。","error");
                this.dispatchEvent(new CloseActionScreenEvent());
            }
            else if (this.trade != '内貿') {
                newflag = false;
                this.showToast("不是内贸,不能转成【经销商目标询价】。","error");
                this.dispatchEvent(new CloseActionScreenEvent());
            }
            else {
                var records = null;
@@ -103,9 +106,11 @@
                    hospitalId: this.hospitalId
                }).then(result=>{
                    records = result;
                    console.log(records.length);
                    if (records == null || records.length == 0) {
                        newflag = false;
                        this.showToast("没有有效的【经销商医院】。","error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
                    if (newflag) {
                        console.log("5");
@@ -118,6 +123,7 @@
                            var recTypeList = result;
                            if (recTypeList.length == 0) {
                                    this.showToast("没有找到,经销商询价的定义。","error");
                                    this.dispatchEvent(new CloseActionScreenEvent());
                                } else {
                                    console.log("7");
                                    queryForRecords2({
@@ -198,6 +204,7 @@
                                            + encodeURIComponent(this.opportunityCategory);
                                            console.log(url);
                                            window.open(url);
                                            this.dispatchEvent(new CloseActionScreenEvent());
                                        } catch (error) {
                                            console.log(error)
                                        }
@@ -206,10 +213,8 @@
                        })  
                    }
                });
                console.log("4");
            }
        this.IsLoading = false;
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-03-28 15:59:44
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-09 15:20:58
 * @LastEditTime: 2023-05-15 09:15:58
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,9 +17,9 @@
export default class LexOCSMNoToReportForReport extends LightningElement {
    @api recordId;
    IsLoading = true;
    OCSMAdministrativeReportNumber;
    OCSMAdministrativeReportDate;
    AwareDate;
    theOCSMAdministrativeReportNumber;
    theOCSMAdministrativeReportDate;
    awareDate;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -46,9 +46,9 @@
            recordId: this.recordId
        }).then(result=>{
            console.log(result);
            this.OCSMAdministrativeReportDate = result.OCSMAdministrativeReportDate;
            this.OCSMAdministrativeReportNumber = result.OCSMAdministrativeReportNumber;
            this.AwareDate = result.awareDate;
            this.theOCSMAdministrativeReportDate = result.theOCSMAdministrativeReportDate;
            this.theOCSMAdministrativeReportNumber = result.theOCSMAdministrativeReportNumber;
            this.awareDate = result.awareDate;
            this.noToReport();
        }).catch(error=>{
            console.log(error);
@@ -74,13 +74,13 @@
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(this.OCSMAdministrativeReportNumber != undefined || this.OCSMAdministrativeReportDate != undefined ){
        if(this.theOCSMAdministrativeReportNumber != undefined || this.theOCSMAdministrativeReportDate != undefined ){
            this.showToast("已经报告的QIS,不可以点击OCSM不要报告。","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        this.AwareDate = Date.now();
        if(this.AwareDate != undefined ){
        this.awareDate = Date.now();
        if(this.awareDate != undefined ){
           updateForOCSMNoToReportButton({
                recordId: this.recordId
           }).then(result=>{
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 11:26:11
 * @LastEditTime: 2023-05-15 09:17:27
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -16,7 +16,7 @@
export default class LexOCSMToReport extends LightningElement {
    @api recordId;
    IsLoading = true;
    OCSMAdministrativeReportStatus;
    theOCSMAdministrativeReportStatus;
    awareDate;
@@ -43,7 +43,7 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
                this.theOCSMAdministrativeReportStatus = result.theOCSMAdministrativeReportStatus;
                this.awareDate = result.awareDate;
                this.toReport();
            }
@@ -75,7 +75,7 @@
            return;
            }
        if(this.OCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
        if(this.theOCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
            updateForOCSMToReportButton({
                recordId: this.recordId
            }).then(result =>{
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-05-10 17:38:56
 * @LastEditTime: 2023-05-15 11:06:07
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -41,16 +41,17 @@
            recordId: this.recordId
        }).then(result=>{
            console.log(result);
            this.authorizedDBNo = result.authorizedDBNo;
            this.estimationDecision = result.estimationDecision;
            this.siDecideID = result.siDecideID;
            this.name = result.name;
            this.opportunityNo = result.opportunityNo;
            this.isAuthorized = result.isAuthorized;
            this.authorizedDBNo = result.authorizedDBNo == undefined ? '' : result.authorizedDBNo;
            this.estimationDecision = result.estimationDecision == undefined ? '' : result.estimationDecision;
            this.siDecideID = result.siDecideID == undefined ? '' : result.siDecideID;
            this.name = result.name == undefined ? '' : result.name;
            this.opportunityNo = result.opportunityNo == undefined ? '' : result.opportunityNo;
            this.isAuthorized = result.isAuthorized == undefined ? '' : result.isAuthorized;
            this.opporSplite();
        })
    }
    opporSplite(){
        this.authorizedDBNo = 'test';
        if(this.recordId == '已终止'){
            this.showToast("需求表已终止,不能拆单","error");
        }else if(this.authorizedDBNo == ''){
@@ -60,8 +61,10 @@
        }else if(this.siDecideID == ''){
            this.showToast("需求表未批准,不能拆单","error");
        }else if(this.recordId != '草案中' && this.recordId != '已提交' && this.recordId != '已终止'){
            console.log("sss");
            window.open(
                    this.recordId
                    "/"
                    + this.recordId
                    + "/e?clone=1&retURL=%2F" 
                    + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai=" 
                    + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR=" 
@@ -69,7 +72,7 @@
                    + this.recordId + "&00N10000006qHav=" 
                    + this.opportunityNo + "&00N10000009Glvn=" 
                    + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
                );
            );
        }
        this.dispatchEvent(new CloseActionScreenEvent());
    }
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-14 17:15:33
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-14 17:20:45
 * @LastEditTime: 2023-05-12 14:43:54
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-14 11:09:28
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-14 11:21:24
 * @LastEditTime: 2023-05-12 13:17:30
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -37,8 +37,8 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            this.biddingProjectNameBidId = result.biddingProjectNameBidId;
            this.estimationId = result.estimationId;
            this.biddingProjectNameBidId = result.biddingProjectNameBidId == undefined ? '' : result.biddingProjectNameBidId;
            this.estimationId = result.estimationId == undefined ? '' : result.estimationId;
            this.quotationRequest();
        })
    }
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
@@ -18,6 +18,9 @@
    salesAssistantName;
    salesAssistantID;
    profileId;
    systemProfileId;
    s1ProfileId;
    s4ProfileId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
@@ -37,31 +40,35 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            this.stageName = result.stageName;
            this.sapSendOK = result.sapSendOK;
            this.cntLostCancelReport = result.cntLostCancelReport;
            this.cntLostCancelDraft = result.cntLostCancelDraft;
            this.agency1 = result.agency1;
            this.agency1Id = result.agency1Id;
            this.name = result.name;
            this.bidPlannedDate = result.bidPlannedDate;
            this.salesAssistantName = result.salesAssistantName;
            this.salesAssistantID = result.salesAssistantID;
            this.profileId = result.profileId;
            console.log(result);
            this.stageName = result.stageName == undefined ? '' : result.stageName;
            this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK;
            this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport;
            this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft;
            this.agency1 = result.agency1 == undefined ? '' : result.agency1;
            this.agency1Id = result.agency1Id == undefined ? '' : result.agency1Id;
            this.name = result.name == undefined ? '' : result.name;
            this.bidPlannedDate = result.bidPlannedDate == undefined ? '' : result.bidPlannedDate.replace(/-/g, '/');;
            this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName;
            this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID;
            this.profileId = result.profileId == undefined ? '' : result.profileId;
            this.systemProfileId = result.systemProfileId == undefined ? '' : result.systemProfileId;
            this.s1ProfileId = result.s1ProfileId == undefined ? '' : result.s1ProfileId;
            this.s4ProfileId = result.s4ProfileId == undefined ? '' : result.s4ProfileId;
            this.requestDB();
        })
    }
    requestDB(){
        var profileId = this.profileId;
        if (profileId != '00e10000000Y3o5' && profileId != '00e10000000xnp2' &&
        profileId != '00e10000000xnpH') {
        if (profileId != this.systemProfileId && profileId != this.s1ProfileId &&
        profileId != this.s4ProfileId) {
            this.showToast("您没有授权委托的权限。请联系系统管理员。","error");
        }
        // jsの場合、翻訳された値がでるので、要注意
        else if (this.stageName != '引合'
        && this.stageName != '询价'
        ) {
            this.showToast("状态1:" + this.stageName + "、不能做授权申请!","");
            this.showToast("状态1:" + this.stageName + "、不能做授权申请!","error");
        }
        else if (this.sapSendOK == '1') {
            this.showToast("已经上传SAP、不能做授权申请了!","error");
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-03-27 14:08:56
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-09 10:04:33
 * @LastEditTime: 2023-05-15 09:13:55
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,8 +17,8 @@
export default class LexVOCConfirm extends LightningElement {
    @api recordId;
    status;
    VOCSatisfy;
    VOCSatisfy1;
    satisfy;
    satisfy1;
    Isloading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -46,11 +46,8 @@
            console.log(result);
            if (result != null) {
                this.status = result.status;
                this.VOCSatisfy = result.Satisfy;
                this.VOCSatisfy1 = result.Satisfy1;
                console.log(this.VOCSatisfy);
                console.log(this.VOCSatisfy1);
                console.log(this.status);
                this.satisfy = result.satisfy;
                this.satisfy1 = result.satisfy1;
                this.update();
            }
        }).catch(error => {
@@ -80,15 +77,15 @@
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
            if (this.VOCSatisfy == undefined) {
            if (this.satisfy == undefined) {
            this.showToast("请选择是否满意","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
        updateForVOCConfirmButton({
            recordId: this.recordId,
            Satisfy: this.VOCSatisfy,
            Satisfy1: this.VOCSatisfy1
            satisfy: this.sSatisfy,
            satisfy1: this.satisfy1
        }).then(result=>{
            if(result){
                this.showToast(result,"error");