19626
2023-10-09 25f056535350a0b80bad50d2cc45311998e5d1cd
近期修改
24个文件已添加
28个文件已修改
1754 ■■■■ 已修改文件
force-app/main/default/aura/taskManage/taskManageHelper.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MonthlyReportControllerTest.cls 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MonthlyReportControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonController.cls 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/PCLLostReportController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexAccountController.cls 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexAccountControllerTest.cls 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexAccountControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexCaseController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexCaseControllerTest.cls 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexCaseControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLookupControllerTest.cls 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLookupControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexPCLLostReportLwcController.cls 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexRentalApplyController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexRentalApplyControllerTest.cls 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexRentalApplyControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammaController.cls 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammeController.cls 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexEditLost/lexEditLost.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLightningLink/lexLightningLink.html 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLightningLink/lexLightningLink.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html 377 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/tenderLost/tenderLost.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetMaintain.page 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/LostCreatePage1.page 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/LostEditPage1.page 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/LostViewPage1.page 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MaintenanceProductData.page 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/searchAimsAccount.page 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/taskManage/taskManageHelper.js
@@ -992,7 +992,7 @@
                    this.showErrorToast(cmp);
                }else{
                    
                    window.open('/apex/PCLLostReportPageLwc?pageStatus=Create&oppId=' + returnValue + '&lostType=失单','_blank');
                    window.open('/lightning/n/PCLLostReportPageLwc#pageStatus=Create&oppId=' + returnValue + '&lostType=失单','_blank');
                }
            }else if (state === "ERROR") {
force-app/main/default/classes/MonthlyReportControllerTest.cls
New file
@@ -0,0 +1,10 @@
@isTest
private class MonthlyReportControllerTest {
    @TestSetup
    static void makeData(){
    }
    static testMethod void test1(){
    }
}
force-app/main/default/classes/MonthlyReportControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,23 +4,30 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 11:16:07
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-25 13:20:57
 * @LastEditTime: 2023-10-08 18:09:35
 */
public with sharing class OpportunityLightingButtonController {
    @AuraEnabled
    public static List<Lost_cancel_report__c> queryForEditLostButton(String recordId){
        List<Lost_cancel_report__c> res = new List<Lost_cancel_report__c>();
    public static Map<String,Object> queryForEditLostButton(String recordId){
        Map<String,Object> objs = new Map<String,Object>();
        Report1 rep = new Report1();
        try {
            List<Lost_cancel_report__c> re = [
                select id,
                Report_Status__c,
                RecordTypeId 
                from Lost_cancel_report__c where RecordTypeId != '01210000000R4hHAAS' and Opportunity__c =: recordId];
            res = re;
            rep.lostReport = re;
            objs.put('report',rep);
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            objs.put('error',e.getMessage());
            return objs;
        }
        return res;
        return objs;
    }
    public class Report1{
        @AuraEnabled
        public List<Lost_cancel_report__c> lostReport;
    }
    @AuraEnabled
    public static InitData initForPredictedDateChangeButton(String recordId){
@@ -34,7 +41,7 @@
            res.createdDay = opportunity.Created_Day__c;
            res.directLossFLG = opportunity.DirectLossFLG__c;
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -99,7 +106,7 @@
            res.s62ProfileId = getProfileIdByName(lexLightingButtonConstant.S62_PROFILE_NAME);
            res.m4ProfileId = getProfileIdByName(lexLightingButtonConstant.M4_PROFILE_NAME);
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -114,7 +121,7 @@
            ];
            res.ifOpenBid = opportunity.ifOpenBid__c;
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -129,7 +136,7 @@
            ];
            res.ifOpenBid = opportunity.ifOpenBid__c;
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -143,7 +150,7 @@
                from Opportunity where Id =: recordId];
            res.accountId = opportunity.AccountId;
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -159,7 +166,7 @@
            res.accountId = opportunity.AccountId;
            res.userId = UserInfo.getUserId();
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -175,7 +182,7 @@
            res.accountId = opportunity.AccountId;
            res.userId = UserInfo.getUserId();
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -213,7 +220,7 @@
            res.s4ProfileId = getProfileIdByName(lexLightingButtonConstant.S4_PROFILE_NAME);
            res.recordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_AUTHORIZATION_REQUEST).getRecordTypeId();
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return res;
    }
@@ -253,7 +260,7 @@
        res.salesOwnerBuchangID = opportunity.Sales_owner_buchangID__c;
        res.recordTypeId = Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OPPO_CANCEL_REPORT).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -288,7 +295,7 @@
            res.salesOwnerBuchangID = opportunity.Sales_owner_buchangID__c;
            res.cntLostCancelDraft = opportunity.Cnt_Lost_cancel_Draft__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -311,7 +318,7 @@
            res.recordTypeId = opportunity.RecordTypeId;
            res.estimationDecisionc = opportunity.Estimation_Decision__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -335,7 +342,7 @@
            res.biddingProjectNameBidId = opportunity.Bidding_Project_Name_Bid__r.Id;
            res.estimationId = opportunity.Estimation_Id__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -352,7 +359,7 @@
            res.stockApplyStatus = opportunity.Stock_apply_status__c;
            res.lastOpportunityFileId = opportunity.Last_opportunity_file__r.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -371,7 +378,7 @@
            res.reportForCNYId = cnyReport.Id;
            res.reportForUSDId = usdReport.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -390,7 +397,7 @@
            res.sapSendOK = oppo.SAP_Send_OK__c;
            res.isAuthorized = oppo.IsAuthorized__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -428,7 +435,7 @@
            res.opportunityCategory = opp.Opportunity_Category__c;
            res.agency1Name = opp.Agency1__r.Name;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -453,7 +460,7 @@
            res.opportunityNo = oppo.Opportunity_No__c;
            res.isAuthorized = oppo.IsAuthorized__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -468,7 +475,7 @@
            ];
            res.accountId = opp.AccountId;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -492,7 +499,7 @@
            res.name = opp.Name;
            // res.recordTypeId = Schema.SObjectType.Task.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -513,7 +520,7 @@
            res.sapSendOK = opp.SAP_Send_OK__c;
            res.ifAuthorizingLock = opp.If_Authorizing_Lock__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -530,7 +537,7 @@
            res.oppForecastStatus = opp.Forecast_this_month__c;
            res.recordTypeId = Schema.SObjectType.OpportunitySpecialApply__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -549,7 +556,7 @@
            res.oppForecastStatus = ach.Monthly_forecast_shipping__c;
            res.recordTypeId = Schema.SObjectType.OpportunitySpecialApply__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE_ACH).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -564,7 +571,7 @@
            ];
            res.stockApplyStatus = opp.Stock_apply_status__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
@@ -579,10 +586,7 @@
            update opp;
            return null;
        } catch (Exception e) {
            String eMessage = e.getMessage();
            Integer left  = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -594,10 +598,7 @@
            update opp;
            return null;
        } catch (Exception e) {
            String eMessage = e.getMessage();
            Integer left = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -611,10 +612,7 @@
            update opp;
            return null;
        } catch (Exception e) {
            String eMessage = e.getMessage();
            Integer left = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -630,10 +628,7 @@
            update opp;
            return null;
        } catch (Exception e) {
            String eMessage = e.getMessage();
            Integer left = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -645,7 +640,7 @@
                id 
                from InquiryPredictsDateChange__c where Predicted_Date_Status__c = :LightingButtonConstant.PREDICTED_DATE_STATUS and Opportunity__c =:recordId];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return rac;
    }
@@ -659,7 +654,7 @@
                taskStatus__c
                from task__c where OpportunityId__c =: recordId and name like :obscureName];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return tasks;
    }
@@ -673,7 +668,7 @@
                taskStatus__c
                from task__c where OpportunityId__c =: recordId and name like :obscureName];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return tasks;
    }
@@ -688,7 +683,7 @@
                where (Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_SCRAPPED_LABEL OR Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_FLOW_LABEL OR Tender_information__r.TerminateApprovalStatus__c= :lexLightingButtonConstant.SUB_INFO_TYPE_APPROVE) and Opportunity__c =: recordId
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return links;
    }
@@ -703,7 +698,7 @@
                from QuoteIrai__c where Note__c like :opportunityId and QuoteIrai_Status__c =:lexLightingButtonConstant.QUOTEIRAI_STATUS_DRAFT
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return quotes;
    }
@@ -719,7 +714,7 @@
                FROM Agency_Hospital_Link__c WHERE Agency__c =: agency1Id AND Hospital__c =: hospitalId
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return links;
    }
@@ -734,7 +729,7 @@
                Name FROM RecordType WHERE SobjectType =: sobjectType And developerName=: developerName And IsActive =: isActive 
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return types;
    }
@@ -750,7 +745,7 @@
                DurableId From FieldDefinition WHERE EntityDefinition.QualifiedApiName =: qualifiedApiName
            ];
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
        return fields;
    }
@@ -763,10 +758,7 @@
            processResults.add(Approval.process(request));
            return processResults[0].errors;
        } catch (Exception e) {
            String eMessage = e.getMessage();
            Integer left = eMessage.indexOf(',') + 1;
            Integer right = eMessage.length();
            return eMessage.substring(left,right);
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -780,7 +772,7 @@
            ];
            return user.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -794,7 +786,7 @@
            ];
            return pro.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            return errorMessage(e);
        }
    }
    @AuraEnabled
@@ -808,7 +800,7 @@
            Quote qu = [select Have_Virtual__c from Quote where Id =: estimationId];
            bo = qu.Have_Virtual__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return bo;
    }
@@ -872,7 +864,7 @@
            }
            return s;
        } catch (Exception e) {
            System.debug(e.getMessage());
        }
        return s;
    }
