From 25f056535350a0b80bad50d2cc45311998e5d1cd Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 09 十月 2023 18:28:00 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/pages/LostEditPage1.page                                      |   12 
 force-app/main/default/classes/lexRentalApplyControllerTest.cls-meta.xml             |    5 
 force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js                |    2 
 force-app/main/default/pages/searchAimsAccount.page                                  |    8 
 force-app/main/default/classes/OpportunityLightingButtonController.cls               |  132 ++--
 force-app/main/default/pages/MaintenanceProductData.page                             |   81 ++
 force-app/main/default/pages/LostCreatePage1.page                                    |    4 
 force-app/main/default/lwc/lexEditLost/lexEditLost.js                                |   37 
 force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls-meta.xml       |    5 
 force-app/main/default/classes/lexSolutionProjectRequirementsController.cls          |   12 
 force-app/main/default/classes/lexAccountControllerTest.cls                          |   33 +
 force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls           |  117 +++
 force-app/main/default/pages/AssetMaintain.page                                      |   39 
 force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls-meta.xml |    5 
 force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls-meta.xml       |    5 
 force-app/main/default/classes/lexAccountControllerTest.cls-meta.xml                 |    5 
 force-app/main/default/classes/PCLLostReportController.cls                           |    2 
 force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls                |   28 
 force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls                |   30 +
 force-app/main/default/classes/lexCaseController.cls                                 |    4 
 force-app/main/default/classes/MonthlyReportControllerTest.cls                       |   10 
 force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js       |   25 
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html        |    3 
 force-app/main/default/classes/lexLookupControllerTest.cls                           |    8 
 force-app/main/default/classes/MonthlyReportControllerTest.cls-meta.xml              |    5 
 force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js            |   27 
 force-app/main/default/lwc/lexCancel/lexCancel.js                                    |   32 
 force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls          |  115 +++
 force-app/main/default/aura/taskManage/taskManageHelper.js                           |    2 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js              |  175 ++++-
 force-app/main/default/lwc/lexLoseReport/lexLoseReport.js                            |    6 
 force-app/main/default/classes/lexRentalApplyController.cls                          |    4 
 force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls-meta.xml  |    5 
 force-app/main/default/pages/LostViewPage1.page                                      |    9 
 force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls                |   31 +
 force-app/main/default/classes/lexSolutionProgrammaController.cls                    |    6 
 force-app/main/default/classes/lexCaseControllerTest.cls                             |   11 
 force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js          |  144 ++-
 force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls-meta.xml       |    5 
 force-app/main/default/classes/lexAccountController.cls                              |   12 
 force-app/main/default/classes/lexRentalApplyControllerTest.cls                      |   28 
 force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml             |    5 
 force-app/main/default/classes/lexOpportunitySpecialApplyController.cls              |    2 
 force-app/main/default/lwc/tenderLost/tenderLost.js                                  |   37 
 force-app/main/default/lwc/lexLightningLink/lexLightningLink.html                    |   15 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml     |    1 
 force-app/main/default/classes/lexLookupControllerTest.cls-meta.xml                  |    5 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html            |  377 ++++++++----
 force-app/main/default/classes/lexSolutionProgrammeController.cls                    |    6 
 force-app/main/default/lwc/lexLightningLink/lexLightningLink.js                      |   10 
 force-app/main/default/classes/lexCaseControllerTest.cls-meta.xml                    |    5 
 force-app/main/default/classes/lexPCLLostReportLwcController.cls                     |   62 +
 52 files changed, 1,330 insertions(+), 424 deletions(-)