@@ -939,9 +931,25 @@
            return '1';     
        } catch (Exception ex) {
            Database.rollback(sp);
            return  ex.getMessage() + ' | Line:' + ex.getLineNumber();
            return errorMessage(ex);
        }
    }
    public static string errorMessage(Exception e){
        if (e.getMessage().contains(',')) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            String exc = '' + e.getMessage();
            Integer left = exc.indexOf(':') + 1;
            Integer right = exc.lastIndexOf(':');
            String str = exc.substring(left,right);
            left = str.indexOf(',') +  1;
            String newStr = str.substring(left);
            return newStr;
        }else {
            return e.getMessage();
        }
    }
    public class InitData{
        @AuraEnabled
        public Boolean directLossFLG;
force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls
New file
@@ -0,0 +1,117 @@
@isTest
private class OpportunityLightingButtonControllerTest {
    @TestSetup
    static void makeData(){
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        // if (rectCo.size() == 0) {
        //     return;
        // }
        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科'];
        // if (rectSct.size() == 0) {
        //     return;
        // }
        List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科'];
        // if (rectDpt.size() == 0) {
        //     return;
        // }
        List<RecordType> rectAgency = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        // if (rectAgency.size() == 0) {
        //     return;
        // }
        // テストデータ
        Account company = new Account();
        company.RecordTypeId = rectCo[0].Id;
        company.Name         = 'NFM206TestCompany';
        insert company;
        Account section = new Account();
        section.RecordTypeId = rectSct[0].Id;
        section.Name         = '*';
        section.Department_Class_Label__c = '消化科';
        section.ParentId                  = company.Id;
        section.Hospital_Department_Class__c = company.Id;
        insert section;
        Account depart = new Account();
        depart.RecordTypeId = rectDpt[0].Id;
        depart.Name         = '*';
        depart.Department_Name__c  = 'NFM206TestDepart';
        depart.ParentId            = section.Id;
        depart.Department_Class__c = section.Id;
        depart.Hospital__c         = company.Id;
        insert depart;
        Date today = Date.today();
        Date lastDate1 = Date.today().addMonths(1);
        Date lastDate2 = Date.today().addMonths(2);
        Date lastDate3 = Date.today().addMonths(3);
        Account account2  = new Account();
        account2.Name = 'test1经销商';
        account2.RecordTypeId = rectAgency[0].id;
        insert account2;
        Opportunity opp = new Opportunity();
        opp.AccountId           = depart.Id;
        opp.Department_Class__c = section.Id;
        opp.Hospital__c         = company.Id;
        opp.SAP_Send_OK__c      = false;
        opp.Name                = 'GZ-SP-NFM009_0';
        opp.agency1__c             =  account2.Id;
        opp.Trade__c            = '内貿';
        opp.StageName           = '出荷';
        opp.CloseDate           = lastDate1;
        opp.Close_Forecasted_Date__c = lastDate1;
        opp.Stock_apply_status__c = '申请中';
        insert opp;
    }
    static testMethod void test1(){
        List<Opportunity> oppList = new List<Opportunity>();
        oppList = [select Id from Opportunity limit 1];
        Test.startTest();
        OpportunityLightingButtonController.queryForEditLostButton(oppList[0].Id);
        OpportunityLightingButtonController.initForPredictedDateChangeButton(oppList[0].Id);
        OpportunityLightingButtonController.initForAgencyAuthorizeButton(oppList[0].Id);
        OpportunityLightingButtonController.initForLoseBidButton(oppList[0].Id);
        OpportunityLightingButtonController.initForOLYwinBidButton(oppList[0].Id);
        OpportunityLightingButtonController.initForCreateEventButton(oppList[0].Id);
        OpportunityLightingButtonController.initForBeforeOPDPDFBtnButton(oppList[0].Id);
        OpportunityLightingButtonController.initFoBeforeOPDPDFBtnSISButton(oppList[0].Id);
        OpportunityLightingButtonController.initForRequestDBButton(oppList[0].Id);
        OpportunityLightingButtonController.initForCancelReportButton(oppList[0].Id);
        OpportunityLightingButtonController.initForLostReportButton(oppList[0].Id);
        OpportunityLightingButtonController.initForLexQuoteEntryNewbotton(oppList[0].Id);
        OpportunityLightingButtonController.initForQuotationRequestButton(oppList[0].Id);
        OpportunityLightingButtonController.initForStockApplyButton(oppList[0].Id);
        OpportunityLightingButtonController.initForQuotationProductNewButton(oppList[0].Id);
        OpportunityLightingButtonController.initForCopyWithAssetButton(oppList[0].Id);
        OpportunityLightingButtonController.initForNewOpportunityAgencyButton(oppList[0].Id);
        OpportunityLightingButtonController.initForOpporSpliteButton(oppList[0].Id);
        OpportunityLightingButtonController.initForCreateActivityButton(oppList[0].Id);
        OpportunityLightingButtonController.initForAssignTaskButtonButton(oppList[0].Id);
        OpportunityLightingButtonController.initForChangeContractTypeButton(oppList[0].Id);
        OpportunityLightingButtonController.initForSpecilaApplyCreateButton(oppList[0].Id);
        OpportunityLightingButtonController.initForSpecilaApplyCreateAchButton(oppList[0].Id);
        OpportunityLightingButtonController.initForNewOpportunityFileButton(oppList[0].Id);
        OpportunityLightingButtonController.updateForAgencyAuthorizeButton(oppList[0].Id);
        OpportunityLightingButtonController.updateForLoseBidButton(oppList[0].Id);
        OpportunityLightingButtonController.updateForOLYwinBidButton(oppList[0].Id);
        OpportunityLightingButtonController.updateForStockApplyButton(oppList[0].Id,true);
        OpportunityLightingButtonController.queryForPredictedDateChangeButton(oppList[0].Id);
        OpportunityLightingButtonController.queryForLoseBidButton(oppList[0].Id);
        OpportunityLightingButtonController.queryForOLYwinBidButton(oppList[0].Id);
        OpportunityLightingButtonController.queryForCancelReportButton(oppList[0].Id);
        OpportunityLightingButtonController.queryForQuotationRequestButton(oppList[0].Id);
        OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords(oppList[0].Id,'');
        OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords2(oppList[0].Id);
        OpportunityLightingButtonController.submitProcess(oppList[0].Id);
        OpportunityLightingButtonController.getUserIdByName(oppList[0].Id);
        OpportunityLightingButtonController.getProfileIdByName(oppList[0].Id);
        OpportunityLightingButtonController.queryForProfileId();
        OpportunityLightingButtonController.initCopy(oppList[0].Id);
        OpportunityLightingButtonController.forma(oppList[0].Id);
        OpportunityLightingButtonController.changeTrade(oppList[0].Id);
        OpportunityLightingButtonController.queryQuote('');
        OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecTypeList('Product','',true);
        Test.stopTest();
    }
}
force-app/main/default/classes/OpportunityLightingButtonControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/PCLLostReportController.cls
@@ -536,7 +536,7 @@
        LostReport.LostBrands = tempBrands;
        // 这里需要写一些报错信息
        System.debug('---lt123---'+ex.getLineNumber());
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,ex.getMessage()));
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,ex.getLineNumber() + ''));
        return false;
      }
      return true;
force-app/main/default/classes/lexAccountController.cls
@@ -10,7 +10,7 @@
            ]; 
            res.name = acc.Name;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
@@ -30,7 +30,7 @@
            res.hospitalId = acc.Hospital__r.Id;
            res.hospitalOCMCategory = acc.Hospital__r.OCM_Category__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
@@ -40,7 +40,7 @@
        try {
           res.recordTypeId = Schema.SObjectType.Account_Number_of_case__c.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OTHER).getRecordTypeId(); 
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
@@ -71,7 +71,7 @@
                res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_URO).getRecordTypeId(); 
            }        
         } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
         }
         return res;
        
@@ -84,11 +84,11 @@
        try{
            res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_CON).getRecordTypeId(); 
        }catch(Exception e){
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String hospitalSalesdepartmentHP;
        @AuraEnabled
force-app/main/default/classes/lexAccountControllerTest.cls
New file
@@ -0,0 +1,33 @@
@isTest
private class lexAccountControllerTest {
    @TestSetup
    static void makeData(){
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
            return;
        }
        // テストデータ
        Account company = new Account();
        company.RecordTypeId = rectCo[0].Id;
        company.Name         = 'TestCompany';
        upsert company;
    }
    static testMethod void test1(){
        Account company = [select Id from Account limit 1];
        Test.startTest();
        lexAccountController.init(company.Id);
        lexAccountController.initForNewSolutonProButton(company.Id);
        lexAccountController.initForOTHCreateButton(company.Id);
        lexAccountController.initForRepairContact(company.Id);
        lexAccountController.initForDepartmentCreate(company.Id,'BF');
        lexAccountController.initForDepartmentCreate(company.Id,'ENT');
        lexAccountController.initForDepartmentCreate(company.Id,'GI');
        lexAccountController.initForDepartmentCreate(company.Id,'GS');
        lexAccountController.initForDepartmentCreate(company.Id,'GYN');
        lexAccountController.initForDepartmentCreate(company.Id,'OTH');
        lexAccountController.initForDepartmentCreate(company.Id,'URO');
        lexAccountController.initForDepartmentCreate('','');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexAccountControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexCaseController.cls
@@ -16,11 +16,11 @@
            res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_VOC).getRecordTypeId();
            // res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().toString();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String department;
        @AuraEnabled
force-app/main/default/classes/lexCaseControllerTest.cls
New file
@@ -0,0 +1,11 @@
@isTest
private class lexCaseControllerTest {
    static testMethod void test1(){
        Case cic = new Case();
        insert cic;
        Test.startTest();
        lexCaseController.initForCreateVOCFromCIC(cic.Id);
        lexCaseController.initForCreateVOCFromCIC('');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexCaseControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexLookupControllerTest.cls
New file
@@ -0,0 +1,8 @@
@isTest
private class lexLookupControllerTest {
    static testMethod void test1(){
        Test.startTest();
        lexLookupController.getRecordsByName('Product2','STO','STORZ');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexLookupControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
@@ -14,7 +14,7 @@
            res.isUploadFile = opp.Is_upload_file__c;
            res.status = opp.Status__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls
New file
@@ -0,0 +1,115 @@
@isTest
private class lexOpportunitySpecialApplyControllerTest {
    @TestSetup
    static void makeData(){
        ControllerUtil.EscapeNFM001Trigger = true;
        StaticParameter.EscapeOppandStaTrigger = true;
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
            return;
        }
        List<RecordType> rectCo1 = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Agency'];
        if (rectCo1.size() == 0) {
            return;
        }
        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科'];
        if (rectSct.size() == 0) {
            return;
        }
        List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科'];
        if (rectDpt.size() == 0) {
            return;
        }
        List<RecordType> rectSpec = [select Id from RecordType where IsActive = true and SobjectType = 'OpportunitySpecialApply__c' and Name = '注残特殊对应'];
        if (rectDpt.size() == 0) {
            return;
        }
        // テストデータ
        Account company = new Account();
        company.RecordTypeId = rectCo[0].Id;
        company.Name         = 'TestCompany';
        upsert company;
        Account company1 = new Account();
        company1.RecordTypeId = rectCo1[0].Id;
        company1.Name         = 'TestCompany1';
        upsert company1;
        Account section = new Account();
        section.RecordTypeId = rectSct[0].Id;
        section.Name         = '*';
        section.Department_Class_Label__c = '消化科';
        section.ParentId                  = company.Id;
        section.Hospital_Department_Class__c = company.Id;
        upsert section;
        Account depart = new Account();
        depart.RecordTypeId = rectDpt[0].Id;
        depart.Name         = '*';
        depart.Department_Name__c  = 'TestDepart';
        depart.ParentId            = section.Id;
        depart.Department_Class__c = section.Id;
        depart.Hospital__c         = company.Id;
        upsert depart;
        Opportunity opp = new Opportunity();
        opp.AccountId           = depart.Id;
        opp.Department_Class__c = section.Id;
        opp.Hospital__c         = company.Id;
        opp.Name                = 'GZ-SP-NFM007_1';
        opp.Trade__c            = '内貿';
        opp.StageName           = '引合';
        opp.CloseDate           = date.today().adddays(1);
        opp.Agency1__c          = company1.Id;
        insert opp;
        //注残
        Statu_Achievements__c Sac2 = new Statu_Achievements__c();
        Sac2.name = 'zhucan_two';
        Sac2.Opportunity__c = opp.id;
        Sac2.DeliveryDate__c = Date.today();
        Sac2.ContractNO__c = 'ContractNO1';
        Sac2.ContractAmount__c = 1;
        insert Sac2;
        OpportunitySpecialApply__c spec = new OpportunitySpecialApply__c();
        spec.Status__c = '草案中';
        spec.Apply_Content__c = '删除本月订货预测';
        spec.Apply_Reason__c = 'NMPA影响';
        spec.Opportunity__c = opp.Id;
        spec.Achievements__c = Sac2.Id;
        spec.Approval_Date__c = Date.today();
        insert spec;
        spec.Status__c = '已批准';
        spec.Approval_Date__c = date.today();
        update spec;
        //注残
        Statu_Achievements__c Sac = new Statu_Achievements__c();
        Sac.name = 'zhucan_one';
        Sac.Opportunity__c = opp.id;
        Sac.DeliveryDate__c = Date.today();
        Sac.ContractNO__c = 'ContractNO1';
        Sac.ContractAmount__c = 1;
        insert Sac;
        OpportunitySpecialApply__c spec1 = new OpportunitySpecialApply__c();
        spec1.Status__c = '草案中';
        spec1.Apply_Content__c = '新增本月发货预测';
        spec1.Apply_Reason__c = 'NMPA影响';
        spec1.Opportunity__c = opp.Id;
        spec1.Achievements__c = Sac.Id;
        spec1.RecordTypeId = rectSpec[0].Id;
        spec1.Approval_Date__c = Date.today();
        insert spec1;
    }
    static testMethod void test1(){
        OpportunitySpecialApply__c opp = [select Id from OpportunitySpecialApply__c limit 1];
        Test.startTest();
        lexOpportunitySpecialApplyController.initForSpecSubmitButton(opp.Id);
        lexOpportunitySpecialApplyController.updateForSpecSubmitButton(opp.Id);
        lexOpportunitySpecialApplyController.updateForSpecSubmitButton('');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -163,6 +163,7 @@
             Lost_Reason_Sub__c,Lost_By_Company__c,
             LostTotalAmount__c,LostType__c,
             Report_Status__c,Sales_assistant__c,
             TotalAmountLost__c,
             InclusionUltrasound__c, //20230506 lt DB202304618804  包含超声
             ModifyAfterApproval__c,Approved_Day__c,//20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add
             Opportunity__c, Opportunity__r.Sales_assistant_ID__c,
@@ -307,9 +308,17 @@
            FROM ProcessInstance where TargetObjectId =:LostReport.lostReport.id order by CreatedDate DESC
            ];
            if(pros.size() > 0){
                List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
                maps.put('allowUserId',pros[0].StepsAndWorkitems[0].OriginalActor.Id);
                maps.put('userProfileId',UserInfo.getProfileId());
                for(ProcessInstance pro: pros){
                    items.addAll(pro.StepsAndWorkitems);
                }
                for(ProcessInstanceHistory pro: pros[0].StepsAndWorkitems){
                    if(pro.StepStatus == 'Started'){
                        maps.put('submitUserId',pro.OriginalActorId);
                    }
                }
                LostReport.approvalHistorys = items;
            }else{
@@ -331,6 +340,7 @@
        // Map<String,String> ele = new Map<String,String>();
        // LostReport.LostBrands[0].columns.add();
        maps.put('LostReport', LostReport);
        maps.put('userId',UserInfo.getUserId());
        return maps;
    }
    @AuraEnabled
@@ -389,6 +399,7 @@
            report.lostReport.recordTypeID  =  report.lostReport.LostType__c== '失单'?Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_Lost_report').getRecordTypeId() : Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_PartLost_report').getRecordTypeId();
            report.lostReport.LostTotalAmount__c    = 0;
            report.lostReport.of_lost_system_processor__c   = 0;
            report.lostReport.TotalAmountLost__c    = 0;
            report.lostReport.Lost_reason_main__c = null;
            report.lostReport.Lost_Reason_Sub__c  = null;
            report.lostReport.Lost_By_Company__c = null;
@@ -399,6 +410,11 @@
            for(LostBrand tempLostBrand : report.LostBrands) {
                if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) {
                    report.lostReport.LostTotalAmount__c += tempLostBrand.lostBrand.LostPrice__c;
                    Decimal med = tempLostBrand.lostBrand.LostPrice__c/1.13/1000;
                    Decimal med1 = med.setScale(2);
                    // System.debug('---lt123不含税数值(人工)Decimal---'+med);
                    // System.debug('---lt123不含税数值(人工)Decimal两位小数---'+med1);
                    report.lostReport.TotalAmountLost__c += med1;
                    report.lostReport.Lost_reason_main__c =
                    report.lostReport.Lost_reason_main__c == null
                        ? tempLostBrand.lostBrand.Lost_reason_main__c
@@ -511,7 +527,7 @@
                    }
                }
            }
            if (report.lostReport.Report_Status__c != '草案') {
                List<ProcessInstance> pros = [
                SELECT 
                ProcessDefinition.Name,
@@ -532,30 +548,36 @@
                for(ProcessInstance pro: pros){
                    items.addAll(pro.StepsAndWorkitems);
                }
                report.approvalHistorys = items;
            }else{
                List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
                report.approvalHistorys = items;
            }
                if(items.size() > 0){
                    report.approvalHistorys = items;
                }else{
                    List<ProcessInstanceHistory> items1 = new List<ProcessInstanceHistory>();
                    report.approvalHistorys = items1;
                }
            // lostReportId = report.lostReport.id;
            system.debug('save---end:');
            messageMap.put('LostReport',JSON.serialize(report));
        }catch (Exception e) {
            Database.rollback(sp);
            // 这里需要写一些报错信息
            if (e.getMessage().contains(',')) {
                System.debug(LoggingLevel.INFO, '*** e: ' + e);
                String exc = '' + e.getMessage();
                Integer left = exc.indexOf(':') + 1;
                Integer right = exc.lastIndexOf(':');
                String str = exc.substring(left,right);
                left = str.indexOf(',') +  1;
                String newStr = str.substring(left);
                messageMap.put('error', ''+ newStr);
            }else {
                messageMap.put('error', ''+ e.getMessage());
            }
            // if (e.getMessage().contains(',')) {
            //     System.debug(LoggingLevel.INFO, '*** e: ' + e);
            //     String exc = '' + e.getMessage();
            //     Integer left = exc.indexOf(':') + 1;
            //     Integer right = exc.lastIndexOf(':');
            //     String str = exc.substring(left,right);
            //     left = str.indexOf(',') +  1;
            //     String newStr = str.substring(left);
            //     messageMap.put('error', ''+ newStr);
            // }else {
            //     messageMap.put('error', ''+ e.getMessage());
            // }
            messageMap.put('error', ''+ e.getMessage());
            return messageMap;
        }
        return messageMap;
@@ -623,7 +645,7 @@
            }else {
                objs.put('error', ''+ e.getMessage());
            }
            return messages;
            return objs;
        }
    }
    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