diff --git a/force-app/main/default/aura/taskManage/taskManageHelper.js b/force-app/main/default/aura/taskManage/taskManageHelper.js
index 2afe47f..71a5ef7 100644
--- a/force-app/main/default/aura/taskManage/taskManageHelper.js
+++ b/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") {
diff --git a/force-app/main/default/classes/MonthlyReportControllerTest.cls b/force-app/main/default/classes/MonthlyReportControllerTest.cls
new file mode 100644
index 0000000..649230a
--- /dev/null
+++ b/force-app/main/default/classes/MonthlyReportControllerTest.cls
@@ -0,0 +1,10 @@
+@isTest
+private class MonthlyReportControllerTest {
+    @TestSetup
+    static void makeData(){
+
+    }
+    static testMethod void test1(){
+        
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/MonthlyReportControllerTest.cls-meta.xml b/force-app/main/default/classes/MonthlyReportControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/MonthlyReportControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index 886fa74..a68cb79 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/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;
diff --git a/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls b/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls
new file mode 100644
index 0000000..d037288
--- /dev/null
+++ b/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls
@@ -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 = '璨╁2搴�'];
+        // 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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls-meta.xml b/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/OpportunityLightingButtonControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/PCLLostReportController.cls b/force-app/main/default/classes/PCLLostReportController.cls
index a8fd165..0e9b35c 100644
--- a/force-app/main/default/classes/PCLLostReportController.cls
+++ b/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;
diff --git a/force-app/main/default/classes/lexAccountController.cls b/force-app/main/default/classes/lexAccountController.cls
index 6ed2e76..7ced975 100644
--- a/force-app/main/default/classes/lexAccountController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexAccountControllerTest.cls b/force-app/main/default/classes/lexAccountControllerTest.cls
new file mode 100644
index 0000000..db5f4f4
--- /dev/null
+++ b/force-app/main/default/classes/lexAccountControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexAccountControllerTest.cls-meta.xml b/force-app/main/default/classes/lexAccountControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexAccountControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCaseController.cls b/force-app/main/default/classes/lexCaseController.cls
index a3a7c50..67c6513 100644
--- a/force-app/main/default/classes/lexCaseController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexCaseControllerTest.cls b/force-app/main/default/classes/lexCaseControllerTest.cls
new file mode 100644
index 0000000..f4ac99f
--- /dev/null
+++ b/force-app/main/default/classes/lexCaseControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCaseControllerTest.cls-meta.xml b/force-app/main/default/classes/lexCaseControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexCaseControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLookupControllerTest.cls b/force-app/main/default/classes/lexLookupControllerTest.cls
new file mode 100644
index 0000000..bf7a521
--- /dev/null
+++ b/force-app/main/default/classes/lexLookupControllerTest.cls
@@ -0,0 +1,8 @@
+@isTest
+private class lexLookupControllerTest {
+    static testMethod void test1(){
+        Test.startTest();
+        lexLookupController.getRecordsByName('Product2','STO','STORZ');
+        Test.stopTest();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLookupControllerTest.cls-meta.xml b/force-app/main/default/classes/lexLookupControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexLookupControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls b/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
index 07bf24d..35f8b9e 100644
--- a/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
+++ b/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;
     }
diff --git a/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls b/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls
new file mode 100644
index 0000000..7a6f70b
--- /dev/null
+++ b/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls-meta.xml b/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexOpportunitySpecialApplyControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index a55853f..9e33408 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/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  鍖呭惈瓒呭0
 			 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;
 		}
 	}
 	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/force-app/main/default/classes/lexRentalApplyController.cls b/force-app/main/default/classes/lexRentalApplyController.cls
index 533fc4b..f58842b 100644
--- a/force-app/main/default/classes/lexRentalApplyController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexRentalApplyControllerTest.cls b/force-app/main/default/classes/lexRentalApplyControllerTest.cls
new file mode 100644
index 0000000..2c98b5a
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexRentalApplyControllerTest.cls-meta.xml b/force-app/main/default/classes/lexRentalApplyControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProgrammaController.cls b/force-app/main/default/classes/lexSolutionProgrammaController.cls
index 843adf3..2a1c570 100644
--- a/force-app/main/default/classes/lexSolutionProgrammaController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls b/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls
new file mode 100644
index 0000000..d6b0f1c
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls-meta.xml b/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProgrammaControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProgrammeController.cls b/force-app/main/default/classes/lexSolutionProgrammeController.cls
index b54e189..e91ccc2 100644
--- a/force-app/main/default/classes/lexSolutionProgrammeController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls b/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls
new file mode 100644
index 0000000..2858d9b
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls-meta.xml b/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProgrammeControllerTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProjectRequirementsController.cls b/force-app/main/default/classes/lexSolutionProjectRequirementsController.cls
index bedc618..63ca106 100644
--- a/force-app/main/default/classes/lexSolutionProjectRequirementsController.cls
+++ b/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
diff --git a/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls b/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls
new file mode 100644
index 0000000..366901f
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls
@@ -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();
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls-meta.xml b/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls-meta.xml
new file mode 100644
index 0000000..642d054
--- /dev/null
+++ b/force-app/main/default/classes/lexSolutionProjectRequirementsTest.cls-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.js b/force-app/main/default/lwc/lexCancel/lexCancel.js
index 2fe56b4..db1f503 100644
--- a/force-app/main/default/lwc/lexCancel/lexCancel.js
+++ b/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);
+        }
+        
+        
     }
 
 
diff --git a/force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js b/force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js
index 88d4cd3..8f0d7ae 100644
--- a/force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js
+++ b/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);
+        }
+        
+        
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEditLost/lexEditLost.js b/force-app/main/default/lwc/lexEditLost/lexEditLost.js
index 34cf2b2..0f688d1 100644
--- a/force-app/main/default/lwc/lexEditLost/lexEditLost.js
+++ b/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());
             }
diff --git a/force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js b/force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js
new file mode 100644
index 0000000..be24d10
--- /dev/null
+++ b/force-app/main/default/lwc/lexLightningLink/__tests__/lexLightningLink.test.js
@@ -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);
+    });
+});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLightningLink/lexLightningLink.html b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.html
new file mode 100644
index 0000000..c3eb6db
--- /dev/null
+++ b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.html
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js
new file mode 100644
index 0000000..1860095
--- /dev/null
+++ b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js
@@ -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';
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml
new file mode 100644
index 0000000..cc0d4bf
--- /dev/null
+++ b/force-app/main/default/lwc/lexLightningLink/lexLightningLink.js-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
index 270d206..cd790ad 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
+++ b/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);
     }
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index 1cd0435..66e4503 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index b733ee0..ed14ca8 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
+++ b/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;
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
index 8b2c3d6..3eb3542 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js-meta.xml
+++ b/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>
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
index e94a2ef..3141d7e 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
+++ b/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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
index a4576e1..beb62d9 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/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;//褰撳墠杩欐潯鏁版嵁鐨刬d
-    id;//杩斿洖鍊肩殑id  Tender_information__c鎷涙爣椤圭洰鐨刬d
+    @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=>{
             //绠�妗f潈闄� 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);
-
-
-// //绠�妗f潈闄� 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');
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
index ef794da..924fc87 100644
--- a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
+++ b/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 = '--鏃�--';
diff --git a/force-app/main/default/lwc/tenderLost/tenderLost.js b/force-app/main/default/lwc/tenderLost/tenderLost.js
index 6530e03..0318df7 100644
--- a/force-app/main/default/lwc/tenderLost/tenderLost.js
+++ b/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();
diff --git a/force-app/main/default/pages/AssetMaintain.page b/force-app/main/default/pages/AssetMaintain.page
index 6929f0c..4ce78a5 100644
--- a/force-app/main/default/pages/AssetMaintain.page
+++ b/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 @@
 
                        //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
 
-                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id107:SalesName1', 
+                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem1:SalesName1', 
 
                        //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
 
@@ -731,7 +738,7 @@
 
                        //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
 
-                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id112:SalesName2', 
+                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem2:SalesName2', 
 
                        //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
 
@@ -753,7 +760,7 @@
 
                    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
 
-                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id117:SalesName3', 
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem3:SalesName3', 
 
                    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
 
@@ -775,7 +782,7 @@
 
                    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
 
-                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id122:SalesName4', 
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem4:SalesName4', 
 
                    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
 
@@ -797,7 +804,7 @@
 
                    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
 
-                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id125:SalesName5', 
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem5:SalesName5', 
 
                    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
 
diff --git a/force-app/main/default/pages/LostCreatePage1.page b/force-app/main/default/pages/LostCreatePage1.page
index 950111b..474d394 100644
--- a/force-app/main/default/pages/LostCreatePage1.page
+++ b/force-app/main/default/pages/LostCreatePage1.page
@@ -65,7 +65,7 @@
         // 杩欐槸璇环鐨処D锛�
         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 @@
         // 杩欐槸璇环鐨処D锛�
         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');
         
     }
diff --git a/force-app/main/default/pages/LostEditPage1.page b/force-app/main/default/pages/LostEditPage1.page
index f94e058..90a8fbe 100644
--- a/force-app/main/default/pages/LostEditPage1.page
+++ b/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(){
         //澶卞崟鎶ュ憡鐨処D
         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>
\ No newline at end of file
diff --git a/force-app/main/default/pages/LostViewPage1.page b/force-app/main/default/pages/LostViewPage1.page
index 6f1a11e..fc3f182 100644
--- a/force-app/main/default/pages/LostViewPage1.page
+++ b/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(){
         //澶卞崟鎶ュ憡鐨処D
         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');
         
         
        }
diff --git a/force-app/main/default/pages/MaintenanceProductData.page b/force-app/main/default/pages/MaintenanceProductData.page
index 9a4f350..a88fe48 100644
--- a/force-app/main/default/pages/MaintenanceProductData.page
+++ b/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>
diff --git a/force-app/main/default/pages/searchAimsAccount.page b/force-app/main/default/pages/searchAimsAccount.page
index 85718ab..c9d1439 100644
--- a/force-app/main/default/pages/searchAimsAccount.page
+++ b/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>

--
Gitblit v1.9.1