force-app/main/default/classes/lexRentalApplyController.cls
@@ -15,11 +15,11 @@
            res.accountId = re.Account__c;
            res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String hospitalId;
        @AuraEnabled
force-app/main/default/classes/lexRentalApplyControllerTest.cls
New file
@@ -0,0 +1,28 @@
@isTest
private class lexRentalApplyControllerTest {
    @TestSetup
    static void makeData(){
        Rental_Apply__c raObj = new Rental_Apply__c();
        raObj.Name = 'testra';
        raObj.Status__c = '草案中';
        raObj.Product_category__c = 'GI';
        raObj.Demo_purpose1__c = '产品试用';
        raObj.direct_send__c = '医疗机构';
        raObj.Loaner_received_staff__c = '王五';
        raObj.Loaner_received_staff_phone__c = '110';
        raObj.direct_shippment_address__c = '北京市';
        raObj.Hope_Lonaer_date_Num__c = 1;  // 希望借用天数
        raObj.Phone_number__c = '1234567890';
        raObj.Follow_pcl_status2_Text__c = '引合 : -';
        raObj.demo_purpose2__c = '其他' ;
        insert raObj;
    }
    static testMethod void test1(){
        Rental_Apply__c ra = [select Id from Rental_Apply__c limit 1];
        Test.startTest();
        lexRentalApplyController.initForCreateOPDFromRentalApply(ra.Id);
        lexRentalApplyController.initForCreateOPDFromRentalApply('');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexRentalApplyControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexSolutionProgrammaController.cls
@@ -16,7 +16,7 @@
            res.profileId = UserInfo.getProfileId();
            res.m2profileId = [select Id from Profile where Name =: lexLightingButtonConstant.M2_PROFILE_NAME].Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
@@ -31,11 +31,11 @@
            ];
            res.schemeType = so.Scheme_Type__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String status;
        @AuraEnabled
force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls
New file
@@ -0,0 +1,28 @@
@isTest
private class lexSolutionProgrammaControllerTest {
    @TestSetup
    static void makeData(){
        Id userId = UserInfo.getUserId();
        SolutionProjectRequirements__c solProject = new SolutionProjectRequirements__c();
        solProject.Name = 'Test';
        solProject.HospitalOwner__c = userId;
        solProject.Sales_Assistant__c = userId;
        solProject.GIR_Assistant__c = userId;
        solProject.Project_Type__c = '新建大楼';
        solProject.Purpose_Proposal__c = '促进销售商谈';
        insert solProject;
        Solution_Programme__c solProgramme1 =  new Solution_Programme__c();
        solProgramme1.Name = 'test';
        solProgramme1.SolutionProjectRequirements__c = solProject.Id;
        solProgramme1.Business_Promotion__c = userId;
        insert solProgramme1;
    }
    static testMethod void test1(){
        Solution_Programme__c solProgramme1 = [select Id from Solution_Programme__c limit 1];
        SolutionProjectRequirements__c solProject = [select Id from SolutionProjectRequirements__c limit 1];
        Test.startTest();
        lexSolutionProgrammaController.initForNewSolutionProgramma(solProject.Id);
        lexSolutionProgrammaController.initForNewSolutionClosingAttachment(solProgramme1.Id);
        Test.stopTest();
    }
}
force-app/main/default/classes/lexSolutionProgrammaControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexSolutionProgrammeController.cls
@@ -12,7 +12,7 @@
            res.schemeType = so.Scheme_Type__c;
            res.confirmationResult = so.Confirmation_Result__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return res;
    }
@@ -22,7 +22,7 @@
        try {
            so = [select id,name from solutionClosingAttachment__c where Solution_Programme__c =: Id];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(e.getMessage());
        }
        return so;
    }
@@ -68,7 +68,7 @@
            }
        }
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String schemeType;
        @AuraEnabled
force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls
New file
@@ -0,0 +1,31 @@
@isTest
private class lexSolutionProgrammeControllerTest {
    @TestSetup
    static void makeData(){
        Id userId = UserInfo.getUserId();
        SolutionProjectRequirements__c solProject = new SolutionProjectRequirements__c();
        solProject.Name = 'Test';
        solProject.HospitalOwner__c = userId;
        solProject.Sales_Assistant__c = userId;
        solProject.GIR_Assistant__c = userId;
        solProject.Project_Type__c = '新建大楼';
        solProject.Purpose_Proposal__c = '促进销售商谈';
        insert solProject;
        Solution_Programme__c solProgramme1 =  new Solution_Programme__c();
        solProgramme1.Name = 'test';
        solProgramme1.SolutionProjectRequirements__c = solProject.Id;
        solProgramme1.Business_Promotion__c = userId;
        insert solProgramme1;
    }
    static testMethod void test1(){
        Solution_Programme__c solProgramme1 = [select Id from Solution_Programme__c limit 1];
        Test.startTest();
        lexSolutionProgrammeController.initSubmitSolutionSchemeForApprovalButton(solProgramme1.Id);
        lexSolutionProgrammeController.queryForAttachments(solProgramme1.Id);
        lexSolutionProgrammeController.updateSubmitSolutionSchemeForApprovalButton(solProgramme1.Id);
        lexSolutionProgrammeController.submitApproval(solProgramme1.Id);
        lexSolutionProgrammeController.updateSubmitSolutionSchemeForApprovalButton('');
        lexSolutionProgrammeController.submitApproval(solProgramme1.Id);
        Test.stopTest();
    }
}
force-app/main/default/classes/lexSolutionProgrammeControllerTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls
@@ -41,7 +41,7 @@
            res.hospital = so.Hospital__c;
            res.departmentClass = so.Department_Class__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
@@ -59,7 +59,7 @@
            res.profileId = UserInfo.getProfileId();
            res.m2ProfileId = [select Id from Profile where Name =: lexLightingButtonConstant.M2_PROFILE_NAME].Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
@@ -118,7 +118,7 @@
            ];
            
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return accList;
    }
@@ -134,7 +134,7 @@
                from Solution_Programme__c where SolutionProjectRequirements__c =: recordId and Scheme_Type__c = '结案' 
            ];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return so;
    }
@@ -147,11 +147,11 @@
                select id,name from solutionClosingAttachment__c where Solution_Programme__c =: solprogrammeId
            ];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return so;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String status;
        @AuraEnabled
force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls
New file
@@ -0,0 +1,30 @@
@isTest
private class lexSolutionProjectRequirementsTest {
    @TestSetup
    static void makeData(){
        SolutionProjectRequirements__c solProject = new SolutionProjectRequirements__c();
        solProject.Name = 'Test';
        solProject.HospitalOwner__c = UserInfo.getUserId();
        solProject.Sales_Assistant__c = UserInfo.getUserId();
        solProject.GIR_Assistant__c = UserInfo.getUserId();
        solProject.Project_Type__c = '新建大楼';
        solProject.Purpose_Proposal__c = '促进销售商谈';
        insert solProject;
    }
    static testMethod void test1(){
        SolutionProjectRequirements__c so = [select Id from SolutionProjectRequirements__c limit 1];
        Test.startTest();
        lexSolutionProjectRequirementsController.initSubmitSolutionForApprovalButton(so.Id);
        lexSolutionProjectRequirementsController.initForApplyAgainButton(so.Id);
        lexSolutionProjectRequirementsController.initForClosingCaseFlowButton(so.Id);
        lexSolutionProjectRequirementsController.updateSubmitSolutionForApprovalButton(so.Id);
        lexSolutionProjectRequirementsController.updateForClosingCaseFlowButton(so.Id);
        lexSolutionProjectRequirementsController.queryForAttachments(so.Id);
        lexSolutionProjectRequirementsController.queryForSolutionProgramme(so.Id);
        lexSolutionProjectRequirementsController.queryForAttachments1(so.Id);
        lexSolutionProjectRequirementsController.updateSubmitSolutionForApprovalButton('');
        lexSolutionProjectRequirementsController.updateForClosingCaseFlowButton('');
        lexSolutionProjectRequirementsController.initSubmitSolutionForApprovalButton('');
        Test.stopTest();
    }
}
force-app/main/default/classes/lexSolutionProjectRequirementsTest.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>58.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/lwc/lexCancel/lexCancel.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-03-27 13:47:21
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:12:23
 * @LastEditTime: 2023-10-09 17:47:05
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -13,8 +13,6 @@
import updateForCancelButton  from '@salesforce/apex/ReportController.updateForCancelButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexCancel extends LightningElement {
    @api recordId;
    status;
@@ -39,9 +37,6 @@
    connectedCallback(){
        console.log(this.recordId);
        Promise.all([
            loadStyle(this, lwcCSS)
           ]);
        init({
            recordId: this.recordId
        }).then(result => {
@@ -59,13 +54,24 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        if(type == 'success'){
            const event = new ShowToastEvent({
                title: ' ',
                message: msg,
                variant: type
            });
            this.dispatchEvent(event);
        }else{
            const event = new ShowToastEvent({
                title: ' ',
                message: msg,
                variant: type,
                mode: 'sticky'
            });
            this.dispatchEvent(event);
        }
    }
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:14:29
 * @LastEditTime: 2023-10-09 17:48:24
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -63,12 +63,23 @@
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        if(type == 'success'){
            const event = new ShowToastEvent({
                title: ' ',
                message: msg,
                variant: type
            });
            this.dispatchEvent(event);
        }else{
            const event = new ShowToastEvent({
                title: ' ',
                message: msg,
                variant: type,
                mode: 'sticky'
            });
            this.dispatchEvent(event);
        }
    }
}
force-app/main/default/lwc/lexEditLost/lexEditLost.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-09-12 17:37:34
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-02 15:35:06
 * @LastEditTime: 2023-10-09 16:43:31
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -53,14 +53,21 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            this.lostlist = result;
            queryForProfileId().then(res=>{
                this.profileId = res;
                this.AprofileId = PCLReportProfileId.includes(this.profileId);
                console.log(PCLReportProfileId);
                console.log(this.profileId);
                this.editLost();
            });
            console.log(result);
            if(result.error){
                this.showToast(res.error);
                this.dispatchEvent(new CloseActionScreenEvent());
            }else if(result.report){
                this.lostlist = result.report.lostReport;
                queryForProfileId().then(res=>{
                    this.profileId = res;
                    this.AprofileId = PCLReportProfileId.includes(this.profileId);
                    console.log(PCLReportProfileId);
                    console.log(this.profileId);
                    this.editLost();
                });
            }
            
        });
    }
@@ -77,11 +84,11 @@
                //alert(lost.RecordTypeId);
                if(lost.RecordTypeId == '01210000000R4hMAAS'){
                    //alert('4');
                    if(lost.Report_Status__c == '草案' || this.profileId == '00e10000000Y3o5' || (lost.Report_Status__c == '批准' && AprofileId)){
                    if(lost.Report_Status__c == '草案' || this.profileId == '00e10000000Y3o5' || (lost.Report_Status__c == '批准' && this.AprofileId)){
                        //alert('5');
                        window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId="+lost.Id);
                        window.open("/lightning/n/PCLLostReportPageLwc#pageStatus=Edit&reportId="+lost.Id);
                    }else{
                        window.open("/apex/PCLLostReportPageLwc?pageStatus=View&reportId="+lost.Id);
                        window.open("/lightning/n/PCLLostReportPageLwc#pageStatus=View&reportId="+lost.Id);
                    }
                }
            }
@@ -90,10 +97,10 @@
            else{
                //alert('2');
                //var status = lostlist[0].Report_Status__c;
                if(this.lostlist[0].Report_Status__c == '草案' || this.profileId == '00e10000000Y3o5' || (this.lostlist[0].Report_Status__c == '批准' && AprofileId)){
                    window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId="+this.lostlist[0].Id);
                if(this.lostlist[0].Report_Status__c == '草案' || this.profileId == '00e10000000Y3o5' || (this.lostlist[0].Report_Status__c == '批准' && this.AprofileId)){
                    window.open("/lightning/n/PCLLostReportPageLwc#pageStatus=Edit&reportId="+this.lostlist[0].Id);
                }else{
                    window.open("/apex/PCLLostReportPageLwc?pageStatus=View&reportId="+this.lostlist[0].Id);
                    window.open("/lightning/n/PCLLostReportPageLwc#pageStatus=View&reportId="+this.lostlist[0].Id);
                }
                this.dispatchEvent(new CloseActionScreenEvent());
            }
force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexLightningLink from 'c/lexLightningLink';
describe('c-lex-lightning-link', () => {
    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-lightning-link', {
            is: LexLightningLink
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexLightningLink/lexLightningLink.html
New file
@@ -0,0 +1,15 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-10-07 15:53:56
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-07 16:03:55
-->
<template>
    <a href={link}>
        <div>
          {linkName}
        </div>
    </a>
</template>
force-app/main/default/lwc/lexLightningLink/lexLightningLink.js
New file
@@ -0,0 +1,10 @@
import { api, wire,track,LightningElement } from 'lwc';
export default class LexLightningLink extends LightningElement {
    @api linkName;
    @api linkId;
    link;
    connectedCallback(){
        this.link = '/lightning/r/User/'+ this.linkId +'/view';
    }
}
force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>58.0</apiVersion>
    <isExposed>false</isExposed>
</LightningComponentBundle>
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-09-25 13:21:17
 * @LastEditTime: 2023-10-08 15:40:39
 */
/*
 * @Description: 
@@ -91,7 +91,7 @@
        //alert("关联招投标项目的询价,只能在有结果后做失单报告!");
        //}
        else {
            var url = '/apex/PCLLostReportPageLwc?pageStatus=Create&oppId=' + this.recordId + '&lostType=失单';
            var url = '/lightning/n/PCLLostReportPageLwc#pageStatus=Create&oppId=' + this.recordId + '&lostType=失单';
            location.href = url;
            // location.href = '/a1U/e?retURL=%2F' + this.recordId +
            // '&RecordType=01210000000R4hM' +
@@ -112,7 +112,7 @@
            title: ' ',
            message: msg,
            variant: type,
            duration: 15000
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -2,9 +2,17 @@
 * @Description: 
 * @version: 
 * @Author: chen jing wu
 * @Date: 2023-09-09 13:27:59
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-09 17:10:13
-->
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-20 17:16:48
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-03 12:02:30
 * @LastEditTime: 2023-10-07 15:50:52
-->
<template>
    <div if:true={IsLoading}>
@@ -15,10 +23,10 @@
    <template if:true={visible}>
        <template if:true={isSuccess}>
            <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
                <div class="slds-notify slds-notify_toast slds-theme_success" role="status">
                <div class="slds-notify slds-notify_toast slds-theme_success" role="status" style="top: 130px;">
                    <lightning-icon class="white" icon-name="utility:success" alternative-text="success"  variant="inverse" size="small" ></lightning-icon>
                  <div class="slds-notify__content"  style="padding-left: 20px;">
                    <h2 style="color:white;font-size:large">{message}</h2>
                    <span class="toastMessage forceActionsText">{message}</span>
                  </div>
                  <div class="slds-notify__close">
                    <lightning-button-icon icon-name="utility:close"  variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
@@ -49,10 +57,10 @@
                </div>
            </div> -->
            <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
                <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
                <div class="slds-notify slds-notify_toast slds-theme_error" role="status" style="background-color: #BA0517;top: 130px;">
                    <lightning-icon class="white" icon-name="utility:error"  size="small" variant="inverse"></lightning-icon>
                  <div class="slds-notify__content" style="padding-left: 20px;">
                    <h2 style="color:white;font-size:large">{message}</h2>
                    <span class="toastMessage forceActionsText">{message}</span>
                  </div>
                  <div class="slds-notify__close"> 
                    <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
@@ -67,13 +75,12 @@
                <div style="padding: 0 20px">
                    <div class="slds-box slds-p-around_medium slds-text-align_center">
                        <lightning-layout>
                            <lightning-layout-item>
                                <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">失单报告编辑页面</div>
                            </lightning-layout-item>
                                <lightning-layout-item alignment-bump="left">
                                    <lightning-button class="slds-button lexBorder" label="追加品牌" onclick={addBrandJs}></lightning-button>
                                    <lightning-button class="slds-button lexBorder1" name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                    <lightning-button class="slds-button lexBorder" label="返回询价" onclick={cancel}></lightning-button>
                            <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">失单报告编辑页面</div>
                                <lightning-layout-item class="slds-align_absolute-center" style="padding-right: 143px;">
                                    <lightning-button class="slds-button "  label="追加品牌" onclick={addBrandJs}></lightning-button>
                                    <lightning-button class="slds-button  "  name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                    <lightning-button class="slds-button "  label="返回询价" onclick={cancel}></lightning-button>
                                </lightning-layout-item>
                        </lightning-layout>
                    </div>
@@ -84,14 +91,14 @@
                                    <div style="padding: 10px 3px;font: 16px;float: left">
                                        <span style="color:red;font-size: 10px;">*</span>
                                        失单类型:</div>
                                    <div style="float: left;padding-top: 17px;">
                                    <div style="float: left;">
                                        <lightning-combobox name="progress" value={LostReport.lostReport.LostType__c} options={RecordTypeOptions} 
                                        onchange={handleLostTypeChange} class="searchField" style="bottom: 16px;">
                                        onchange={handleLostTypeChange} class="searchField" style="padding-top: 4px;" variant="label-hidden">
                                        </lightning-combobox> 
                                    </div>
                                </lightning-layout-item>
                                <lightning-layout-item size="4" padding="around-small">
                                    <div style="padding: 10px 3px;font: 16px;">失单总金额(元):
                                    <div style="padding: 10px 3px;font: 16px;">失单总金额(元):
                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostTotalAmount__c}</span>
                                        <!-- {LostReport.lostReport.LostTotalAmount__c} -->
                                    </div>
@@ -118,34 +125,49 @@
                                                    <lightning-accordion-section  class="" data-id={i} name={brand.brandTitle} label={brand.brandTitle} active>
                                                        <lightning-layout>
                                                            <lightning-layout-item alignment-bump="left">
                                                                <lightning-button style="margin-top: 10px;" class="slds-button lexBorder1" name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                                                <lightning-button class="slds-button lexBorder1" name={i} label="删除" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
                                                                <lightning-button style="margin-top: 10px;" class="slds-button "  name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                                                <lightning-button  class="slds-button " name={i} label="删除" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
                                                            </lightning-layout-item>
                                                        </lightning-layout>
                                                        <lightning-layout>
                                                            <lightning-layout-item size="4" padding="around-small">
                                                                <template if:true={isEdit}>
                                                                    <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="失单品牌: " placeholder={brand.lostBrand.Lost_By_Company__c} required></c-multi-select-combobox>
                                                                    <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={brand.lostBrand.Lost_By_Company__c} label="失单品牌: "  required></c-multi-select-combobox>
                                                                </template>
                                                                <template if:false={isEdit}>
                                                                    <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="失单品牌: " required></c-multi-select-combobox>
                                                                </template> 
                                                            </lightning-layout-item>
                                                            <lightning-layout-item size="4"  padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(主):" value={brand.lostBrand.Lost_reason_main__c} options={columns2s}
                                                                <lightning-combobox name={i} label="失单原因(主):" value={brand.lostBrand.Lost_reason_main__c} options={columns2s}
                                                                onchange={handleLostReasonMainChange} class="searchField" placeholder="--无--" required></lightning-combobox>
                                                            </lightning-layout-item>
                                                            <lightning-layout-item size="4"  padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(次):" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2s}
                                                                <lightning-combobox name={i} label="失单原因(次):" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2s}
                                                                onchange={handleLostReasonSubChange} class="searchField" placeholder="--无--"></lightning-combobox>
                                                            </lightning-layout-item>
                                                        </lightning-layout>
                                                        <lightning-layout> 
                                                            <template if:true={isEdit}>
                                                                <template if:true={brand.lostBrand.Lost_By_Company_Mannual__c}>
                                                                    <lightning-layout-item size="4" padding="horizontal-small">
                                                                        <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
                                                                    </lightning-layout-item>
                                                                </template>
                                                                <template if:false={brand.lostBrand.Lost_By_Company_Mannual__c}>
                                                                    <lightning-layout-item size="4" padding="horizontal-small">
                                                                        <lightning-input disabled="true" name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
                                                                    </lightning-layout-item>
                                                                </template>
                                                            </template>
                                                            <template if:false={isEdit}>
                                                                <lightning-layout-item size="4" padding="horizontal-small">
                                                                    <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
                                                                </lightning-layout-item>
                                                            </template>
                                                            <lightning-layout-item size="4" padding="horizontal-small">
                                                                <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="失单品牌(手动): " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
                                                            </lightning-layout-item>
                                                            <lightning-layout-item size="4" padding="horizontal-small">
                                                                <lightning-input data-id="TotalAmount" name={i} value={brand.lostBrand.LostPrice__c} type="number" label="失单金额(元): " class="searchField" onchange={handleLostPriceOutChange} required></lightning-input>
                                                                <lightning-input data-id="TotalAmount" name={i} value={brand.lostBrand.LostPrice__c} type="number" label="失单金额(元): " class="searchField" onchange={handleLostPriceOutChange} required></lightning-input>
                                                            </lightning-layout-item>
                                                            <lightning-layout-item size="4" padding="horizontal-small">
                                                                <lightning-record-edit-form
@@ -158,7 +180,7 @@
                                                        </lightning-layout>
                                                        <lightning-layout>
                                                            <lightning-layout-item size="4" padding="horizontal-small">
                                                                <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="中标经销商(手动):" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input>
                                                                <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="中标经销商(手动):" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input>
                                                            </lightning-layout-item>
                                                            <template if:true={brand.reasonFlag}>
                                                                <lightning-layout-item size="4" padding="horizontal-small">
@@ -194,12 +216,12 @@
                                                                            <tbody>
                                                                                <template for:each={brand.LostProducts} for:item="product" for:index="j">
                                                                                    <tr class="inputRows" key={product.lineNo2}>
                                                                                        <td>
                                                                                           <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} data-id={i} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox>
                                                                                        <td style="padding-left: 8px;">
                                                                                           <lightning-combobox variant="label-hidden" placeholder={product.LostProductss.LostBrandName__c} data-id={i} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox>
                                                                                        </td>
                                                                                        <td>
                                                                                            <template if:true={isEdit}>
                                                                                                <div style="padding-top: 4px;">
                                                                                                <div>
                                                                                                    <template if:false={product.LostProductss.LostProduct__r}>
                                                                                                        <c-lex-lookup-lwc onbuttonclick={handleCustomButtonClick} class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onchange={handleClear} onselected={handleSelected} init-value={product.productName} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
                                                                                                    </template>
@@ -209,20 +231,25 @@
                                                                                                </div> 
                                                                                            </template>
                                                                                            <template if:false={isEdit}>
                                                                                                <div style="padding-top: 4px;">
                                                                                                <div>
                                                                                                    <c-lex-lookup-lwc onbuttonclick={handleCustomButtonClick} class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onchange={handleClear} onselected={handleSelected} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
                                                                                                </div>
                                                                                            </template>
                                                                                        </td>
                                                                                        <td style="width: 5%;">
                                                                                           <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange} style=""></lightning-input>
                                                                                           <lightning-input variant="label-hidden" class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange} style=""></lightning-input>
                                                                                        </td>
                                                                                        <td>
                                                                                            <lightning-input class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange} style=""></lightning-input>
                                                                                            <lightning-input variant="label-hidden" class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange} style=""></lightning-input>
                                                                                        </td>
                                                                                        <td>
                                                                                            <template if:true={isEdit}>
                                                                                                <lightning-combobox read-only="true" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox>
                                                                                                <template if:true={product.LostProductss.ProductClass__c}>
                                                                                                    <lightning-combobox variant="label-hidden" read-only="true" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox>
                                                                                                </template>
                                                                                                <template if:false={product.LostProductss.ProductClass__c}>
                                                                                                    <lightning-combobox variant="label-hidden"  class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox>
                                                                                                </template>
                                                                                                <!-- <template if:true={product.LostProductss.ProductClass__c}>
                                                                                                    <lightning-combobox read-only="true" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
                                                                                                </template>
@@ -232,16 +259,16 @@
                                                                                            </template>
                                                                                            
                                                                                            <template if:false={isEdit}>
                                                                                                <lightning-combobox class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox>
                                                                                                <lightning-combobox variant="label-hidden" class="ProductClass" data-id={i} placeholder="--无--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox>
                                                                                            </template>
                                                                                        </td>
                                                                                        <td>
                                                                                           
                                                                                            <template if:true={isEdit}>
                                                                                                <lightning-combobox class="ProductCategory" data-id={i} placeholder={product.LostProductss.ProductCategory__c} title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox>
                                                                                                <lightning-combobox variant="label-hidden" class="ProductCategory" data-id={i} placeholder={product.LostProductss.ProductCategory__c} title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox>
                                                                                            </template>
                                                                                            <template if:false={isEdit}>
                                                                                                <lightning-combobox class="ProductCategory" data-id={i} placeholder="--无--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox>
                                                                                                <lightning-combobox variant="label-hidden" class="ProductCategory" data-id={i} placeholder="--无--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox>
                                                                                            </template>
                                                                                        </td>
                                        
@@ -275,9 +302,9 @@
                            <lightning-layout style="margin-top: 20px;">
                                <div class="slds-align_absolute-center">
                                    <lightning-layout-item size="12">
                                        <lightning-button class="slds-button lexBorder" label="追加品牌" onclick={addBrandJs}></lightning-button>
                                        <lightning-button class="slds-button lexBorder1" name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                        <lightning-button class="slds-button lexBorder" label="返回询价" onclick={cancel}></lightning-button>
                                        <lightning-button  class="slds-button " label="追加品牌" onclick={addBrandJs}></lightning-button>
                                        <lightning-button  class="slds-button " name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                        <lightning-button  class="slds-button " label="返回询价" onclick={cancel}></lightning-button>
                                    </lightning-layout-item>
                                </div>
                            </lightning-layout>
@@ -291,18 +318,17 @@
                    <div style="padding: 0 20px">
                        <div class="slds-box slds-p-around_medium slds-text-align_center">
                            <lightning-layout>
                                <lightning-layout-item>
                                    <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">失单报告查看页面</div>
                                </lightning-layout-item>
                                    <lightning-layout-item alignment-bump="left">
                                <h2 class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">失单报告查看页面</h2>
                                    <lightning-layout-item class="slds-align_absolute-center" style="padding-right: 143px;">
                                        <template if:true={isCanSubmit}>
                                            <lightning-button class="slds-button lexBorder1" label="提交" onclick={submitJs}></lightning-button>
                                            <lightning-button class="slds-button " label="提交" onclick={submitJs}></lightning-button>
                                            
                                        </template>
                                        <template if:true={isCanEdit}>
                                            <lightning-button class="slds-button lexBorder1" name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                            <lightning-button  class="slds-button " name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                        </template>
                                        <lightning-button class="slds-button lexBorder" label="返回询价" onclick={cancel}></lightning-button>
                                        <lightning-button  class="slds-button " label="返回询价" onclick={cancel}></lightning-button>
                                    </lightning-layout-item>
                            </lightning-layout>
                            <lightning-layout>
@@ -313,7 +339,7 @@
                                    </div>
                                </lightning-layout-item>
                                <lightning-layout-item size="3" padding="around-small">
                                    <div style="float: left;padding-top: 17px;">失单总金额(元):
                                    <div style="float: left;padding-top: 17px;">失单总金额(元):
                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostTotalAmount__c}</span>
                                        <!-- {LostReport.lostReport.LostTotalAmount__c} -->
                                    </div>
@@ -361,7 +387,7 @@
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3"></lightning-layout-item>
                                                        <lightning-layout-item style="width: 135px;">
                                                            <label>失单品牌(手动):</label>
                                                            <label>失单品牌(手动):</label>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3">
                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
@@ -371,7 +397,7 @@
                                                    </lightning-layout>
                                                    <lightning-layout>
                                                        <lightning-layout-item style="width: 135px;height: 30px;">
                                                            <label>失单原因(主):</label>
                                                            <label>失单原因(主):</label>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3">
                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
@@ -380,7 +406,7 @@
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3"></lightning-layout-item>
                                                        <lightning-layout-item style="width: 135px;">
                                                            <label>失单原因(次):</label>
                                                            <label>失单原因(次):</label>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3">
                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
@@ -401,7 +427,7 @@
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3"></lightning-layout-item>
                                                        <lightning-layout-item style="width: 135px;">
                                                            <label>中标经销商(手动):</label>
                                                            <label>中标经销商(手动):</label>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3">
                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
@@ -411,7 +437,7 @@
                                                    </lightning-layout>
                                                    <lightning-layout>
                                                        <lightning-layout-item style="width: 135px;height: 30px;">
                                                            <label>失单金额(元):</label>
                                                            <label>失单金额(元):</label>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item size="3">
                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
@@ -451,7 +477,7 @@
                                                                <tbody>
                                                                    <template for:each={brand.LostProducts} for:item="product" for:index="j">
                                                                        <tr class="inputRows" key={product.lineNo2}>
                                                                            <td>
                                                                            <td style="padding-left: 8px;">
                                                                                <div>{product.LostProductss.LostBrandName__c}</div>
                                                                            </td>
                                                                            <template if:false={product.LostProductss.LostProduct__r}>
@@ -493,119 +519,209 @@
                                    <div class="slds-align_absolute-center">
                                        <lightning-layout-item size="12">
                                            <template if:true={isCanSubmit}>
                                                <lightning-button class="slds-button lexBorder1" label="提交" onclick={submitJs}></lightning-button>
                                                <lightning-button  class="slds-button " label="提交" onclick={submitJs}></lightning-button>
                                                
                                            </template>
                                            <template if:true={isCanEdit}>
                                                <lightning-button class="slds-button lexBorder1" name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                                <lightning-button  class="slds-button " name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                            </template>
                                            <lightning-button class="slds-button lexBorder" label="返回询价" onclick={cancel}></lightning-button>
                                            <lightning-button  class="slds-button " label="返回询价" onclick={cancel}></lightning-button>
                                        </lightning-layout-item>
                                    </div>
                                </lightning-layout>
                            </div> 
                        </div>
                        <template if:true={haveApprovalHistorys}>
                            <div class="slds-box slds-p-around_medium slds-text-align_center">
                                <lightning-layout>
                                    <lightning-layout-item>
                                        <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">批准历史</div>
                                    </lightning-layout-item>
                                    <lightning-layout-item alignment-bump="left">
                                        <template if:false={isCaoAn}>
                                            <lightning-button class="slds-button lexBorder1" label="批准" onclick={handleSubmitApp}></lightning-button>
                                            <lightning-button class="slds-button lexBorder1" label="拒绝" onclick={handleNoApp}></lightning-button>
                                            <lightning-button class="slds-button lexBorder" label="重新分配" onclick={handleReStartApp}></lightning-button>
                                            <lightning-button class="slds-button lexBorder3" label="撤回批准请求" onclick={handleCancelApp}></lightning-button>
                                        </template>
                                    </lightning-layout-item>
                                </lightning-layout>
                                <lightning-layout>
                                    <table class="custom-table slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large">
                                        <thead>
                                            <tr class="slds-text-title_caps">
                                                    <!-- <th><div class="slds-truncate">操作</div></th> -->
                                                    <th><div class="slds-truncate">日期</div></th>
                                                    <th><div class="slds-truncate">状态</div></th>
                                                    <th><div class="slds-truncate">被分配人</div></th>
                                                    <th><div class="slds-truncate">实际批准人</div></th>
                                                    <th><div class="slds-truncate">评论</div></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
                                                <tr class="inputRows" key={approvalHistory.Id}>
                                                    <!-- <td>
                                                        <template if:true={approvalHistory.IsPending}>
                                                            <a onclick={onApproveChange}>重新分配</a>
                                                            <label>&nbsp;</label>
                                                            <label>|</label>
                                                            <a onclick={onApproveChange}>批准/拒绝</a>
                                                        </template>
                                                    </td> -->
                                                    <td>
                                                        <div>{approvalHistory.CreatedDate}</div>
                                                    </td>
                                                    <td>
                                                        <div>{approvalHistory.StepStatus}</div>
                                                    </td>
                                                    <td>
                                                        <div>{approvalHistory.Actor.Name}</div>
                                                    </td>
                                                    <td>
                                                        <div>{approvalHistory.OriginalActor.Name}</div>
                                                    </td>
                                                    <td>
                                                        <div>{approvalHistory.Comments}</div>
                                                    </td>
                                                </tr>
                                            </template>
                                        </tbody>
                                    </table>
                                </lightning-layout>
                            </div>
                        </template>
                    </div>   
                </lightning-card>
        </template>
        <template if:true={haveApprovalHistorys}>
            <div class="slds-box slds-p-around_medium slds-text-align_center" style="background-color: white;margin-top: 10px;">
                <lightning-layout>
                    <lightning-layout-item>
                        <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">批准历史</div>
                    </lightning-layout-item>
                    <lightning-layout-item alignment-bump="left">
                        <template if:false={isCaoAn}>
                            <template if:true={isAllowUser}>
                                <lightning-button  class="slds-button " label="批准" onclick={handleSubmitApp}></lightning-button>
                                <lightning-button  class="slds-button " label="拒绝" onclick={handleNoApp}></lightning-button>
                                <lightning-button  class="slds-button " label="重新分配" onclick={handleReStartApp}></lightning-button>
                            </template>
                            <template if:true={isSubmitUser}>
                                <lightning-button  class="slds-button " label="撤回批准请求" onclick={handleCancelApp}></lightning-button>
                            </template>
                        </template>
                    </lightning-layout-item>
                </lightning-layout>
                <lightning-layout>
                    <table class="custom-table slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large">
                        <thead>
                            <tr class="slds-text-title_caps">
                                    <!-- <th><div class="slds-truncate">操作</div></th> -->
                                    <th><div class="slds-truncate">日期</div></th>
                                    <th><div class="slds-truncate">状态</div></th>
                                    <th><div class="slds-truncate">被分配人</div></th>
                                    <th><div class="slds-truncate">实际批准人</div></th>
                                    <th><div class="slds-truncate">评论</div></th>
                                    <th><div class="slds-truncate">整体状态</div></th>
                            </tr>
                        </thead>
                        <tbody>
                            <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
                                <template if:true={approvalHistory.isRemoved}>
                                    <tr class="inputRows" key={approvalHistory.Id}>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td>
                                            <div style="background-color: #C0BEBC;">
                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:ban"></lightning-icon>
                                                <span style="padding-left: 10px;">已撤回</span>
                                            </div>
                                        </td>
                                    </tr>
                                </template>
                                <template if:true={approvalHistory.isApproved}>
                                    <tr class="inputRows" key={approvalHistory.Id}>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td>
                                            <div style="background-color: #A1F78D;">
                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:success"></lightning-icon>
                                                <span style="padding-left: 10px;">已批准</span>
                                            </div>
                                        </td>
                                    </tr>
                                </template>
                                <template if:true={approvalHistory.isPending}>
                                    <tr class="inputRows" key={approvalHistory.Id}>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td>
                                            <div style="background-color: #FFD74B;">
                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:clock"></lightning-icon>
                                                <span style="padding-left: 10px;">待处理</span>
                                            </div>
                                        </td>
                                    </tr>
                                </template>
                                <template if:true={approvalHistory.isRejected}>
                                    <tr class="inputRows" key={approvalHistory.Id}>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td>
                                            <div style="background-color: #FB8A8C;">
                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:clear"></lightning-icon>
                                                <span style="padding-left: 10px;">已拒绝</span>
                                            </div>
                                        </td>
                                    </tr>
                                </template>
                                <tr class="inputRows" key={approvalHistory.Id} style="height: 33px;">
                                    <!-- <td>
                                        <template if:true={approvalHistory.IsPending}>
                                            <a onclick={onApproveChange}>重新分配</a>
                                            <label>&nbsp;</label>
                                            <label>|</label>
                                            <a onclick={onApproveChange}>批准/拒绝</a>
                                        </template>
                                    </td> -->
                                    <td>
                                        <div>{approvalHistory.CreatedDate}</div>
                                    </td>
                                    <td>
                                        <div>{approvalHistory.StepStatus}</div>
                                    </td>
                                    <td>
                                        <!-- <a href='/lightning/r/User/{approvalHistory.OriginalActor.Id}/view'>
                                            <div>{approvalHistory.OriginalActor.Name}</div>
                                        </a> -->
                                        <c-lex-lightning-link link-id={approvalHistory.OriginalActor.Id} link-name={approvalHistory.OriginalActor.Name}></c-lex-lightning-link>
                                    </td>
                                    <td>
                                        <!-- <a href='/lightning/r/User/{approvalHistory.OriginalActor.Id}/view'>
                                            <div>{approvalHistory.Actor.Name}</div>
                                        </a> -->
                                        <c-lex-lightning-link link-id={approvalHistory.Actor.Id} link-name={approvalHistory.Actor.Name}></c-lex-lightning-link>
                                    </td>
                                    <td>
                                        <div>{approvalHistory.Comments}</div>
                                    </td>
                                    <td></td>
                                </tr>
                            </template>
                        </tbody>
                    </table>
                </lightning-layout>
            </div>
        </template>
        <template if:true={isPop}>
            <section role="dialog" aria-labelledby="modal-heading-01" aria-describedby="modal-content-id-1" tabindex="-1" aria-modal="true" class="slds-modal slds-fade-in-open " data-aura-rendered-by="478:0">
                <div style="height: 50px;"></div>
                <div style="background-color: white;height:200px;" class="slds-modal__container" data-aura-rendered-by="479:0">
                <div style="background-color: white;height:196px;" class="slds-modal__container" data-aura-rendered-by="479:0">
                    
                    <template if:false={isLookup}>
                        <div style="align-self: center;font-size: large;padding-bottom: 10px" slot="header">{modalsubmitLabel}页面</div>
                        <div style="height: 100px;">
                            <lightning-textarea class="comment" style="width: 95%;padding-left: 10px;" data-id="comment" label="评论" value=""></lightning-textarea>
                        <template if:true={isLookup}>
                                <lightning-record-edit-form
                                object-api-name='Lost_Report__c'
                                record-id=''
                            >
                                <div style="width: 95%;padding-left: 10px;">
                                    <lightning-input-field  variant="label-hidden" value={newActorId} field-name='Manager__c' onchange={handleActorChange} required> </lightning-input-field>
                                </div>
                            </lightning-record-edit-form>
                            
                        </div>
                    </template>
                        </template>
                        <template if:false={isLookup}>
                            <div style="height: 100px;">
                                <lightning-textarea class="comment" style="width: 95%;padding-left: 10px;" data-id="comment" label="评论" value=""></lightning-textarea>
                            </div>
                        </template>
                    
                    <template if:true={isLookup}>
                    <!-- <template if:true={isLookup}>
                        <div style="align-self: center;font-size: large;padding-bottom: 36px" slot="header">{modalsubmitLabel}页面</div>
                        <lightning-layout-item size="10" style="align-self: center;">
                            <div>
                                <lightning-record-edit-form
                                    object-api-name='Lost_Report__c'
                                    record-id=''
                                >
                                    <lightning-input-field variant="label-hidden" value={newActorId} field-name='Manager__c' onchange={handleActorChange} required> </lightning-input-field>
                                </lightning-record-edit-form>
                                <div style="height: 100px;">
                                    <lightning-textarea class="comment" style="width: 95%;padding-left: 10px;" data-id="comment" label="评论" value=""></lightning-textarea>
                                </div>
                              </div>  
                        </lightning-layout-item>
                          
                    </template>
                    </template> -->
                    <div slot="footer" style="align-self: center;padding-top: 10px;">
                        <lightning-button
                            class="slds-button "
                          data-id="Cancel"
                          label="取消"
                          onclick={handleModalCancel}
                        ></lightning-button>
                        <lightning-button
                            class="slds-button"
                          data-id="Submit"
                          label={modalsubmitLabel}
                          variant="brand"
                          class="slds-p-left_small"
                          onclick={handleModalSubmit}
                        ></lightning-button>
                    </div>
@@ -615,6 +731,5 @@
        </template>
        
    </template>
    
</template>
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 15:04:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-03 11:54:18
 * @LastEditTime: 2023-10-09 16:36:54
 */
let columns2=[
    { label: '--无--', value: '' },
@@ -87,6 +87,10 @@
import reassignStep from '@salesforce/apex/lexPCLLostReportLwcController.reassignStep';
import getUserProfileId from '@salesforce/apex/lexPCLLostReportLwcController.getUserProfileId';
import PCLReportProfileId from '@salesforce/label/c.PCLReportProfileId';
import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
import lexButtonCss from '@salesforce/resourceUrl/lexButtonCss';
import systemProfileId from '@salesforce/label/c.ProfileId_SystemAdmin';
import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexPCLLostReportPage extends NavigationMixin(LightningElement) {
    @track visible = false;
    @wire(CurrentPageReference) pageRef;
@@ -95,7 +99,7 @@
    @track status = {
        pageStatus: 'Create'
      }
    newActorId = null;
    @track newActorId = null;
    newReport;
    action;
    isLookup;
@@ -131,15 +135,11 @@
    IsLoading;
    newApprovalHistorys;
    userProfileId;
    @wire(getUserProfileId)
    wiredUserProfileId({ error, data }) {
        if (data) {
            this.userProfileId = data;
            console.log(this.userProfileId + 'user');
        } else if (error) {
            // 处理错误
        }
    }
    userId;
    allowUserId;
    submitUserId;
    @track isSubmitUser = false;
    @track isAllowUser = false;
    handleCustomButtonClick(event) {
        try {
            var index1 = event.target.title;
@@ -157,8 +157,31 @@
            console.log('error');
        }
    }
    getQueryVariable(variable,location) { //id字符串
        debugger
        var query = window.location.search.substring(1);
        if(!query){
            query = location;
        }
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return pair[1];
            }
        }
        return '';
    }
    
    connectedCallback(){
        Promise.all([
            loadStyle(this, lwcCSS),
            loadStyle(this, lexButtonCss)
           ]);
        this.pageStatus = this.getQueryVariable('pageStatus',this.location);
        this.oppId = this.getQueryVariable('oppId',this.location);
        this.reportId = this.getQueryVariable('reportId',this.location);
        this.lostType = decodeURI(this.getQueryVariable('lostType',this.location));
        this.status.pageStatus = this.pageStatus;
        init({
            oppId1: this.oppId,
@@ -178,6 +201,21 @@
                    }, 2000);
                }  
            }else{
                this.allowUserId = result.allowUserId;
                this.userId = result.userId;
                this.submitUserId = result.submitUserId;
                this.userProfileId = result.userProfileId;
                console.log('allowUserId' + this.allowUserId);
                console.log('userId' + this.userId);
                console.log('submitUserId' + this.submitUserId);
                console.log('userProfileId' + this.userProfileId);
                console.log('systemProfileId' + systemProfileId);
                if(this.userId == this.submitUserId || this.userProfileId == systemProfileId){
                    this.isSubmitUser = true;
                }
                if(this.userId == this.allowUserId  || this.userProfileId == systemProfileId){
                    this.isAllowUser = true;
                }
                if(result.LostReport.lostReport.Report_Status__c == '申请中'){
                    this.editStatus = '申请中';
                    console.log('shenqingzhong');
@@ -217,20 +255,24 @@
                        this.LostReport.approvalHistorys[i].CreatedDate = date.toLocaleString();
                        if(this.LostReport.approvalHistorys[i].StepStatus == 'Approved'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已批准';
                            this.LostReport.approvalHistorys[i].isApproved = true;
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Fault'){
    
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Pending'){
                            this.LostReport.approvalHistorys[i].StepStatus = '待处理';
                            this.LostReport.approvalHistorys[i].isPending = true;
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Held'){
    
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'NoResponse'){
    
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Reassigned'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已重新分配';
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Rejected'){
                                this.LostReport.approvalHistorys[i].StepStatus = '已拒绝';
                                this.LostReport.approvalHistorys[i].isRejected = true;
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Removed'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已撤回';
                            this.LostReport.approvalHistorys[i].isRemoved = true;
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Started'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已提交';
                        }
@@ -241,6 +283,7 @@
                    if(this.LostReport.lostReport.Report_Status__c == '批准'){
                        this.submitFlag = false;
                    }
                }
                console.log(PCLReportProfileId.includes(this.userProfileId));
                console.log(PCLReportProfileId);
@@ -293,25 +336,24 @@
        // this.LostReport = JSON.parse(JSON.stringify(this.LostReport));
    }
    brandTitle = ['失单品牌1','失单品牌2','失单品牌3','失单品牌4','失单品牌5','失单品牌6'];
    location;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            const urlValue = currentPageReference.state.fragment;
            if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.oppId = str;
              this.location = urlValue;
            }
        }
    }
    closeAction(){
        this.visible = false;
    }
    get haveApprovalHistorys(){
        console.log(this.LostReport.approvalHistorys.length + 'size');
@@ -410,7 +452,7 @@
        return false;
    }
    get isCaoAn(){
        if(this.LostReport.lostReport.Report_Status__c == '草案'){
        if(this.LostReport.lostReport.Report_Status__c == '草案' || this.LostReport.lostReport.Report_Status__c == '批准'){
            return true;
        }else{
            return false;
@@ -474,20 +516,24 @@
                    result.approvalHistorys[i].CreatedDate = date.toLocaleString();
                    if(result.approvalHistorys[i].StepStatus == 'Approved'){
                        result.approvalHistorys[i].StepStatus = '已批准';
                        result.approvalHistorys[i].isApproved = true;
                    }else if(result.approvalHistorys[i].StepStatus == 'Fault'){
                    }else if(result.approvalHistorys[i].StepStatus == 'Pending'){
                        result.approvalHistorys[i].StepStatus = '待处理';
                        result.approvalHistorys[i].isPending = true;
                    }else if(result.approvalHistorys[i].StepStatus == 'Held'){
                    }else if(result.approvalHistorys[i].StepStatus == 'NoResponse'){
                    }else if(result.approvalHistorys[i].StepStatus == 'Reassigned'){
                        result.approvalHistorys[i].StepStatus = '已重新分配';
                    }else if(result.approvalHistorys[i].StepStatus == 'Rejected'){
                        result.approvalHistorys[i].StepStatus = '已拒绝';
                        result.approvalHistorys[i].isRejected = '已拒绝';
                        result.approvalHistorys[i].isApproved = true;
                    }else if(result.approvalHistorys[i].StepStatus == 'Removed'){
                        result.approvalHistorys[i].isRemoved = '已撤回';
                        result.approvalHistorys[i].isApproved = true;
                    }else if(result.approvalHistorys[i].StepStatus == 'Started'){
                        result.approvalHistorys[i].StepStatus = '已提交';
                    }
@@ -561,10 +607,10 @@
            console.log(this.deleteProductIdList);
        }
        this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c = payload.value;
        this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c = '';
        this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c = '';
        this.LostReport.LostBrands[index].lostBrand.ChannelSpecificReasons__c = '';
        this.LostReport.LostBrands[index].reasonFlag = false;
        // this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c = '';
        // this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c = '';
        // this.LostReport.LostBrands[index].lostBrand.ChannelSpecificReasons__c = '';
        // this.LostReport.LostBrands[index].reasonFlag = false;
        searchBatchIfForProduct({
            productName: this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c
        }).then(result=>{
@@ -577,7 +623,7 @@
            if(payloadType === 'multi-select'){
            
                this.clearProducts(payload.value,index);
                this.setDefaultBrand(payload.value,index);
                // this.setDefaultBrand(payload.value,index);
                this.clearBrandMannualName(payload.value,index);
            }
            console.log('cnm:' + JSON.stringify(this.LostReport));
@@ -586,27 +632,49 @@
    }
    setDefaultBrand(value,index){
        var newProducts = [];
        this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
            this.newProduct.LostProductss.LostBrandName__c = value;
            newProducts.push(JSON.parse(JSON.stringify(this.newProduct)));
        getNewLostProduct({
            lineNo2: this.LostReport.LostBrands[index].LostProducts.length
        }).then(result=>{
            this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
                result.LostProductss.LostBrandName__c = value;
                newProducts.push(result);
                this.LostReport.LostBrands[index].LostProducts = newProducts;
            });
        });
        this.LostReport.LostBrands[index].LostProducts = newProducts;
        // this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
        //     this.newProduct.LostProductss.LostBrandName__c = value;
        //     newProducts.push(JSON.parse(JSON.stringify(this.newProduct)));
        // });
        // this.LostReport.LostBrands[index].LostProducts = newProducts;
    }
    clearProducts(value,index){
        var cc = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company_Mannual__c;
        if (value == '其他' && (cc != null || cc != '' || cc != undefined)) {
            return;
        }
        var newProducts = [];
        this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
            this.newProduct.LostProductss.LostBrandName__c = value;
            newProducts.push(JSON.parse(JSON.stringify(this.newProduct)));
        console.log(this.newProduct);
        getNewLostProduct({
            lineNo2: this.LostReport.LostBrands[index].LostProducts.length
        }).then(result=>{
            this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
                result.LostProductss.LostBrandName__c = value;
                newProducts.push(result);
            });
            var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + index + '"]');
            elements1.forEach(element=>{
                element.readOnly = false;
            });
            var elements2 = this.template.querySelectorAll('.Product[data-id="' + index + '"]');
            elements2.forEach(element=>{
                element.clearSelection();
            });
            this.LostReport.LostBrands[index].LostProducts = newProducts;
        });
        var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + index + '"]');
        elements1.forEach(element=>{
            element.readOnly = false;
        });
        var elements2 = this.template.querySelectorAll('.Product[data-id="' + index + '"]');
        elements2.forEach(element=>{
            element.clearSelection();
        });
        this.LostReport.LostBrands[index].LostProducts = newProducts;
    }
   
@@ -710,20 +778,24 @@
                        newLostReport.approvalHistorys[i].CreatedDate = date.toLocaleString();
                        if(newLostReport.approvalHistorys[i].StepStatus == 'Approved'){
                            newLostReport.approvalHistorys[i].StepStatus = '已批准';
                            newLostReport.approvalHistorys[i].isApproved = true;
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Fault'){
                            
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Pending'){
                            newLostReport.approvalHistorys[i].StepStatus = '待处理';
                            newLostReport.approvalHistorys[i].isPending = true;
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Held'){
    
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'NoResponse'){
    
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Reassigned'){
                            newLostReport.approvalHistorys[i].StepStatus = '已重新分配';
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Rejected'){
                            newLostReport.approvalHistorys[i].StepStatus = '已拒绝';
                            newLostReport.approvalHistorys[i].isRejected = true;
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Removed'){
                            newLostReport.approvalHistorys[i].StepStatus = '已撤回';
                            newLostReport.approvalHistorys[i].isRemoved = true;
                        }else if(newLostReport.approvalHistorys[i].StepStatus == 'Started'){
                            newLostReport.approvalHistorys[i].StepStatus = '已提交';
                        }
@@ -956,11 +1028,20 @@
        this.newActorId = null;
    }
    handleReStartApp(){
        this.modalsubmitLabel = '重新分配';
        this.modalsubmitLabel = '分配';
        for(var i=0;i < this.LostReport.approvalHistorys.length;i++){
            if(this.LostReport.approvalHistorys[i].StepStatus == '待处理'){
                console.log('xqc');
                this.newActorId = this.LostReport.approvalHistorys[i].Actor.Id;
            }
        }
        this.isPop = true;
        this.isLookup = true;
    }
    ser(userId){
        return '/lightning/r/User/' + userId + '/view';
    }
    handleNoApp(){
        this.modalsubmitLabel = '拒绝';
        this.isPop = true;
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
@@ -3,6 +3,7 @@
   <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
@@ -2,4 +2,7 @@
    <div class="LostButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
    <div if:true={flag} style="height: 350px;">
        <c-tender-lost recordid={recordId}></c-tender-lost>
    </div>
</template>
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -1,20 +1,37 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-08-13 18:57:20
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-09-14 10:58:50
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CurrentPageReference ,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import  sqlResult  from '@salesforce/apex/TenderingButtonController.sqlResult';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingLostButton extends LightningElement {
import LightningConfirm from 'lightning/confirm';
import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
import {loadStyle} from 'lightning/platformResourceLoader'
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class lexTenderingLostButton extends NavigationMixin(LightningElement) {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    @api url;
    status;//状态
    profileId;//profileId id
    systemProfileId;
    TwoS1_Sales_Hospital;
    TwoS4_Sales_Manager;
    IsLoading = true;
    @track
    flag = false;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
            this.url = currentPageReference.state.backgroundContext;
            const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
@@ -24,45 +41,90 @@
    
    connectedCallback(){
        Promise.all([
            loadStyle(this, lwcCSS)
        ]);
        init({
            recordId: this.recordId
        }).then(result => {
                this.IsLoading = false;
                this.id = result.Id;
                this.status = result.status;
                this.profileId = result.profileId.slice(0,15);
                this.profileId = result.profileId;
                this.systemProfileId = result.systemProfileId;
                this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital;
                this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager;
                this.LoseButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error => {
            console.log("error"+error);
        }).finally(() => {
        });
        })
    }
    //失单
    //招标项目 失单
    LoseButton(){
        sqlResult({id: this.id}).then(result=>{
        console.log(this.url,'xxx')
        sqlResult({id: this.recordId}).then(result=>{
            //简档权限 2S1_销售医院担当 2S4_销售管理者 系统管理员
            if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
            if (this.profileId != this.TwoS1_Sales_Hospital  && this.profileId != this.TwoS4_Sales_Manager && this.profileId != this.systemProfileId) {
                this.showToast("您没有权限,无法创建询价提交失单。","error");
                return;
            }
            // 判断内部确认状态
            if(this.status == '01.待确认'|| this.status == '02.不相关'){ 
                console.log('没走吗');
                this.showToast("状态为待确认或不相关,不可以做失单。","error");
                return;
            }
            // 判断是否需要新建询价
            if(this.status == '05.询价中'|| this.status == '06.成交' || this.status == '07.部分成交' || this.status == '08.失单' || result.length > 0){
                if(confirm('此项目已关联询价,请确实是否新建询价提交失单。')) {
                }else{
                    return;
                }
                LightningConfirm.open({
                    message: '此项目已关联询价,请确实是否新建询价提交失单。',
                    variant: 'headerless',
                    label: 'this is the aria-label value',
                    }).then(res=>{
                        if(res) {
                            this.flag = true
                            // window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
                            // const defaultValues = encodeDefaultFieldValues({
                            //     oppId :this.id,
                            //     pageStatus:'',
                            //     lostType :"",
                            // });
                            // this[NavigationMixin.Navigate]({
                            //     type: 'standard__objectPage',
                            //     attributes: {
                            //         objectApiName: 'Tender_information__c',
                            //         actionName: 'new'
                            //     },
                            //     state:{
                            //         defaultFieldValues: defaultValues
                            //     }
                            // });
                            // this.dispatchEvent(new CloseActionScreenEvent());
                        }else{
                            this.dispatchEvent(new CloseActionScreenEvent());
                            return;
                        }
                    });
            }
            window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
            if(this.status == "04.待关联询价" || this.status == "03.不应标" || this.status == "09.终止"){
                this.flag = true
                // window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
                // const defaultValues = encodeDefaultFieldValues({
                //     oppId :this.id,
                //     pageStatus:'',
                //     lostType :"",
                // });
                // this[NavigationMixin.Navigate]({
                //     type: 'standard__objectPage',
                //     attributes: {
                //         objectApiName: 'Tender_information__c',
                //         actionName: 'new'
                //     },
                //     state:{
                //         defaultFieldValues: defaultValues
                //     }
                // });
                // this.dispatchEvent(new CloseActionScreenEvent());
            }
        })
    }
    showToast(msg,type) {
@@ -71,38 +133,6 @@
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
// var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
// var sqlResult = sforce.connection.query(sql);
// //简档权限 2S1_销售医院担当 2S4_销售管理者 系统管理员
// if ('{!$Profile.Id}' != '00e10000000xnp2' && '{!$Profile.Id}' != '00e10000000xnpH' && '{!$Profile.Id}' != '00e10000000Y3o5') {
// alert("您没有权限,无法创建询价提交失单。");
// return;
// }
// // 判断内部确认状态
// if({!Tender_information__c.status__c == '01.待确认'|| Tender_information__c.status__c == '02.不相关'}){
// alert('状态为待确认或不相关,不可以做失单。');
// return;
// }
// // 判断是否需要新建询价
// if({!Tender_information__c.status__c == '05.询价中'|| Tender_information__c.status__c == '06.成交' || Tender_information__c.status__c == '07.部分成交' || Tender_information__c.status__c == '08.失单'} || sqlResult.size > 0){
// if(!confirm('此项目已关联询价,请确实是否新建询价提交失单。')) {
// return;
// }
// }
// // 判断是否需要新建询价
// //if(sqlResult.size > 0){
// //if(!confirm('已有关联询价,是否创建新的询价。')) {
// //return;
// //}
// //}
// window.open('/apex/TenderLostPage?id={!Tender_information__c.Id}','','height=500,width=800,top=200,left=250,location=no');
}
force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
@@ -15,7 +15,7 @@
    @track value;
    @track values = [];
    @track optionData;
    @track searchString;
    @api searchString;
    @track message;
    @track showDropdown = false;
    @api placeholder = '--无--';
force-app/main/default/lwc/tenderLost/tenderLost.js
@@ -4,9 +4,14 @@
// import SearchParent from '@salesforce/apex/TenderLostController.SearchParent';
import InitData from '@salesforce/apex/TenderLostController.InitData';
import LinkedHospitals from '@salesforce/apex/TenderLostController.LinkedHospitals';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { CloseActionScreenEvent } from 'lightning/actions';
export default class TenderLost extends LightningElement {
    @api
    recordid;
    @api
    url;
    //资金来源选项
    RelateOption=[
        {label:"政府拨款",value:"政府資金"},
@@ -61,8 +66,8 @@
    //初始化
    connectedCallback(){
        this.tenId = this.getQueryVariable('id');
        // this.tenId = this.getQueryVariable('id');
        this.tenId = this.recordid
        InitData({ParamIdStr:this.tenId}).then(response=>{
            this.opp=JSON.parse(response);
        });
@@ -105,19 +110,22 @@
    //保存数据逻辑
    saveFn(){
        if(this.opp.Fund_Basis__c == undefined || this.opp.Sales_Method__c == undefined || this.opp.AccountId == undefined){
            this.Alert("请不要输入空哦。",false,true);
            this.showToast("请不要输入空哦。",'error')
        }else{
            this.OnLoading(true);
            SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{
                if (response != '' && response.indexOf('错误') < 0) {
                    this.OnLoading(false);
                    console.log(response);
                    this.Alert("保存成功",false,true);
                    window.open('/apex/PCLLostReportPage?pageStatus=Create&oppId=' + response + '&lostType=失单');
                    // this.Alert("保存成功",false,true);
                    this.showToast("保存成功",'success')
                    window.location.href = '/'+this.recordid
                    window.open('/lightning/n/PCLLostReportPageLwc#pageStatus=Create&oppId=' + response + '&lostType=失单');
                    // top.window.close();
                    // window.location.hash = "Refresh"+"=="+response;
                    top.window.close();
                }else{
                    this.Alert(response,true);
                    // this.Alert(response,true);
                    this.showToast(response,'error')
                }
            });
        }
@@ -139,10 +147,10 @@
        if (error) {
            this.TongzhiIcon = "standard:first_non_empty";
            this.BgColorStyle = "background-color:#f88568";
            this.BgColorStyle = "background-color:rgb(234, 0, 30)";
        }else{
            this.TongzhiIcon = "standard:account";
            this.BgColorStyle = "background-color:#69e669";
            this.BgColorStyle = "background-color:rgb(46, 132, 74)";
        }
        if (left) {
            this.IsLeftStyle = "left: 0.25rem"
@@ -150,7 +158,14 @@
            this.IsLeftStyle = ""
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    //关闭提示框
    CloseAlert(){
        this.closeOffRefresh();
force-app/main/default/pages/AssetMaintain.page
@@ -489,10 +489,13 @@
                            <td class="labelStyle">货架号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.wh_location}" id="shelfNumId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
                            <!-- 20230928 ljh 和机身号换位置 -->
                            <!-- <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td>
                            </td> -->
                        </tr>
                        <tr>
                            <td class="labelStyle">备品管理编码</td>  <!-- シリアル番号 -->
@@ -507,8 +510,12 @@
                                <apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId2" rendered="{!!internalAssetNumberEditableFlag}" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
                            <!-- <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td> -->
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">分公司号</td>
                            <td class="inputTextStyle">
@@ -626,9 +633,9 @@
                <apex:outputField styleClass="textStyle" value="{!amHeader.Status__c}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Submit_Person__c}" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection columns="1" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }">
                <apex:pageBlockSection columns="2" rendered="{! editmode}">
                    <apex:pageBlockSectionItem >
            <apex:pageBlockSection id="SalesSectionOut1" columns="1" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }">
                <apex:pageBlockSection id="SalesSectionIn1" columns="2" rendered="{! editmode}">
                    <apex:pageBlockSectionItem id="SalesSectionItem1">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User1__c.Label}"/>
                        <apex:inputField id="SalesName1" value="{!amHeader.CC_User1__c}"/>
                    </apex:pageBlockSectionItem>
@@ -636,7 +643,7 @@
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email1__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email1__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem2">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User2__c.Label}"/>
                        <apex:inputField id="SalesName2" value="{!amHeader.CC_User2__c}"/>
                    </apex:pageBlockSectionItem>
@@ -644,7 +651,7 @@
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email2__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email2__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem3">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User3__c.Label}"/>
                        <apex:inputField id="SalesName3" value="{!amHeader.CC_User3__c}"/>
                    </apex:pageBlockSectionItem>
@@ -652,12 +659,12 @@
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email3__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email3__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem4">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User4__c.Label}"/>
                        <apex:inputField id="SalesName4" value="{!amHeader.CC_User4__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem />
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem5">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User5__c.Label}"/>
                        <apex:inputField id="SalesName5" value="{!amHeader.CC_User5__c}"/>
                    </apex:pageBlockSectionItem>
@@ -707,7 +714,7 @@
                       //原apex:inputField的id值,需要在页面上获取 
                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id107:SalesName1',
                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem1:SalesName1',
                       //查找字段所在对象 
@@ -731,7 +738,7 @@
                       //原apex:inputField的id值,需要在页面上获取 
                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id112:SalesName2',
                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem2:SalesName2',
                       //查找字段所在对象 
@@ -753,7 +760,7 @@
                   //原apex:inputField的id值,需要在页面上获取 
                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id117:SalesName3',
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem3:SalesName3',
                   //查找字段所在对象 
@@ -775,7 +782,7 @@
                   //原apex:inputField的id值,需要在页面上获取 
                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id122:SalesName4',
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem4:SalesName4',
                   //查找字段所在对象 
@@ -797,7 +804,7 @@
                   //原apex:inputField的id值,需要在页面上获取 
                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id125:SalesName5',
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem5:SalesName5',
                   //查找字段所在对象 
force-app/main/default/pages/LostCreatePage1.page
@@ -65,7 +65,7 @@
        // 这是询价的ID;
        var opportunityid = getParam('CF00N10000004lbGT_lkid');
        console.log(opportunityid);
          var str = '/apex/PCLLostReportPage?pageStatus=Create'  +'&oppId='+opportunityid +'&lostType=' +  '失单';
          var str = '/lightning/n/PCLLostReportPage#pageStatus=Create'  +'&oppId='+opportunityid +'&lostType=' +  '失单';
        window.open(str,'_self');
    }
@@ -74,7 +74,7 @@
        // 这是询价的ID;
        var opportunityid = getParamFromUrl('CF00N10000004lbGT_lkid');
        console.log(opportunityid);
        var str = '/apex/PCLLostReportPage?pageStatus=Create'  +'&oppId='+opportunityid +'&lostType=' + '部分失单';
        var str = '/lightning/n/PCLLostReportPage#pageStatus=Create'  +'&oppId='+opportunityid +'&lostType=' + '部分失单';
        window.open(str,'_self');
        
    }
force-app/main/default/pages/LostEditPage1.page
@@ -9,7 +9,8 @@
            var ReportId = getParam('id');
            if(!ReportId){
                alert('报告没有ID,请重试!');
                window.open('/006/o');
                // window.open('/006/o');
                window.location = '/006/o';
                return;
            }
            sforce.connection.sessionId = '{!GETSESSIONID()}';
@@ -40,7 +41,8 @@
            if(getParam('retURL') != null){
                str += '&retURL='+getParam('retURL');
            }
            window.open(str);
            // window.open(str);
            window.location = str;
        }
        function getParam(paramName) {
            paramValue = "", isFound = !1;
@@ -53,9 +55,9 @@
        function lostReport(){
        //失单报告的ID
        var ReportId = getParam('id');
        var str = '/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId=' + ReportId;
        window.open(str);
        var str = '/lightning/n/PCLLostReportPageLwc#pageStatus=Edit&reportId=' + ReportId;
        // window.open(str);
        window.location = str;
        }
    </script>
</apex:page>
force-app/main/default/pages/LostViewPage1.page
@@ -9,7 +9,8 @@
        console.log('1');
        var ReportId = getParam('id');
        if(!ReportId){
            window.open('/006/o');
            // window.open('/006/o');
            window.open('/006/o','_self');
            return;
        }
        sforce.connection.sessionId = '{!GETSESSIONID()}';
@@ -38,7 +39,7 @@
         if(getParam('retURL') != null){
            str += '&retURL='+getParam('retURL');
        }
          window.open(str);
          window.open(str,'_self');
    }
    function getParam(paramName) {
        paramValue = "", isFound = !1;
@@ -51,8 +52,8 @@
    function lostReport(){
        //失单报告的ID
        var ReportId = getParam('id');
        var str = '/apex/PCLLostReportPageLwc?pageStatus=View&reportId=' + ReportId;
        window.open(str);
        var str = '/lightning/n/PCLLostReportPageLwc#pageStatus=View&reportId=' + ReportId;
        window.open(str,'_self');
        
        
       }
force-app/main/default/pages/MaintenanceProductData.page
@@ -1359,9 +1359,12 @@
                                <td><apex:outputField value="{!aa.mpded[c[0]]}"/></td>
                                </apex:repeat>
                            </tr>
                            </apex:variable>
                        </apex:repeat>
                    </table>
                    <input type="hidden" id="ProductCnt1" value="{!mpdDetailsRecords}"/>
                </apex:outputLabel>
                </apex:pageblocksection>
                <!-- !(RecordTypeName='GuranteeMain'&&mpd.Status__c='服务填写') -->
@@ -1423,6 +1426,7 @@
                                </td>
                            </apex:repeat>
                        </tr>
                        </apex:repeat>
                        
                    </table>
@@ -1491,6 +1495,32 @@
            var SelectObj = 'Product2';
            var SelectFld = 'Name';
            console.log('xxx');
            console.log('2344');
            var cnt = j$(escapeVfId('ProductCnt1')).val();
            cnt = cnt.length;
            for (var i = 0; i < cnt; i++) {
                inputFieldId = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:4:edvariable:edtheValue';
                inputFieldId_lktp = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:4:edvariable:edtheValue_lktp';
                baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
                var obj = document.getElementById('allPage:allForm:allBlock:edmpdDetails:bb:' + i + ':edtheRepeat:4:edvariable:edtheValue_lkwgt');
                if (obj != null) {
                    obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
                }
            }
        // 复杂组件 end
    }
    function refreshinput4(){
    // 复杂组件 start
    var baseURL = '';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var QueryFieldApiName = 'Default_Fixture_Arrival_Product__c';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var inputFieldId = '';
            var inputFieldId_lktp = '';
            var SelectObj = 'Product2';
            var SelectFld = 'Name';
            console.log('xxx');
            console.log('123');
            var cnt = j$(escapeVfId('ProductCnt')).val();
            console.log('count=' + cnt);
@@ -1505,9 +1535,60 @@
            }
        // 复杂组件 end
    }
    function refreshinput5(){
    // 复杂组件 start
    var baseURL = '';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var QueryFieldApiName = 'Service_Category6__c';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var inputFieldId = '';
            var inputFieldId_lktp = '';
            var SelectObj = 'Service_Category6__c';
            var SelectFld = 'Name';
            var cnt = j$(escapeVfId('ProductCnt1')).val();
            cnt = cnt.length;
            for (var i = 0; i < cnt; i++) {
                inputFieldId = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:13:edvariable:edtheValue';
                inputFieldId_lktp = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:13:edvariable:edtheValue_lktp';
                baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
                var obj = document.getElementById('allPage:allForm:allBlock:edmpdDetails:bb:' + i + ':edtheRepeat:13:edvariable:edtheValue_lkwgt');
                if (obj != null) {
                    obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
                }
            }
        // 复杂组件 end
    }
    function refreshinput6(){
    // 复杂组件 start
    var baseURL = '';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var QueryFieldApiName = 'Service_Category7__c';
            var ObjectType = 'Maintenance_Product_Data_Details__c';
            var inputFieldId = '';
            var inputFieldId_lktp = '';
            var SelectObj = 'Service_Category7__c';
            var SelectFld = 'Name';
            var cnt = j$(escapeVfId('ProductCnt1')).val();
            cnt = cnt.length;
            for (var i = 0; i < cnt; i++) {
                inputFieldId = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:14:edvariable:edtheValue';
                inputFieldId_lktp = 'allPage:allForm:allBlock:edmpdDetails:bb:'+ i +':edtheRepeat:14:edvariable:edtheValue_lktp';
                baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
                var obj = document.getElementById('allPage:allForm:allBlock:edmpdDetails:bb:' + i + ':edtheRepeat:14:edvariable:edtheValue_lkwgt');
                if (obj != null) {
                    obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
                }
            }
        // 复杂组件 end
    }
    refreshinput1();
    refreshinput2();
    refreshinput3();
    refreshinput4();
    refreshinput5();
    refreshinput6();
    </script>
                </apex:pageBlock>
            </apex:pageBlock>
force-app/main/default/pages/searchAimsAccount.page
@@ -23,10 +23,10 @@
        </apex:outputPanel>
        <apex:form id="mainForm">
            <apex:pageBlock id="idSearchSetProduct" title="特价医院选择">
                <table width="750" border="0" style="background-color:#DCDCDC">
                <table width="750" style="background-color:#DCDCDC">
                    <colgroup>
                        <col width="12" />
                        <col width="20" />
                        <col width="5" />
                        <col width="20" />
                        <col width="200" />
                        <col width="20" />
@@ -34,8 +34,8 @@
                    </colgroup>
                    <tr>
                        <td>&nbsp;</td>
                        <th style="width:100px;">{!$Label.Search_Condition}</th>
                        <td>&nbsp;</td>
                        <th style="width: 66px;">{!$Label.Search_Condition}</th>
                        <td></td>
                        <th>医院名称</th>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>