From 988f9735377909b6310301e582c15804e004783f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 07 十月 2023 10:36:13 +0800
Subject: [PATCH] 近期修改cjw

---
 force-app/main/default/classes/UpdateContractAimAmountHandler.cls                                   |    2 
 force-app/main/default/pages/LostEditPage1.page                                                     |    6 
 force-app/main/default/classes/FixtureRentalPDFController.cls                                       |    9 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.design                |    3 
 force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.html                               |  200 +
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp-meta.xml                  |    5 
 force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.css                                            |    7 
 force-app/main/default/classes/MaintenanceProductDataController.cls                                 |    5 
 force-app/main/default/classes/OpportunityLightingButtonController.cls                              |  127 
 force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js                               |    8 
 force-app/main/default/pages/ImprovedForecastTime.page                                              |   18 
 force-app/main/default/lwc/lexLoseReport/lexLoseReport.html                                         |    9 
 force-app/main/default/pages/MaintenanceProductData.page                                            |  184 +
 force-app/main/default/triggers/RentalApplyFaultTrigger.trigger                                     |    4 
 force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js                                             |    7 
 force-app/main/default/lwc/lexCancelReport/lexCancelReport.css                                      |    4 
 force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.html                       |   19 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.auradoc                       |    6 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraHelper.js              |    5 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeController.js                  |    5 
 force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js                                             |    7 
 force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.js                                             |   10 
 force-app/main/default/lwc/modal/modal.html                                                         |   47 
 force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js                                         |    7 
 force-app/main/default/classes/ApprovalHistoryUtil.cls                                              |  146 
 force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.css                      |    4 
 force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js                                             |    7 
 force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js                 |    9 
 force-app/main/default/aura/taskManage/taskManage.cmp                                               |   70 
 force-app/main/default/classes/ReportControllerTest.cls                                             |  286 
 force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js                           |    8 
 force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js       |    8 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp-meta.xml          |    5 
 force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.html                                           |   12 
 force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js |    6 
 force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js                                           |    7 
 force-app/main/default/classes/RentalApplyFaultHandler.cls-meta.xml                                 |    5 
 force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.html                                       |   10 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraController.js          |    5 
 force-app/main/default/staticresources/blockUIcss.css                                               |   15 
 force-app/main/default/classes/LostCancelReportOppBatchTest.cls                                     |    4 
 force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js                     |    6 
 force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js                                         |    8 
 force-app/main/default/lwc/lexEditCancelReport/lexEditCancelReport.js                               |   11 
 force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js                                             |    9 
 force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.css                                |    4 
 force-app/main/default/pages/OFSInsReportLayoutgzw.page-meta.xml                                    |    7 
 force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html                           |    2 
 force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js                             |   63 
 force-app/main/default/triggers/RentalApplyFaultTrigger.trigger-meta.xml                            |    5 
 force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js                           |    7 
 force-app/main/default/pages/Enquiry.page                                                           |    5 
 force-app/main/default/pages/ImprovedForecastTimeAno.page                                           |   86 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.svg                   |    7 
 force-app/main/default/pages/MergeAgencyActivity.page                                               |   64 
 force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js-meta.xml                        |   37 
 force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js                               |   25 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js                             |  312 +
 force-app/main/default/pages/AssetMaintainIframe.page                                               |    4 
 force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.html               |  135 
 force-app/main/default/lwc/lexLoseReport/lexLoseReport.js                                           |   44 
 force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html                         |   12 
 force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.css                            |    7 
 force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html                         |    2 
 force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css                          |    4 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.auradoc               |    6 
 force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js                                     |    7 
 force-app/main/default/classes/Product2Handler.cls                                                  |   62 
 force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js                                               |    8 
 force-app/main/default/triggers/AttachmentTrigger.trigger                                           |    2 
 force-app/main/default/lwc/approvalLookUp/approvalLookUp.js-meta.xml                                |    8 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp                   |   12 
 force-app/main/default/lwc/lexASACEditor/lexASACEditor.js                                           |    8 
 force-app/main/default/pages/CheckAllOlympusAsset.page                                              |   24 
 force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.html                               |    5 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.design                        |    3 
 force-app/main/default/lwc/lexRequestDB/lexRequestDB.js                                             |    5 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.css                           |    2 
 force-app/main/default/pages/PCLLostReportPageLwc.page                                              |   21 
 force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.css                        |   11 
 force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js                           |    7 
 force-app/main/default/classes/StaticParameter.cls-meta.xml                                         |    2 
 force-app/main/default/classes/ApprovalHistoryController.cls                                        |  533 +++
 force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.html                       |    2 
 force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.css                              |    4 
 force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js                                 |    7 
 force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.html                                       |   10 
 force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js                                               |    5 
 force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.css                                |    4 
 force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html                             |   24 
 force-app/main/default/classes/lexPCLLostReportLwcController.cls                                    |  209 +
 force-app/main/default/lwc/lexCancelReport/lexCancelReport.js                                       |    6 
 force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js                               |   12 
 force-app/main/default/lwc/modal/modal.js                                                           |   46 
 force-app/main/default/pages/searchAimsAccount.page                                                 |   19 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraRenderer.js            |    5 
 force-app/main/default/lwc/lexEditLost/lexEditLost.js                                               |   60 
 force-app/main/default/pages/OFSInsReportLayoutgzw.page                                             |  789 ++++
 force-app/main/default/classes/ApprovalHistoryUtil.cls-meta.xml                                     |    5 
 force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js                                       |    7 
 force-app/main/default/lwc/approvalLookUp/approvalLookUp.html                                       |  189 +
 force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js                       |    9 
 force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html                                 |    2 
 force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js                                       |   15 
 force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js                               |    8 
 force-app/main/default/lwc/lexLoseReport/lexLoseReport.css                                          |    8 
 force-app/main/default/lwc/lexStockApply/lexStockApply.css                                          |    4 
 force-app/main/default/lwc/approvalLookUp/approvalLookUp.css                                        |   30 
 force-app/main/default/pages/AssetMaintain.page                                                     |  185 +
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css                            |  177 
 force-app/main/default/lwc/lexRequestDB/lexRequestDB.html                                           |   10 
 force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.css                   |    2 
 force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml                    |   10 
 force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js                                 |    8 
 force-app/main/default/classes/PCLLostReportController.cls                                          |   10 
 force-app/main/default/classes/LostCancelReportHandlerTest.cls                                      |   26 
 force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js                                           |    8 
 force-app/main/default/lwc/lexLoseBid/lexLoseBid.css                                                |    6 
 force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.html                             |    4 
 force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js                                         |    7 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp                           |   11 
 force-app/main/default/triggers/ContentVersionTrigger.trigger                                       |    8 
 force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js                       |   22 
 force-app/main/default/classes/AccountDelayApplyHandler.cls                                         |    2 
 force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryUtil.js                                |  264 +
 force-app/main/default/classes/ReportController.cls                                                 |  377 +-
 force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js                                     |   11 
 force-app/main/default/lwc/lexRequestDB/lexRequestDB.css                                            |    4 
 force-app/main/default/classes/LostCancelReportHandler.cls                                          |  163 
 force-app/main/default/lwc/tEnquiry/tEnquiry.js                                                     |  101 
 force-app/main/default/lwc/lexStockApply/lexStockApply.html                                         |   11 
 force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js                   |    7 
 force-app/main/default/lwc/tEnquiry/tEnquiry.html                                                   |  129 
 force-app/main/default/lwc/modal/modal.js-meta.xml                                                  |   22 
 force-app/main/default/pages/taskManage.page                                                        |   14 
 force-app/main/default/classes/StaticParameter.cls                                                  |   43 
 force-app/main/default/lwc/modal/modal.css                                                          |    3 
 force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.html                                   |    4 
 force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.html                                     |   10 
 force-app/main/default/lwc/lexImprovedForecastTimeNew/__tests__/lexImprovedForecastTimeNew.test.js  |   25 
 force-app/main/default/lwc/lexCancel/lexCancel.js                                                   |    7 
 force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js                                           |    7 
 force-app/main/default/classes/AssetMaintainController.cls                                          |    1 
 force-app/main/default/lwc/lexSpecilaApplyCreateAch/lexSpecilaApplyCreateAch.js                     |    8 
 force-app/main/default/aura/taskManage/taskManageHelper.js                                          |   92 
 force-app/main/default/classes/RentalApplyFaultHandler.cls                                          |  569 +++
 force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.css                          |    4 
 force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js                         |   34 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.svg                           |    7 
 force-app/main/default/lwc/approvalHistoryLWC/ApprovalHistoryLWC.css                                |    7 
 force-app/main/default/classes/ApprovalHistoryController.cls-meta.xml                               |    5 
 force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js-meta.xml        |   11 
 force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.css                                      |    4 
 force-app/main/default/aura/taskManage/taskManage.css                                               |   25 
 force-app/main/default/lwc/lexCancelReport/lexCancelReport.html                                     |    9 
 force-app/main/default/pages/LostViewPage1.page                                                     |    6 
 force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js                             |   14 
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js                               |    7 
 force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js                                 |  859 +++++
 force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js                                       |    8 
 force-app/main/default/pages/ConsumApplyBR.page                                                     |   10 
 force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js                 |  290 +
 force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js                                 |   56 
 force-app/main/default/pages/InventoryReport.page                                                   |  228 
 force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js                                   |    4 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeRenderer.js                    |    5 
 force-app/main/default/lwc/lexOPDReport/lexOPDReport.js                                             |    6 
 force-app/main/default/pages/AssetMaintainDetail.page                                               |  117 
 force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html                                           |   18 
 force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.html                     |   10 
 force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeHelper.js                      |    5 
 force-app/main/default/lwc/lexEnquiryNoBidding/lexEnquiryNoBidding.html                             |   10 
 force-app/main/default/pages/DiscountProductApplication.page                                        |   62 
 force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html                               |    3 
 force-app/main/default/triggers/ContentDocumentTrigger.trigger                                      |  283 +
 force-app/main/default/aura/taskManage/taskManageController.js                                      |    1 
 force-app/main/default/triggers/ContentDocumentLink.trigger                                         |  202 
 force-app/main/default/lwc/approvalLookUp/approvalLookUp.js                                         |  326 +
 force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js                           |   33 
 force-app/main/default/lwc/lexStockApply/lexStockApply.js                                           |    7 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html                           |  405 +
 force-app/main/default/classes/InquiryFormHandler.cls                                               |  211 -
 force-app/main/default/lwc/lexLoseBid/lexLoseBid.html                                               |    2 
 force-app/main/default/lwc/lexLoseBid/lexLoseBid.js                                                 |   10 
 force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js                                               |    8 
 185 files changed, 8,549 insertions(+), 1,513 deletions(-)

diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.auradoc b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.auradoc
new file mode 100644
index 0000000..d0d6eb5
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.auradoc
@@ -0,0 +1,6 @@
+<aura:documentation>
+	<aura:description>Documentation</aura:description>
+	<aura:example name="ExampleName" ref="exampleComponentName" label="Label">
+		Example Description
+	</aura:example>
+</aura:documentation>
\ No newline at end of file
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp
new file mode 100644
index 0000000..9bdf618
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp
@@ -0,0 +1,11 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-22 17:41:57
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-22 18:37:18
+-->
+<aura:component>
+
+</aura:component>	
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp-meta.xml b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp-meta.xml
new file mode 100644
index 0000000..0778619
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>58.0</apiVersion>
+    <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
\ No newline at end of file
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.css b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.css
new file mode 100644
index 0000000..f407185
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.css
@@ -0,0 +1,2 @@
+.THIS {
+}
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.design b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.design
new file mode 100644
index 0000000..d247163
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.design
@@ -0,0 +1,3 @@
+<design:component >
+
+</design:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.svg b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.svg
new file mode 100644
index 0000000..e201ae9
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTime.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+	<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+		<path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" />
+		<path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" />
+	</g>
+</svg>
\ No newline at end of file
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeController.js b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeController.js
new file mode 100644
index 0000000..b235899
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeController.js
@@ -0,0 +1,5 @@
+({
+    myAction : function(component, event, helper) {
+
+    }
+})
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeHelper.js b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeHelper.js
new file mode 100644
index 0000000..f8a77e3
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeHelper.js
@@ -0,0 +1,5 @@
+({
+    helperMethod : function() {
+
+    }
+})
diff --git a/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeRenderer.js b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeRenderer.js
new file mode 100644
index 0000000..3a11ff5
--- /dev/null
+++ b/force-app/main/default/aura/ImprovedForecastTime/ImprovedForecastTimeRenderer.js
@@ -0,0 +1,5 @@
+({
+
+// Your renderer method overrides go here
+
+})
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.auradoc b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.auradoc
new file mode 100644
index 0000000..d0d6eb5
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.auradoc
@@ -0,0 +1,6 @@
+<aura:documentation>
+	<aura:description>Documentation</aura:description>
+	<aura:example name="ExampleName" ref="exampleComponentName" label="Label">
+		Example Description
+	</aura:example>
+</aura:documentation>
\ No newline at end of file
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp
new file mode 100644
index 0000000..398e8a1
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp
@@ -0,0 +1,12 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-22 17:45:23
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 11:13:38
+-->
+<aura:component access="global" implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:isUrlAddressable">
+    <!-- <aura:attribute name="recordId" type="String" />
+    <c:improvedForecastTime record-id="{!v.recordId}"></c:improvedForecastTime> -->
+</aura:component>	
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp-meta.xml b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp-meta.xml
new file mode 100644
index 0000000..0778619
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>58.0</apiVersion>
+    <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
\ No newline at end of file
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.css b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.css
new file mode 100644
index 0000000..f407185
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.css
@@ -0,0 +1,2 @@
+.THIS {
+}
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.design b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.design
new file mode 100644
index 0000000..d247163
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.design
@@ -0,0 +1,3 @@
+<design:component >
+
+</design:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.svg b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.svg
new file mode 100644
index 0000000..e201ae9
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAura.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+	<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+		<path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" />
+		<path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" />
+	</g>
+</svg>
\ No newline at end of file
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraController.js b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraController.js
new file mode 100644
index 0000000..b235899
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraController.js
@@ -0,0 +1,5 @@
+({
+    myAction : function(component, event, helper) {
+
+    }
+})
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraHelper.js b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraHelper.js
new file mode 100644
index 0000000..f8a77e3
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraHelper.js
@@ -0,0 +1,5 @@
+({
+    helperMethod : function() {
+
+    }
+})
diff --git a/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraRenderer.js b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraRenderer.js
new file mode 100644
index 0000000..3a11ff5
--- /dev/null
+++ b/force-app/main/default/aura/improvedForecastTimeAura/improvedForecastTimeAuraRenderer.js
@@ -0,0 +1,5 @@
+({
+
+// Your renderer method overrides go here
+
+})
diff --git a/force-app/main/default/aura/taskManage/taskManage.cmp b/force-app/main/default/aura/taskManage/taskManage.cmp
index 48e9e6e..f68d4e5 100644
--- a/force-app/main/default/aura/taskManage/taskManage.cmp
+++ b/force-app/main/default/aura/taskManage/taskManage.cmp
@@ -1,7 +1,7 @@
 <aura:component implements="force:appHostable,lightning:isUrlAddressable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes"
 controller="taskManageController" >
         <aura:attribute name="opportunity_cfilter" type="String" default="" />
-
+        <ltng:require styles="{!$Resource.lwcCSS}" />
     <aura:attribute name="selectedData" type="Object[]" />
     <aura:attribute name="data" type="Object[]" />
     <aura:attribute name="dataCopy" type="Object[]" />
@@ -97,19 +97,19 @@
     <aura:attribute name="estimatedFinishDate" type="Date" />
     <aura:handler name="init" value="{! this }" action="{! c.init }"/>
 
-    <div>
-        <lightning:spinner aura:id="mySpinner" size="large" class="slds-hide"/>
-    </div>
+    
     <div   style="margin-top:20px;   ">
-
+        
+            <lightning:spinner aura:id="mySpinner" size="large" class="slds-hide spinner-overlay"/>
+       
 
         <lightning:accordion
                              allowMultipleSectionsOpen="true"
                              activeSectionName="{! v.activeSections }"
                              >
             <lightning:accordionSection name="A" label="鑷繁鐨勪换鍔�">
-                <div class="c-container">
-                    <lightning:layout multipleRows="true">
+                <div class="c-container" style="width:1150px">
+                    <lightning:layout multipleRows="true" >
                         
                         <lightning:layoutItem size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3" padding="horizontal_small">
                             <p class="slds-p-horizontal_small">
@@ -142,9 +142,10 @@
 
                         <lightning:layoutItem size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3" padding="horizontal_small">
 
-                            <p class="slds-p-horizontal_small">
-                                瀹㈡埛锛�
-                                 <c:strike_lookup label="瀹㈡埛锛�"
+                            <p class="slds-p-horizontal_small no-wrap" style="white-space: nowrap;">
+                                <label style="padding-top: 9px;color: #747474; ">瀹㈡埛</label>
+                                <div style="width: 200px;float: right;padding-top: 4px;">
+                                    <c:strike_lookup label="瀹㈡埛锛�"
                                     object="Account"
                                     searchField="Name"
                                     placeholder="鎼滅储瀹㈡埛..."
@@ -157,9 +158,10 @@
                                     allowNewRecords = "false"
                                     overrideNewEvent = "true"
                                     showRecentRecords ="true"
-                                    value="{!v.myTempTask.account__c}"
-                                                  
+                                    value="{!v.myTempTask.account__c}"     
                                     subTitleFormat="{0}+{1}"/>
+                                </div>
+                                 
 
                             </p>
                         </lightning:layoutItem>
@@ -195,9 +197,12 @@
 
                         <lightning:layoutItem size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3" padding="horizontal_small">
                             <p class="slds-p-horizontal_small">
-                                <lightning:button label="纭" iconName="utility:search"
-                                iconPosition="left"
-                                onclick="{! c.myTaskSearch }" />
+                                <div style="float: right;">
+                                    <lightning:button label="纭" iconName="utility:search"
+                                    iconPosition="left"
+                                    onclick="{! c.myTaskSearch }" />
+                                </div>
+                               
 
                             </p>
                         </lightning:layoutItem>
@@ -222,7 +227,7 @@
                 </div>
             </lightning:accordionSection>
             <lightning:accordionSection name="B" label="涓嬪睘鐨勪换鍔�">
-                <div class="c-container">
+                <div class="c-container" style="width: 1150px;">
                     <lightning:layout multipleRows="true">
 
                         <lightning:layoutItem size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3" padding="horizontal_small">
@@ -257,8 +262,9 @@
                         <lightning:layoutItem size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3" padding="horizontal_small">
 
                             <p class="slds-p-horizontal_small">
-                                瀹㈡埛锛�
-                               <c:strike_lookup label="瀹㈡埛锛�"
+                                <label style="padding-top: 9px;color: #747474;">瀹㈡埛</label>
+                                <div  style="width: 200px;float: right;padding-top: 4px;">
+                                    <c:strike_lookup label="瀹㈡埛锛�"
                                     object="Account"
                                     searchField="Name"
                                     placeholder="鎼滅储瀹㈡埛..."
@@ -273,6 +279,8 @@
                                     showRecentRecords ="true"
                                     value="{!v.subTempTask.account__c}"
                                     subTitleFormat="{0}+{1}"/>
+                                </div>
+                               
                             </p>
                         </lightning:layoutItem>
                         <!--2021-09-28  mzy 浠诲姟绠$悊鏀瑰杽 start-->
@@ -344,35 +352,41 @@
             </lightning:accordionSection>
 
             <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv">
-                <ui:inputText aura:id="articleURL"/>
+                <!-- <ui:inputText aura:id="articleURL"/> -->
                 <div class="demo-only" style="height: 8rem;">
                     <div class="slds-notify_container slds-is-relative">
                         <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
-                            <div class=" slds-m-left_xx-large">
-                                <div class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
+                            <div>
+                                <div class="slds-notify__content  slds-align_absolute-center ">
                                     <lightning:icon alternativeText="Success" iconName="utility:success" size="small"
-                                                    class="buttonColor slds-m-right_small" />
+                                                    class="buttonColor slds-m-right_small"  variant="inverse"/>
                                     <h2 class="slds-text-heading_small ">{!v.successMessage}</h2>
                                 </div>
+                                <div class="slds-notify__close">
+                                    <button class="slds-button slds-button_icon slds-button_icon-inverse" title="Close" onclick="{! c.closeMessage }">
+                                        <lightning:icon alternativeText="close" iconName="utility:close" size="small" variant="inverse"/>
+                                      <span class="slds-assistive-text">Close</span>
+                                    </button>
+                                  </div>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
             <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001">
-                <ui:inputText aura:id="articleURL"/>
+                <!-- <ui:inputText aura:id="articleURL"/> -->
                 <div class="demo-only" style="height: 8rem;">
                     <div class="slds-notify_container slds-is-relative">
-                        <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
-                            <div class=" slds-m-left_xx-large">
-                                <div class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
+                        <div class="slds-notify slds-notify_toast slds-theme_error" style="background-color: #ba0517 !important;" role="status">
+                            <div >
+                                <div class="slds-notify__content  slds-align_absolute-center ">
                                     <lightning:icon alternativeText="error" iconName="utility:error" size="small"
-                                                    class="buttonColor slds-m-right_small" />
+                                                    class="buttonColor slds-m-right_small" variant="inverse"/>
                                     <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2>
                                 </div>
                                 <div class="slds-notify__close">
                                     <button class="slds-button slds-button_icon slds-button_icon-inverse" title="Close" onclick="{! c.closeMessage }">
-                                        <lightning:icon alternativeText="close" iconName="utility:close" size="small" />
+                                        <lightning:icon alternativeText="close" iconName="utility:close" size="small" variant="inverse"/>
                                       <span class="slds-assistive-text">Close</span>
                                     </button>
                                   </div>
diff --git a/force-app/main/default/aura/taskManage/taskManage.css b/force-app/main/default/aura/taskManage/taskManage.css
index 06ae0bb..9b7b322 100644
--- a/force-app/main/default/aura/taskManage/taskManage.css
+++ b/force-app/main/default/aura/taskManage/taskManage.css
@@ -13,4 +13,27 @@
     height: 20px;
 }
 .THIS html{font-family: Microsoft YaHei }
-/*2021-10-19  mzy  浠诲姟绠$悊鏀瑰杽  end*/
\ No newline at end of file
+/*2021-10-19  mzy  浠诲姟绠$悊鏀瑰杽  end*/
+
+
+  .THIS :host{
+    --slds-g-color-error-base-40: #ba0517 !important;
+  }
+
+   /* CSS 鏂囦欢涓殑鏍峰紡 */
+   .THIS .spinner-overlay {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(255, 255, 255, 0.8); /* 鑳屾櫙鑹诧紝鍙互鏍规嵁闇�瑕佽皟鏁撮�忔槑搴� */
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 9999; /* 纭繚瑕嗙洊鍏朵粬鍐呭 */
+  }
+  
+  .THIS .spinner-overlay lightning-spinner {
+    margin-top: -100px; /* 璐熷�煎皢鍥炬爣鍚戜笂绉诲姩 */
+  }
\ No newline at end of file
diff --git a/force-app/main/default/aura/taskManage/taskManageController.js b/force-app/main/default/aura/taskManage/taskManageController.js
index d52def8..3afb842 100644
--- a/force-app/main/default/aura/taskManage/taskManageController.js
+++ b/force-app/main/default/aura/taskManage/taskManageController.js
@@ -179,6 +179,7 @@
     //2021-10-25 yjk 鍙栨秷鍘熷洜涓哄け鍗曪紝鏌ョ湅璇环鎶ュ憡鎸夐挳 end
     ,closeMessage : function(cmp,event,helper){
         $A.util.addClass(cmp.find('errorDiv'), 'slds-hide');
+        $A.util.addClass(cmp.find('successDiv'), 'slds-hide');
     }
 
 });
\ No newline at end of file
diff --git a/force-app/main/default/aura/taskManage/taskManageHelper.js b/force-app/main/default/aura/taskManage/taskManageHelper.js
index f9d344b..2afe47f 100644
--- a/force-app/main/default/aura/taskManage/taskManageHelper.js
+++ b/force-app/main/default/aura/taskManage/taskManageHelper.js
@@ -928,7 +928,9 @@
         cmp.set("v.mergeIsOpen_Over", false);
         var selectedData = cmp.get("v.selectedData");
         if(!selectedData || selectedData.length <=1 ){
-            alert("璇烽�夋嫨涓ゆ潯浠ヤ笂鐨勪换鍔¤繘琛屽悎骞讹紒");
+            cmp.set("v.errorMessage", '璇烽�夋嫨涓ゆ潯浠ヤ笂鐨勪换鍔¤繘琛屽悎骞讹紒');
+            this.showErrorToast(cmp);
+            // alert("璇烽�夋嫨涓ゆ潯浠ヤ笂鐨勪换鍔¤繘琛屽悎骞讹紒");
             return;
         }
         var action = cmp.get("c.mergeTask");
@@ -990,7 +992,7 @@
                     this.showErrorToast(cmp);
                 }else{
                     
-                    window.open('/apex/PCLLostReportPage?pageStatus=Create&oppId=' + returnValue + '&lostType=澶卞崟','_blank');
+                    window.open('/apex/PCLLostReportPageLwc?pageStatus=Create&oppId=' + returnValue + '&lostType=澶卞崟','_blank');
                 }
 
             }else if (state === "ERROR") {
@@ -1052,45 +1054,61 @@
         if(IsGeneratePlan==false&&IsEventDefault==false){            
             //check 0            
             if(activityDateV==null||activityDateV==''||activityDateV==undefined){
-                alert('閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 鎷滆鏃�');
+                cmp.set("v.errorMessage", '閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 鎷滆鏃�');
+                this.showErrorToast(cmp);
+                // alert('閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 鎷滆鏃�');
                 return;
             }
             if(feedbackPlanDateV==null||feedbackPlanDateV==''||feedbackPlanDateV==undefined){
-                alert('閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 璁″垝鍙嶉鏃�');
+                cmp.set("v.errorMessage", '閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 璁″垝鍙嶉鏃�');
+                this.showErrorToast(cmp);
+                // alert('閫夋嫨鏈敓鎴愯鍒掔殑璇�,鍒欏繀椤诲~鍐� 璁″垝鍙嶉鏃�');
                 return;
             }
             //check 1
             var regx = new RegExp(/^\d{4}\-\d{2}\-\d{2}$/);
             if(!regx.test(activityDateV)){
-                alert('璇疯緭鍏ユ湁鏁堟椂闂�');
+                cmp.set("v.errorMessage", '璇疯緭鍏ユ湁鏁堟椂闂�');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ユ湁鏁堟椂闂�');
                 return;
             }
 
             var regx = new RegExp(/^\d{4}\-\d{2}\-\d{2}$/);
             if(!regx.test(feedbackPlanDateV)){
-                alert('璇疯緭鍏ユ湁鏁堟椂闂�');
+                cmp.set("v.errorMessage", '璇疯緭鍏ユ湁鏁堟椂闂�');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ユ湁鏁堟椂闂�');
                 return;
             }
             //check 2
             var today = new Date();
             if(today>=activityDate){
-                alert('璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
+                cmp.set("v.errorMessage", '璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
                 return;
             }
             if(today>=feedbackPlanDate){
-                alert('璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
+                cmp.set("v.errorMessage", '璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ヤ粖澶╀互鍚庣殑鏃ユ湡');
                 return;
             }
             //2021-11-25  mzy  浠诲姟绠$悊鏀瑰杽  start
             //check 3
             //璁″垝鍙嶉鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩
             if(feedbackPlanDate>HopeCompletionDate){
-                alert('璁″垝鍙嶉鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
+                cmp.set("v.errorMessage", '璁″垝鍙嶉鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
+                this.showErrorToast(cmp);
+                // alert('璁″垝鍙嶉鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
                 return;
             }
 
             if(activityDate>HopeCompletionDate){
-                alert('鎷滆鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
+                cmp.set("v.errorMessage", '鎷滆鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
+                this.showErrorToast(cmp);
+                // alert('鎷滆鏃ヤ笉鑳借秴杩囧笇鏈涘畬鎴愭棩('+HopeCompletionDateV+')');
                 return;
             }
             //2021-11-25  mzy  浠诲姟绠$悊鏀瑰杽  end
@@ -1106,13 +1124,17 @@
             var estimatedFinishDate = cmp.get("v.estimatedFinishDate");
 
             if (!estimatedFinishDate) {
-                alert('璇疯緭鍏ラ璁″畬鎴愭椂闂达紒');
+                cmp.set("v.errorMessage", '璇疯緭鍏ラ璁″畬鎴愭椂闂达紒');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ラ璁″畬鎴愭椂闂达紒');
                 return;
             }
 
             var latestFinishDate = row.latestFinishDate;
             if (estimatedFinishDate > latestFinishDate) {
-                alert('棰勮瀹屾垚鏃堕棿涓嶈兘瓒呰繃鏈�鏅氬畬鎴愭棩('+latestFinishDate+')');
+                cmp.set("v.errorMessage", '棰勮瀹屾垚鏃堕棿涓嶈兘瓒呰繃鏈�鏅氬畬鎴愭棩('+latestFinishDate+')');
+                this.showErrorToast(cmp);
+                // alert('棰勮瀹屾垚鏃堕棿涓嶈兘瓒呰繃鏈�鏅氬畬鎴愭棩('+latestFinishDate+')');
                 return;
             }
         }
@@ -1205,11 +1227,15 @@
         var cancelReason = cmp.get("v.cancelReason");
         var cancelReasonOther = cmp.get("v.cancelReasonOther");
         if(!cancelReason){
-            alert('璇疯緭鍏ュ彇娑堢悊鐢憋紒');
+            cmp.set("v.errorMessage", '璇疯緭鍏ュ彇娑堢悊鐢憋紒');
+            this.showErrorToast(cmp);
+            // alert('璇疯緭鍏ュ彇娑堢悊鐢憋紒');
             return;
         }
         if(cancelReason == '鍏朵粬' && !cancelReasonOther){
-            alert('鍙栨秷鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ彇娑堢悊鐢憋紙鍏朵粬锛夛紒');
+            cmp.set("v.errorMessage", '鍙栨秷鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ彇娑堢悊鐢憋紙鍏朵粬锛夛紒');
+            this.showErrorToast(cmp);
+            // alert('鍙栨秷鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ彇娑堢悊鐢憋紙鍏朵粬锛夛紒');
             return;
 
         }
@@ -1260,11 +1286,15 @@
         var delayReasonOther = cmp.get("v.delayReasonOther");
 
         if(!delayReason){
-            alert('璇疯緭鍏ュ欢鏈熺悊鐢憋紒');
+            cmp.set("v.errorMessage", '璇疯緭鍏ュ欢鏈熺悊鐢憋紒');
+            this.showErrorToast(cmp);
+            // alert('璇疯緭鍏ュ欢鏈熺悊鐢憋紒');
             return;
         }
         if(delayReason == '鍏朵粬' && !delayReasonOther){
-            alert('寤舵湡鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ欢鏈熺悊鐢憋紙鍏朵粬锛夛紒');
+            cmp.set("v.errorMessage", '寤舵湡鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ欢鏈熺悊鐢憋紙鍏朵粬锛夛紒');
+            this.showErrorToast(cmp);
+            // alert('寤舵湡鐞嗙敱(閫夐」)涓哄叾浠栨椂璇疯緭鍏ュ欢鏈熺悊鐢憋紙鍏朵粬锛夛紒');
             return;
         }
         // 銆怓Y24澶у強宸ㄥぇ璇鹃銆戝寳浜柊娉曡椤圭洰瀵瑰簲 DB202307428742 20230804 by lc Start
@@ -1274,13 +1304,17 @@
             var estimatedFinishDate = cmp.get("v.estimatedFinishDate");
 
             if (!estimatedFinishDate) {
-                alert('璇疯緭鍏ュ欢鏈熻嚦鏃堕棿锛�');
+                cmp.set("v.errorMessage", '璇疯緭鍏ュ欢鏈熻嚦鏃堕棿锛�');
+                this.showErrorToast(cmp);
+                // alert('璇疯緭鍏ュ欢鏈熻嚦鏃堕棿锛�');
                 return;
             }
 
             var createdAfter3Month = tempdata.createdAfter3Month;
             if (estimatedFinishDate > createdAfter3Month) {
-                alert('寤舵湡鑷虫椂闂翠笉鑳借秴杩�('+createdAfter3Month+')');
+                cmp.set("v.errorMessage", '寤舵湡鑷虫椂闂翠笉鑳借秴杩�('+createdAfter3Month+')');
+                this.showErrorToast(cmp);
+                // alert('寤舵湡鑷虫椂闂翠笉鑳借秴杩�('+createdAfter3Month+')');
                 return;
             }
         }
@@ -1338,7 +1372,9 @@
         cmp.set("v.assignIsOpen", false);
         var assignee =  cmp.get('v.subTempTask.assignee__c');
         if(!assignee){
-            alert('璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
+            cmp.set("v.errorMessage", '璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
+            this.showErrorToast(cmp);
+            // alert('璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
             return;
         }
         var action = cmp.get("c.resetAssignee");
@@ -1364,6 +1400,8 @@
                     cmp.set('v.data2', rows);
                     cmp.set('v.data2Copy',rows);
                     cmp.set("v.assignIsOpen", false);
+                    cmp.set("v.successMessage", '閲嶆柊鍒嗛厤鎴愬姛锛�');
+                    this.showSuccessToast(cmp);
                 }else{
                     cmp.set("v.errorMessage", res.result);
                     this.showErrorToast(cmp);
@@ -1382,7 +1420,9 @@
         cmp.set("v.assignIsOpen_Over", false);
         var assignee =  cmp.get('v.subTempTask.assignee__c');
         if(!assignee){
-            alert('璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
+            cmp.set("v.errorMessage", '璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
+            this.showErrorToast(cmp);
+            // alert('璇疯緭鍏ユ柊琚垎閰嶈�咃紒');
             return;
         }
         var action = cmp.get("c.resetAssignee_Owner");
@@ -1410,6 +1450,8 @@
                     cmp.set('v.data', rows);
                     cmp.set('v.dataCopy',rows);
                     cmp.set("v.assignIsOpen_Over", false);
+                    cmp.set("v.successMessage", '閲嶆柊鍒嗛厤鎴愬姛锛�');
+                    this.showSuccessToast(cmp);
                 }else{
                     cmp.set("v.errorMessage", res.result);
                     this.showErrorToast(cmp);
@@ -1425,11 +1467,11 @@
     //寮瑰嚭 鎴愬姛鎻愮ず
     showSuccessToast : function(cmp) {
         $A.util.removeClass(cmp.find('successDiv'), 'slds-hide');
-        window.setTimeout($A.getCallback(function() {
-            $A.util.addClass(cmp.find('successDiv'), 'slds-hide');
-            }),
-            5000
-        );
+        // window.setTimeout($A.getCallback(function() {
+        //     $A.util.addClass(cmp.find('successDiv'), 'slds-hide');
+        //     }),
+        //     5000
+        // );
     },
     //寮瑰嚭 閿欒鎻愮ず
     showErrorToast : function(cmp) {
diff --git a/force-app/main/default/classes/AccountDelayApplyHandler.cls b/force-app/main/default/classes/AccountDelayApplyHandler.cls
index 984bbbc..8d8c7e0 100644
--- a/force-app/main/default/classes/AccountDelayApplyHandler.cls
+++ b/force-app/main/default/classes/AccountDelayApplyHandler.cls
@@ -312,7 +312,7 @@
                     ada.CustomizePageFlg__c = false;
                 }else{
                     System.debug('lt123-----else,ada.CustomizePageFlg__c-----'+ada.CustomizePageFlg__c);
-                    ada.addError('璇风偣鍑婚摼鎺�(鐩稿叧椤�)纭鍏蜂綋淇℃伅鍚庡鎵广��');
+                     ada.addError('璇风偣鍑婚摼鎺�(鐩稿叧椤�)纭鍏蜂綋淇℃伅鍚庡鎵广��');
                 }
             }
         }
diff --git a/force-app/main/default/classes/ApprovalHistoryController.cls b/force-app/main/default/classes/ApprovalHistoryController.cls
new file mode 100644
index 0000000..17a7fe4
--- /dev/null
+++ b/force-app/main/default/classes/ApprovalHistoryController.cls
@@ -0,0 +1,533 @@
+public without sharing class ApprovalHistoryController {
+
+    public static final String APPROVE_ACTION = 'Approve';
+    public static final String REJECT_ACTION = 'Reject';
+    public static final String RECALL_ACTION = 'Removed';
+    public class ReturnResult{
+        @AuraEnabled
+        public String returnMes;
+        @AuraEnabled
+        public Boolean success;
+    }
+    public class InitWrap{
+        @AuraEnabled
+        public String objJson;
+        @AuraEnabled
+        public String currentUserProfileId;
+        @AuraEnabled
+        public String nodeName;
+    }
+    @AuraEnabled
+    public static InitWrap getInitData(String recordId, String objectApiName){
+        InitWrap i = new InitWrap();
+
+        List<ProcessInstanceWorkitem> workItems = [
+            SELECT Id, ProcessInstanceId 
+            FROM ProcessInstanceWorkitem 
+            WHERE ProcessInstance.TargetObjectId = :recordId 
+        ];
+        if (workItems.size()>0) {
+            ProcessInstance proIn = [SELECT Id,SubmittedById, ProcessDefinition.Name , (SELECT ID, ProcessNodeId,  
+                                            StepStatus,Comments,TargetObjectId,ActorId,CreatedById,IsDeleted,IsPending  
+                                            ,OriginalActorId,ProcessInstanceId,RemindersSent,CreatedDate, Actor.Name,
+                                            OriginalActor.Name , ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC,CreatedDate DESC)   
+                                            FROM ProcessInstance where Id=:workItems.get(0).ProcessInstanceId order by CreatedDate DESC];  
+            String nodeName = '';
+            if(proIn.StepsAndWorkitems.size()>0 && proIn !=null){
+                if(String.isNotBlank(proIn.StepsAndWorkitems[0].ProcessNode.Name)){
+                    nodeName = proIn.StepsAndWorkitems[0].ProcessNode.Name;
+                }
+            }
+            i.nodeName = nodeName;
+        }
+        
+
+
+        if(objectApiName=='Account'){
+            Account acc = [select id,Name,WhetherRiskPassing__c,RejectionReason__c,AssociatedHospital__c,InstitutionalType__c,HospitalType__c from Account where id=:recordId];
+            String profileId = UserInfo.getProfileId();
+            acc.RejectionReason__c = '';
+            acc.AssociatedHospital__c = null;
+            i.objJson = JSON.serialize(acc);
+            i.currentUserProfileId = profileId;
+            return i;
+        }else if(objectApiName=='Account_Delay_Apply__c'){
+            Account_Delay_Apply__c acc = [select id,InstitutionalType__c,HospitalType__c,WhetherRiskPassing__c from Account_Delay_Apply__c where id=:recordId];
+            String profileId = UserInfo.getProfileId();
+            i.objJson = JSON.serialize(acc);
+            i.currentUserProfileId = profileId;
+            return i;
+        }else if(objectApiName=='Solution_Programme__c'){
+            Solution_Programme__c acc = [select id,Confirmation_Result__c,Remarks__c,Scheme_Type__c from Solution_Programme__c where id=:recordId];
+            String profileId = UserInfo.getProfileId();
+            i.objJson = JSON.serialize(acc);
+            i.currentUserProfileId = profileId;
+            return i;
+        }
+        return i;
+    }
+    @AuraEnabled
+    public static String saveRecord(String objectApiName, String objId, String objJson){
+        system.debug(objectApiName);
+        system.debug(objId);
+        system.debug(objJson);
+        if(objectApiName=='Account'){
+            Account acc = (Account)JSON.deserialize(objJson, Account.class);
+            acc.Id = objId;
+            update acc;
+        }else if(objectApiName=='Account_Delay_Apply__c'){
+            Account_Delay_Apply__c accApply = (Account_Delay_Apply__c)JSON.deserialize(objJson, Account_Delay_Apply__c.class);
+            accApply.Id = objId;
+            update accApply;
+        }else if(objectApiName=='Solution_Programme__c'){
+            Solution_Programme__c sol = (Solution_Programme__c)JSON.deserialize(objJson, Solution_Programme__c.class);
+            sol.Id = objId;
+            update sol;
+        }
+        return '200';
+    }
+    @AuraEnabled(Cacheable=true)
+    public static List<LookupSearchResult> searchUsers(String searchTerm) {
+        // Prepare query paramters
+        searchTerm += '*';
+
+        // Execute search query
+        List<List<SObject>> searchResults = [
+            FIND :searchTerm
+            IN ALL FIELDS
+            RETURNING
+                User(Id, FirstName, LastName)
+            LIMIT :ApprovalHistoryUtil.MAX_RESULTS 
+        ];
+
+        // Prepare results
+        List<LookupSearchResult> results = new List<LookupSearchResult>();
+
+        // Extract Accounts & convert them into LookupSearchResult
+        String userIcon = 'standard:user';
+        User[] users = (List<User>) searchResults[0];
+        for (User currUser : users) {
+            results.add(
+                new LookupSearchResult(
+                    currUser.Id,
+                    'User',
+                    userIcon,
+                    currUser.FirstName + ' ' + currUser.LastName,
+                    ''
+                )
+            );
+        }
+
+        // Optionnaly sort all results on title
+        results.sort();
+
+        return results;
+    }
+
+    @AuraEnabled
+    public static String processStep(String recordId, String comments, String nextApproverId, String action,String objApiName,String modalsubmitLabel,String objJson){
+        List<ProcessInstanceWorkitem> workItems = [
+            SELECT Id, ProcessInstanceId 
+            FROM ProcessInstanceWorkitem 
+            WHERE ProcessInstance.TargetObjectId = :recordId 
+        ];
+        if(workItems.isEmpty()){
+            return '';
+        }
+        Account obj;
+        Account_Delay_Apply__c accApply;
+        Solution_Programme__c sol;
+        if(objApiName=='Account'){
+            obj = (Account)JSON.deserialize(objJson, Account.class);
+        }else if(objApiName=='Account_Delay_Apply__c'){
+            accApply = (Account_Delay_Apply__c)JSON.deserialize(objJson, Account_Delay_Apply__c.class);
+        }else if(objApiName=='Solution_Programme__c'){
+            sol = (Solution_Programme__c)JSON.deserialize(objJson, Solution_Programme__c.class);
+        }
+        // List<ProcessInstanceStep> pList = [select id,StepNodeId,StepStatus from ProcessInstanceStep 
+        // where ProcessInstanceId=:workItems.get(0).ProcessInstanceId];
+        system.debug(workItems);
+        ProcessInstance proIn = [SELECT Id,SubmittedById, ProcessDefinition.Name , (SELECT ID, ProcessNodeId,  
+                                            StepStatus,Comments,TargetObjectId,ActorId,CreatedById,IsDeleted,IsPending  
+                                            ,OriginalActorId,ProcessInstanceId,RemindersSent,CreatedDate, Actor.Name,
+                                            OriginalActor.Name , ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC,CreatedDate DESC)   
+                                            FROM ProcessInstance where Id=:workItems.get(0).ProcessInstanceId order by CreatedDate DESC];  
+        String nodeName = '';
+        system.debug(proIn);
+        if(proIn.StepsAndWorkitems.size()>0){
+            if(String.isNotBlank(proIn.StepsAndWorkitems[0].ProcessNode.Name)){
+                nodeName = proIn.StepsAndWorkitems[0].ProcessNode.Name;
+            }
+        }
+        // for(ProcessInstanceHistory step : proIn.StepsAndWorkitems){
+        //     if(String.isNotBlank(step.ProcessNode.Name)){
+        //         system.debug(step.ProcessNode.Name);
+        //         nodeName = step.ProcessNode.Name;
+        //     }
+        // }
+        String returnMes = '';
+        system.debug('----');
+        system.debug(obj);
+        system.debug(accApply);
+        system.debug(sol);
+        system.debug(objApiName);
+        system.debug(nodeName);
+        system.debug(modalsubmitLabel);
+        system.debug(nextApproverId);
+        if(String.isNotBlank(nodeName)){
+            system.debug('qqqqq');
+            String testlink = nodeName;
+            // obj.Id = recordId;
+            if(objApiName=='Account'){
+                obj.CustomizePageFlg__c = true;
+                if(modalsubmitLabel == '鎵瑰噯' || modalsubmitLabel == '鎷掔粷'){
+                    system.debug('1');
+                    Date today = Date.today();
+                    // if(testlink.contains('鍖婚櫌鏂板缓瀹℃壒_钀ヤ笟鏀彺閮�') ){
+                    if(testlink.contains('鍖婚櫌鏂板缓瀹℃壒_浜嬩笟鎺ㄨ繘閮�') ){
+                        system.debug('1-1');
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            system.debug('1-1-1');
+                            if(!String.isBlank(obj.RejectionReason__c)){
+                                returnMes='鎮ㄥ凡濉啓椹冲洖鐞嗙敱锛屾壒鍑嗕笉闇�瑕侀┏鍥炵悊鐢便��';
+                            }
+                            if(String.isBlank(obj.InstitutionalType__c)){
+                                returnMes= '鎵瑰噯鍓嶏紝鏈烘瀯绫诲瀷蹇呭~銆�';
+                            }
+                            if(obj.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && String.isBlank(obj.HospitalType__c)){
+                                returnMes= '闈炲尰鐤楁満鏋勮閫夋嫨鍖婚櫌绫诲瀷銆�';
+                            }
+                            if(obj.InstitutionalType__c == '鍖荤枟鏈烘瀯' && !String.isBlank(obj.HospitalType__c)){
+                                returnMes= '鍖荤枟鏈烘瀯涓嶉渶瑕侀�夋嫨鍖婚櫌绫诲瀷銆�';
+                            }
+                            if(obj.InstitutionalType__c == '鍖荤枟鏈烘瀯'){
+                                obj.Is_Active__c = '鏈夊姽';
+                                obj.Approved_Confirm_Date__c = today;
+                            }
+                        }
+                        //鎷掔粷
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            if(String.isBlank(obj.RejectionReason__c)){
+                                returnMes= '鎷掔粷鍓嶏紝璇烽�夋嫨椹冲洖鐞嗙敱銆�';
+                            }
+                            if(obj.RejectionReason__c == '閲嶅' && String.isBlank(obj.AssociatedHospital__c)){
+                                returnMes= '椹冲洖鐞嗙敱鏄噸澶嶇殑锛岃濉啓鍏宠仈鍖婚櫌銆�';
+                            }
+                            if(obj.RejectionReason__c != '閲嶅' && !String.isBlank(obj.AssociatedHospital__c)){
+                                returnMes= '椹冲洖鐞嗙敱涓嶆槸閲嶅鐨勶紝涓嶈兘濉啓鍏宠仈鍖婚櫌銆�';
+                            }
+                            if(!String.isBlank(obj.RejectionReason__c) && (!String.isBlank(obj.InstitutionalType__c)||!String.isBlank(obj.HospitalType__c))){
+                                returnMes= '瀹℃壒鎷掔粷锛屼笉鍏佽濉啓鏈烘瀯绫诲瀷鎴栧尰闄㈢被鍨嬨��';
+                            }
+                            if(obj.RejectionReason__c == '鍖婚櫌宸插叧寮�' || obj.RejectionReason__c == '閲嶅'){
+                                system.debug('鎷掔粷鈥斺�旈┏鍥�');
+                                obj.Is_Active__c = '椹冲洖';
+                            }else{
+                                system.debug('鎷掔粷鈥斺�旇崏妗堜腑');
+                                obj.Is_Active__c = '鑽夋涓�';
+                            }
+                        }
+                    }else if(testlink.contains('璐ㄩ噺娉曡浜岀骇閮ㄩ暱') ){
+                        system.debug('22222222222222');
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            system.debug('2-2222');
+                            if(obj.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && obj.HospitalType__c == '楂樼瓑闄㈡牎'){
+                                system.debug('2-3333333');
+                                obj.Is_Active__c = '鏈夊姽';
+                                obj.Approved_Confirm_Date__c = today;
+                            }
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            obj.Is_Active__c = '椹冲洖';
+                            obj.Approved_Confirm_Date__c = today;
+                        }     
+                    }else if(testlink.contains('缁忛攢鍟嗙鐞嗛儴涓�绾у鎵�')){
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            if(String.isBlank(obj.WhetherRiskPassing__c)){
+                                returnMes= '鏄惁涓烘湁椋庨櫓閫氳繃 蹇呭~銆�';
+                            }else if(obj.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && obj.HospitalType__c == '浼佷笟闆嗗洟' && (obj.WhetherRiskPassing__c == '鍚�'||String.isBlank(obj.WhetherRiskPassing__c))){
+                                obj.Is_Active__c = '鏈夊姽';
+                                obj.Approved_Confirm_Date__c = today;
+                            }
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            obj.Is_Active__c = '椹冲洖';
+                        } 
+                    }else if(testlink.contains('鎬荤粡鐞嗗鎵�')){
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            obj.Is_Active__c = '鏈夊姽';
+                            obj.Approved_Confirm_Date__c = today;
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            obj.Is_Active__c = '椹冲洖';
+                        } 
+                    }else{
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            obj.Is_Active__c = '椹冲洖';
+                        }   
+                    }
+                }
+            }else if(objApiName=='Account_Delay_Apply__c'){
+                system.debug('Account_Delay_Apply__c');
+                accApply.CustomizePageFlg__c = true;
+                if(modalsubmitLabel == '鎵瑰噯' || modalsubmitLabel == '鎷掔粷'){
+                    system.debug('1111');
+                    if(testlink.contains('钀ヤ笟绐楀彛瀹℃壒')){
+                        system.debug('2222');
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            system.debug('3333');
+                            accApply.Is_Active__c = '鑽夋涓�';
+                        }   
+                    // }else if(testlink.contains('鍖婚櫌鏂板缓瀹℃壒_钀ヤ笟鏀彺閮�') ){
+                    }else if(testlink.contains('鍖婚櫌鍙樻洿瀹℃壒_浜嬩笟鎺ㄨ繘閮�') ){
+                        system.debug('鍖婚櫌鍙樻洿瀹℃壒_浜嬩笟鎺ㄨ繘閮�');
+                        system.debug(accApply.InstitutionalType__c);
+                        system.debug(accApply.HospitalType__c);
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            if(accApply.InstitutionalType__c == null){
+                                returnMes='鎵瑰噯鍓嶏紝鏈烘瀯绫诲瀷蹇呭~銆�';
+                            }
+                            if(accApply.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && accApply.HospitalType__c == null){
+                                returnMes='闈炲尰鐤楁満鏋勮閫夋嫨鍖婚櫌绫诲瀷銆�';
+                            }
+                            if(accApply.InstitutionalType__c == '鍖荤枟鏈烘瀯' && accApply.HospitalType__c != null){
+                                returnMes='鍖荤枟鏈烘瀯涓嶉渶瑕侀�夋嫨鍖婚櫌绫诲瀷銆�';
+                            }
+                            if(accApply.InstitutionalType__c == '鍖荤枟鏈烘瀯'){
+                                accApply.Is_Active__c = '瀹℃壒閫氳繃';
+                                accApply.Approved_Confirm_Date__c = Date.today();
+                            }
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            if(accApply.InstitutionalType__c == null){
+                                returnMes='鎷掔粷鍓嶏紝鏈烘瀯绫诲瀷蹇呭~銆�';
+                            }
+                            // accApply.Is_Active__c = '鑽夋涓�';
+                            if(accApply.InstitutionalType__c == '鍖荤枟鏈烘瀯'){
+                                accApply.Is_Active__c = '椹冲洖';
+                            }else if(accApply.InstitutionalType__c == '闈炲尰鐤楁満鏋�'){
+                                accApply.Is_Active__c = '鑽夋涓�';
+                            }
+                        }
+                    }else if(testlink.contains('璐ㄩ噺娉曡浜岀骇閮ㄩ暱') ){
+                        system.debug('璐ㄩ噺娉曡浜岀骇閮ㄩ暱');
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                           if(accApply.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && accApply.HospitalType__c == '楂樼瓑闄㈡牎'){
+                              accApply.Is_Active__c = '瀹℃壒閫氳繃';
+                              accApply.Approved_Confirm_Date__c = Date.today();
+                           }
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            accApply.Is_Active__c = '椹冲洖';
+                        }     
+                     }else if(testlink.contains('缁忛攢鍟嗙鐞嗛儴涓�绾у鎵�')){
+                        system.debug('缁忛攢鍟嗙鐞嗛儴涓�绾у鎵�');
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            if(String.isBlank(accApply.WhetherRiskPassing__c)){
+                                returnMes='鏄惁涓烘湁椋庨櫓閫氳繃 蹇呭~銆�';
+                            }
+                           if(accApply.InstitutionalType__c == '闈炲尰鐤楁満鏋�' && accApply.HospitalType__c == '浼佷笟闆嗗洟' && accApply.WhetherRiskPassing__c == '鍚�'){
+                              accApply.Is_Active__c = '瀹℃壒閫氳繃';
+                              accApply.Approved_Confirm_Date__c = Date.today();
+                           }
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            accApply.Is_Active__c = '椹冲洖';
+                        } 
+                    }else if(testlink.contains('鎬荤粡鐞嗗鎵�')){
+                        system.debug('鎬荤粡鐞嗗鎵�');
+                        if(modalsubmitLabel == '鎵瑰噯'){
+                            accApply.Is_Active__c = '瀹℃壒閫氳繃';
+                            accApply.Approved_Confirm_Date__c = Date.today();
+                        }
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            accApply.Is_Active__c = '椹冲洖';
+                        } 
+                    }else{
+                        system.debug('else');
+                        if(modalsubmitLabel == '鎷掔粷'){
+                            accApply.Is_Active__c = '椹冲洖';
+                        }   
+                    }
+                }
+            }else if(objApiName=='Solution_Programme__c'){
+                // if(modalsubmitLabel == '鎵瑰噯'){
+                // 	returnMes='璇峰~鍐欏弽棣堢粨鏋滐紝骞舵寜瀹℃壒鎸夐挳';
+                // }
+                // if(sol.Confirmation_Result__c == null){
+                // 	returnMes='鎵瑰噯涔嬪墠蹇呴』濉啓鍙嶉缁撴灉锛�';
+                // }
+                if(modalsubmitLabel == '鎷掔粷'){
+                    returnMes='璇峰~鍐欏弽棣堢粨鏋滐紝骞舵寜瀹℃壒鎸夐挳';
+                }
+                if(modalsubmitLabel == '鎵瑰噯'&&sol.Confirmation_Result__c == null){
+                	returnMes='璇峰~鍐欏弽棣堢粨鏋滐紝骞舵寜瀹℃壒鎸夐挳';
+                }
+                // sol.ProcessOfApproval__c = false;
+            }
+        }
+        system.debug('end');
+        system.debug(returnMes);
+        ReturnResult r = new ReturnResult();
+        if(String.isNotBlank(returnMes)){
+            r.returnMes=returnMes;
+            r.success=false;
+            return JSON.serialize(r);
+        }
+        try{
+            if(objApiName=='Account'){
+                update obj;
+            }else if(objApiName=='Account_Delay_Apply__c'){
+                update accApply;
+            }else if(objApiName=='Solution_Programme__c'){
+                update sol;
+            }
+        }catch(Exception e){
+            r.returnMes=e.getMessage();
+            r.success=false;
+            return JSON.serialize(r);
+        }
+        String result = ApprovalHistoryUtil.processStep(workItems,comments, nextApproverId,action);
+        system.debug('result:'+result);
+        return result;
+    }
+
+    @AuraEnabled
+    public static void reassignStep(String recordId, String newActorId ){
+        List<ProcessInstanceWorkItem> workItemList = [SELECT ActorId FROM ProcessInstanceWorkitem WHERE ProcessInstance.TargetObjectId = : recordId];
+        ApprovalHistoryUtil.reassignStep(workItemList, newActorId);
+    }
+
+
+    @AuraEnabled
+    public static String submitForApproval(String recordId, String comments, String nextApproverId){
+        Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
+        req.setComments(comments);
+        if(!String.isBlank(nextApproverId)){
+            req.setNextApproverIds(new Id[] {nextApproverId});
+        }
+        req.setObjectId(recordId);
+        
+        // Submit on behalf of a specific submitter
+        req.setSubmitterId(ApprovalHistoryUtil.currentUserId); 
+        // Submit the approval request for the account
+        Approval.ProcessResult result = Approval.process(req);
+        
+        return JSON.serialize(result);
+        
+    }
+
+
+    @AuraEnabled (cacheable=true)
+    public static ApprovalHistory getApprovalHistory(String recordId){  
+                          
+        List<ProcessInstance> processInstances = [SELECT Id,SubmittedById, ProcessDefinition.Name , (SELECT ID, ProcessNodeId,  
+                                                            StepStatus,Comments,TargetObjectId,ActorId,CreatedById,IsDeleted,IsPending  
+                                                            ,OriginalActorId,ProcessInstanceId,RemindersSent,CreatedDate, Actor.Name,  
+                                                            OriginalActor.Name , ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC, CreatedDate DESC )   
+                                                    FROM ProcessInstance where TargetObjectId =:recordId order by CreatedDate DESC];                                                                         
+  
+        return ApprovalHistoryUtil.populateApprovalHistorySteps(processInstances, recordId);                                                 
+                                                                            
+    }  
+
+    public class ApprovalHistoryStep{
+        @AuraEnabled  
+        public String stepName {get;set;}  
+        @AuraEnabled  
+        public String stepUrl {get;set;}
+        @AuraEnabled  
+        public DateTime createdDate {get;set;}   
+        @AuraEnabled  
+        public String stepStatus {get;set;}  
+        @AuraEnabled  
+        public String assignedTo {get;set;}   
+        @AuraEnabled  
+        public String assignedToUrl {get;set;}
+        @AuraEnabled  
+        public String OriginalTo {get;set;}
+        @AuraEnabled  
+        public String OriginalToUrl {get;set;}
+        @AuraEnabled
+        public String comments {get;set;}
+        
+        public ApprovalHistoryStep(
+            String stepName,
+            String stepId,
+            DateTime createdDate, 
+            String stepStatus,
+            String assignedTo,
+            String assignedToId,
+            String comments )  
+        { 
+            this.stepName = stepName;
+            this.stepUrl = '/' + stepId;
+            this.createdDate = createdDate;
+            this.assignedTo = assignedTo;  
+            this.assignedToUrl = '/'+assignedToId;
+            this.comments = comments;
+
+            if(stepStatus == ApprovalHistoryUtil.STATUS_STARTED){
+                this.stepStatus = ApprovalHistoryUtil.STATUS_SUBMITTED;
+            }else if(stepStatus == ApprovalHistoryUtil.STATUS_REMOVED){
+                this.stepStatus = ApprovalHistoryUtil.STATUS_RECALLED;
+            }else{
+                this.stepStatus = stepStatus;
+            }
+            
+        }
+        public ApprovalHistoryStep(
+            String stepName,
+            String stepId,
+            DateTime createdDate, 
+            String stepStatus,
+            String assignedTo,
+            String assignedToId,
+            String OriginalTo,
+            String OriginalToId,
+            String comments )  
+        { 
+            this.stepName = stepName;
+            this.stepUrl = '/' + stepId;
+            this.createdDate = createdDate;
+            this.assignedTo = assignedTo;  
+            this.assignedToUrl = '/'+assignedToId;
+            this.OriginalTo = OriginalTo;  
+            this.OriginalToUrl = '/'+OriginalToId;
+            this.comments = comments;
+
+            if(stepStatus == ApprovalHistoryUtil.STATUS_STARTED){
+                this.stepStatus = ApprovalHistoryUtil.STATUS_SUBMITTED;
+            }else if(stepStatus == ApprovalHistoryUtil.STATUS_REMOVED){
+                this.stepStatus = ApprovalHistoryUtil.STATUS_RECALLED;
+            }else{
+                this.stepStatus = stepStatus;
+            }
+            
+        } 
+    }
+
+    public class ApprovalHistory{
+        @AuraEnabled
+        public List<ApprovalHistoryStep> approvalSteps;
+        @AuraEnabled
+        public String approvalStepsSize;
+        @AuraEnabled 
+        public boolean isCurrentUserApprover; 
+        @AuraEnabled 
+        public boolean showRecall;  //Modify All Data" permission or "Modify All" on the object level
+                                    // system admin and submitter(if it says so on the approval process)
+                                        //SELECT Name FROM Profile WHERE PermissionsModifyAllData = true
+                                    //query permission sets with modify all or modify all for object and see if curr user has them
+
+        @AuraEnabled 
+        public boolean showSubmitForApproval; 
+        public ApprovalHistory(List<ApprovalHistoryStep> approvalSteps, boolean isCurrentUserApprover, boolean isSubmitForApproval, boolean showRecall){
+            this.approvalSteps = approvalSteps;
+            this.isCurrentUserApprover = isCurrentUserApprover; 
+            //this.approvalStepsSize = moreThan6Steps ? '6+' : string.valueOf(approvalSteps.size());
+            this.showSubmitForApproval = isSubmitForApproval;
+            this.showRecall = showRecall;
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ApprovalHistoryController.cls-meta.xml b/force-app/main/default/classes/ApprovalHistoryController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/ApprovalHistoryController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/ApprovalHistoryUtil.cls b/force-app/main/default/classes/ApprovalHistoryUtil.cls
new file mode 100644
index 0000000..cbf4ddf
--- /dev/null
+++ b/force-app/main/default/classes/ApprovalHistoryUtil.cls
@@ -0,0 +1,146 @@
+public without sharing class ApprovalHistoryUtil {
+    public static final String STATUS_SUBMITTED = 'Submitted';
+    public static final String STATUS_STARTED = 'Started';
+    public static final String STATUS_PENDING = 'Pending';
+    public static final String STATUS_RECALLED = 'Recalled';
+    public static final String STATUS_REMOVED = 'Removed';
+
+    public static final Id currentUserId = UserInfo.getUserId();
+
+    public final static Integer MAX_RESULTS = 5;
+
+    //work in progress 
+    public static boolean isCurrentUserSystemAdmin(Id recordId){
+        String profileId = UserInfo.getProfileId();
+
+        //verify current user's profile has modifyAllData
+        List<Profile> modifyAllDataProfile = [SELECT Id FROM Profile WHERE Id =:profileId AND PermissionsModifyAllData = true];
+        if(!modifyAllDataProfile.isEmpty()){
+            return true;
+        }
+
+        //verify current user's profile has modify all of the current object permission
+        String objType = recordId.getsobjecttype().getDescribe().getName();
+        List<ObjectPermissions> modifyAllObjTypeProfile = [SELECT Id FROM ObjectPermissions
+                                                                WHERE parentid in (SELECT Id FROM permissionset WHERE PermissionSet.Profile.Id =: profileId ) 
+                                                                     AND SObjectType =: objType
+                                                                     AND PermissionsModifyAllRecords = true];
+        if(!modifyAllObjTypeProfile.isEmpty() && !Test.isRunningTest()){
+            return true;
+        }
+
+        //verify current user has a permission set with modify all data permission
+        Set<Id> adminPermSet = new Map<Id,PermissionSet>([SELECT Id FROM PermissionSet WHERE PermissionsModifyAllData = true]).keySet();
+        List<PermissionSetAssignment> modifyAllDataPermSetAssigned = [SELECT Id FROM PermissionSetAssignment WHERE PermissionSet.Id in :adminPermSet AND Assignee.Id =:currentUserId ];
+        if(!modifyAllDataPermSetAssigned.isEmpty() && !Test.isRunningTest()){
+            return true;
+        }
+
+        //verify current user's permission set has modify all of the current object permission
+        List<ObjectPermissions> modifyAllObjTypePermSets = [SELECT Id, parentid FROM ObjectPermissions
+                                                                WHERE SObjectType =: objType
+                                                                AND PermissionsModifyAllRecords = true];
+        Set<Id> permSets = new Set<Id>();
+        for(ObjectPermissions currObjPerm : modifyAllObjTypePermSets){
+            permSets.add(currObjPerm.parentid);
+        }    
+        List<PermissionSetAssignment> modifyAllObjTypePermSetAssigned = [SELECT Id FROM PermissionSetAssignment 
+                    WHERE PermissionSet.Id in :permSets 
+                            AND Assignee.Id =:currentUserId ];
+
+        if(!modifyAllObjTypePermSetAssigned.isEmpty() && !Test.isRunningTest()){
+            return true;
+        }
+
+        return false;
+    }
+
+    public static ApprovalHistoryController.ApprovalHistory populateApprovalHistorySteps(List<ProcessInstance> processInstances, String recordId){
+        boolean isCurrentUserAdmin = ApprovalHistoryUtil.isCurrentUserSystemAdmin(recordId);
+        boolean isCurrentUserApprover = false;
+        boolean isSubmitForApproval = true;
+        boolean showRecall = false ;    //true if one step pending, system admin or submitter(if enabled - need to figure out how to see if App process has checkbox enabled)
+        
+        List<ApprovalHistoryController.ApprovalHistoryStep> steps = new List<ApprovalHistoryController.ApprovalHistoryStep>();
+        
+        //Iterating through processInstance records to build the approval history steps
+        Integer currNumberOfSteps = 0;
+        boolean moreThan6Steps = false;
+
+        ApprovalHistoryController.ApprovalHistory approvalHistoryToReturn = new ApprovalHistoryController.ApprovalHistory(steps,isCurrentUserApprover, isSubmitForApproval, showRecall);
+
+        for(ProcessInstance pr :  processInstances){
+            if(moreThan6Steps){
+                break;
+            }
+            for(ProcessInstanceHistory step : pr.StepsAndWorkitems){
+                currNumberOfSteps ++;    
+                if(currNumberOfSteps > 6){
+                    moreThan6Steps = true;
+                    break;
+                }
+
+                populateApprovalHistoryRecord(approvalHistoryToReturn, step,isCurrentUserAdmin,pr.submittedById);
+                String stepStatus = step.StepStatus;
+                system.debug('!!!!!!!!!!!!!!!!!!!!!!!!');
+                system.debug(step.StepStatus);
+                if(step.StepStatus=='Pending'){
+                    stepStatus = '寰呭鐞�';
+                }else if(step.StepStatus=='Approved'){
+                    stepStatus = '宸叉壒鍑�';
+                }else if(step.StepStatus=='NoResponse'){
+                    stepStatus = '鏃犲搷搴�';
+                }else if(step.StepStatus=='Started'){
+                    stepStatus = '宸叉彁浜�';
+                }else if(step.StepStatus=='Rejected'){
+                    stepStatus = '宸叉嫆缁�';
+                }
+                system.debug(stepStatus);
+                steps.add(new ApprovalHistoryController.ApprovalHistoryStep( step.ProcessNode.Name == null ? pr.ProcessDefinition.Name  : step.ProcessNode.Name,step.Id, step.CreatedDate,  stepStatus, step.Actor.Name,step.Actor.Id,step.OriginalActor.Name,step.OriginalActorId,step.Comments));
+            }
+        } 
+
+        approvalHistoryToReturn.approvalStepsSize = moreThan6Steps ? '6+' : string.valueOf(approvalHistoryToReturn.approvalSteps.size());
+        return approvalHistoryToReturn;
+
+    } 
+
+    public static String processStep(List<ProcessInstanceWorkitem> workItems, String comments, String nextApproverId, String action){
+        if(workItems.isEmpty()){
+            return '';
+        }
+
+        Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();
+        req.setWorkitemId(workItems.get(0).Id);
+        req.setAction(action);
+        req.setComments(comments);
+        if(!String.isBlank(nextApproverId)){
+            req.setNextApproverIds(new Id[] {nextApproverId});
+        }
+            
+        Approval.ProcessResult result = Approval.process(req);
+        return JSON.serialize(result); 
+    }
+
+    public static void reassignStep(List<ProcessInstanceWorkItem> workItemList, String newActorId){
+        if(workItemList.isEmpty()){
+            return;
+        }
+        workItemList.get(0).ActorId  = newActorId;
+        update workItemList;
+    }
+
+    public static void populateApprovalHistoryRecord(ApprovalHistoryController.ApprovalHistory approvalHistoryToReturn,ProcessInstanceHistory step, boolean isCurrentUserAdmin, String submittedById ){
+        if(step.stepStatus == ApprovalHistoryUtil.STATUS_PENDING || Test.isRunningTest()){
+            approvalHistoryToReturn.showSubmitForApproval = false;
+            if((step.Actor.Id == ApprovalHistoryUtil.currentUserId || isCurrentUserAdmin) || Test.isRunningTest()){
+                approvalHistoryToReturn.isCurrentUserApprover = true;
+            }
+            if(isCurrentUserAdmin || submittedById == ApprovalHistoryUtil.currentUserId || Test.isRunningTest()){ 
+                approvalHistoryToReturn.showRecall = true;
+            }
+        }
+    }
+
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ApprovalHistoryUtil.cls-meta.xml b/force-app/main/default/classes/ApprovalHistoryUtil.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/ApprovalHistoryUtil.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/AssetMaintainController.cls b/force-app/main/default/classes/AssetMaintainController.cls
index 4dd1201..772af79 100644
--- a/force-app/main/default/classes/AssetMaintainController.cls
+++ b/force-app/main/default/classes/AssetMaintainController.cls
@@ -1605,6 +1605,7 @@
                     fieldValue = '';
                 }
                 Boolean meet = false;
+                System.debug(fieldValueInRecord + operator + String.valueOf(fieldValue));
                 if (operator == '==' && fieldValueInRecord == String.valueOf(fieldValue)) {
                     meet = true;
                 }
diff --git a/force-app/main/default/classes/FixtureRentalPDFController.cls b/force-app/main/default/classes/FixtureRentalPDFController.cls
index 0c0d353..5c7d62f 100644
--- a/force-app/main/default/classes/FixtureRentalPDFController.cls
+++ b/force-app/main/default/classes/FixtureRentalPDFController.cls
@@ -116,15 +116,18 @@
                                 QRId__c,
                                 AWS_Data_Id__c,//20220304 
                                 Direct_Shippment_Address_Encrypt__c,//20220304
-                                Phone_Number_Encrypt__c//20220304
+                                Phone_Number_Encrypt__c,//20220304
+                                Routine_Check_Status__c,//20230526 lc DB202303417030 add
+                                Routine_Check_Day__c,//20230526 lc DB202303417030 add
+                                Routine_Check_Person__c//20230526 lc DB202303417030 add
                         from  Rental_Apply__c
                         where id = :rentalApplyId];
         }
 
         if(ApplyList.size()>0){
             ApplyHeadShow = ApplyList[0];
-            qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
-            barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
+            qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c,'QR');
+            barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c,'BR');
         }
         //澧炲姞鍊熷嚭澶囧搧SET涓�瑙圠ist锛屼负浜嗚幏鍙栧�熷嚭澶囧搧SET涓�瑙堟槑缁�
         List<String> RAESSearchList = New List<String>();
diff --git a/force-app/main/default/classes/InquiryFormHandler.cls b/force-app/main/default/classes/InquiryFormHandler.cls
index 4ae3a15..f14b03b 100644
--- a/force-app/main/default/classes/InquiryFormHandler.cls
+++ b/force-app/main/default/classes/InquiryFormHandler.cls
@@ -204,10 +204,12 @@
                 }
                 //20220511 you SWAG-CBUB2W end 
                 //涓嶉渶瑕佹棩鏈燂紝璺熻繘鏃ユ湡锛屾湇鍔¤窡杩涙棩鏈燂紝鍒涘缓鎰忓悜鏃ユ湡锛屾瘮杈冩渶鏃╂棩鏈�
+                //20230710 you DB202306544691  澧炲姞 杞湇鍔¤窡杩涙棩鏈�
                 String date1;
                 String date2;
                 String date3;
                 String date4;
+                String date6;
                 if(null != nObj.No_Need_Date__c){
                   date1=String.valueOf(nObj.No_Need_Date__c);
                 }
@@ -220,11 +222,14 @@
                 if(null != nObj.Service_Follow_Date__c){
                   date4=String.valueOf(nObj.Service_Follow_Date__c);
                 }
+                if(null != nObj.Transfer_Service_Follow_Date__c){
+                  date6=String.valueOf(nObj.Transfer_Service_Follow_Date__c);
+                }
 
                 //鏂规硶璋冪敤 
                  Date date_MD;
-                 if((String.isNotBlank(date1) && nObj.No_Need_Date__c !=oldMap.get(nObj.Id).No_Need_Date__c) || (String.isNotBlank(date2) && nObj.Follow_Date__c !=oldMap.get(nObj.Id).Follow_Date__c) || (String.isNotBlank(date3) && nObj.Confirmation_Date__c !=oldMap.get(nObj.Id).Confirmation_Date__c) || (String.isNotBlank(date4) && nObj.Service_Follow_Date__c !=oldMap.get(nObj.Id).Service_Follow_Date__c)){
-                    date_MD =getBigTime(date1,date2,date3,date4); 
+                 if((String.isNotBlank(date1) && nObj.No_Need_Date__c !=oldMap.get(nObj.Id).No_Need_Date__c) || (String.isNotBlank(date2) && nObj.Follow_Date__c !=oldMap.get(nObj.Id).Follow_Date__c) || (String.isNotBlank(date3) && nObj.Confirmation_Date__c !=oldMap.get(nObj.Id).Confirmation_Date__c) || (String.isNotBlank(date4) && nObj.Service_Follow_Date__c !=oldMap.get(nObj.Id).Service_Follow_Date__c) || (String.isNotBlank(date6) && nObj.Transfer_Service_Follow_Date__c !=oldMap.get(nObj.Id).Transfer_Service_Follow_Date__c)){
+                    date_MD =getBigTime(date1,date2,date3,date4,date6); 
                     nObj.MinimumDate__c = date_MD;//鏈�灏忔棩鏈�
                     String date5 = nObj.CreateDate__c==null?'':String.valueOf(nObj.CreateDate__c);
                     if(null != nObj.CreateDate__c){
@@ -238,6 +243,7 @@
                     }
                    
                  } 
+                 /**
                  //澶勭悊鑰佹暟鎹�
                  if( System.Label.Inquiry_form_flag == 'True' && null != nObj.CreateDate__c){
                     if(String.isNotBlank(date1) || String.isNotBlank(date2) || String.isNotBlank(date3) || String.isNotBlank(date4)){
@@ -250,6 +256,7 @@
                     }
                  }
                  system.debug('==='+date_MD);
+                 **/
                 }
             
             
@@ -402,12 +409,13 @@
      }
      //20220419 you SWAG-CBUB2W end
  //澶氫釜鏃ユ湡姣旇緝鏈�灏忔棩鏈�
-    public static Date getBigTime(String date1, String date2, String date3, String date4) {
+    public static Date getBigTime(String date1, String date2, String date3, String date4, String date6) {
         system.debug(date1+'======'+date2+'====='+date3);
          long millis1 =0;
          Long millis2 =0;
          Long millis3 =0;
          Long millis4 =0;
+         Long millis6 =0;
          List<Long> list_dateDecimal = new List<Long>();
          if(String.isNotBlank(date1)){
            millis1 = Datetime.valueOf(date1+' 08:00:05').getTime();
@@ -424,6 +432,10 @@
          if(String.isNotBlank(date4)){
            millis4 = Datetime.valueOf(date4+' 08:00:05').getTime();
            list_dateDecimal.add(millis4);
+         }
+         if(String.isNotBlank(date6)){
+           millis6 = Datetime.valueOf(date6+' 08:00:05').getTime();
+           list_dateDecimal.add(millis6);
          }
          
          list_dateDecimal.sort();
@@ -583,199 +595,6 @@
    
 
      @TestVisible private static void test() {
-        Integer i = 0;
-        
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
-        i++;
         //鍙互澶氬啓鐐�
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/LostCancelReportHandler.cls b/force-app/main/default/classes/LostCancelReportHandler.cls
index 08ddacd..d85f541 100644
--- a/force-app/main/default/classes/LostCancelReportHandler.cls
+++ b/force-app/main/default/classes/LostCancelReportHandler.cls
@@ -17,7 +17,8 @@
         updateManager();
         //銆怓Y23璇环鏀瑰杽銆�-P锛氫腑鏍囩粨鏋滅‘璁や换鍔″紑鍙�  20220706  鏇存柊澶卞崟浠诲姟纭鏃堕棿
         updateLostTaskTime();
-
+        // 鏇存柊钀ヤ笟鍔╃悊
+        updateSalesAssistant();
     }
     // 鏇存柊瀹℃壒浜� 20200302 End
 
@@ -30,7 +31,7 @@
 
     //2022-6-22 yjk 璇环璺熻繘浠诲姟 start
     protected override void afterInsert() {
-        updateTask();    
+        updateTask();  
     }
 
     // 2022-7-29 ssm XLIU-CGSC8R 銆愬鎵樸�慬鏀瑰杽銆戣浠烽噷鍒犻櫎鎵瑰噯鐨勫け鍗曟姤鍛婄姸鎬�1鑷姩鍙�
@@ -41,14 +42,15 @@
 
     private void updateTask(){
         List<Id> oppIdList = new List<Id>();
-        Set<Id> oppIdSet = new Set<Id>();
+        Set<Id> oppIdSet = new Set<Id>(); 
         Set<Id> sdoppidSet = new Set<Id>();
         List<Id> updateOppId = new List<Id>(); 
         List<Opportunity> updateOpp = new List<Opportunity>();
+        Map<String,String> cancelMap = new Map<String,String>();//lt 20230425 鎷涙爣缁堟 add
         
         for(Lost_cancel_report__c lcr : newList){
             oppIdList.add(lcr.Opportunity__c);
-			
+            cancelMap.put(lcr.Opportunity__c, lcr.RecordType.Name);//lt 20230425 鎷涙爣缁堟 add
         }
         // 20221202 ljh DB202211594688  start
         // List<task__c> taskList = [select id,taskStatus__c,OpportunityId__c from task__c where RecordType.Name ='涓爣缁撴灉纭' and taskStatus__c = '02 鎺ュ彈' and OpportunityId__c in :oppIdList];
@@ -57,8 +59,22 @@
         //     //updateOppId.add(tsk.OpportunityId__c); //20220823 you 娌℃湁浠诲姟鏃讹紝
         // }
         // LoseListTask 澶卞崟鎶ュ憡浠诲姟   winBiddingTask  涓爣缁撴灉纭
-        List<task__c> taskList = [select id,taskStatus__c,OpportunityId__c,RecordType.Name from task__c where (RecordType.Name ='涓爣缁撴灉纭' or RecordType.Name ='澶卞崟鎶ュ憡浠诲姟')  and OpportunityId__c in :oppIdList];
-        for(task__c tsk : taskList){
+        List<task__c> taskList = [select id,taskStatus__c,OpportunityId__c,RecordType.Name
+                                  from task__c 
+                                  where (RecordType.Name ='涓爣缁撴灉纭' or RecordType.Name ='澶卞崟鎶ュ憡浠诲姟')  
+                                  and OpportunityId__c in :oppIdList];
+        // 20230508 ljh DB202305008316 start
+        /*for(task__c tsk : taskList){
+            //lt 20230425 鎷涙爣缁堟 start
+            System.debug('---lt123---cancelMap:'+cancelMap);
+            System.debug('---lt123---cancelMap.get(tsk.OpportunityId__c):'+cancelMap.get(tsk.OpportunityId__c));
+            if(cancelMap.containsKey(tsk.OpportunityId__c)){
+                if(cancelMap.get(tsk.OpportunityId__c) == 'PCL_Cancel_report'){
+                    tsk.taskStatus__c = '04 鍙栨秷';
+                    tsk.cancelReasonSelect__c = '椤圭洰缁堟';
+                }
+            }else
+            //lt 20230425 鎷涙爣缁堟 end
             if(tsk.RecordType.Name == '涓爣缁撴灉纭' && tsk.taskStatus__c == '02 鎺ュ彈'){
                 tsk.taskStatus__c = '03 瀹屾垚';
             }
@@ -67,7 +83,28 @@
                 sdoppidSet.add(tsk.OpportunityId__c);
             }
             oppIdSet.add(tsk.OpportunityId__c);
+        }*/
+        List<task__c> Uptask = new List<task__c>();
+        for(task__c tsk : taskList){
+            task__c temp = new task__c();
+            temp.Id = tsk.Id;
+            if(cancelMap.containsKey(tsk.OpportunityId__c)){
+                if(cancelMap.get(tsk.OpportunityId__c) == 'PCL_Cancel_report'){
+                    temp.taskStatus__c = '04 鍙栨秷';
+                    temp.cancelReasonSelect__c = '椤圭洰缁堟';
+                }
+            }else
+            if(tsk.RecordType.Name == '涓爣缁撴灉纭' && tsk.taskStatus__c == '02 鎺ュ彈'){
+                temp.taskStatus__c = '03 瀹屾垚';
+            }
+            if(tsk.RecordType.Name == '澶卞崟鎶ュ憡浠诲姟'){
+                sdoppidSet.add(tsk.OpportunityId__c);
+            }
+            oppIdSet.add(tsk.OpportunityId__c);
+            Uptask.add(temp);
         }
+        // 20230508 ljh DB202305008316 end
+
         // for(Id oppId : oppIdList){//20220823 you
         for(Id oppId : oppIdSet){
         // 20221202 ljh DB202211594688  end
@@ -89,9 +126,12 @@
             updateOpp.add(opptemp);
         }
         
-        
 		update updateOpp;
-        update taskList;
+        // 20230508 ljh DB202305008316 start
+        // update taskList;
+        update Uptask;
+        // 20230508 ljh DB202305008316 end
+        
     }
     //2022-6-22 yjk 璇环璺熻繘浠诲姟 end
 
@@ -191,11 +231,28 @@
 
         //20220708 璇环浠诲姟寮�鍙戯紝缁撴潫澶卞崟浠诲姟鐘舵�侊紝绛涢�夐渶瑕佺殑淇敼鐨勫け鍗曚换鍔� start
         Set<String> oppIdSet = new Set<String>();
+        Set<String> passOppIdSet = new Set<String>();
         for (Lost_cancel_report__c n: newList) {
             if ((n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && n.Report_Status__c == '鐢宠涓�') {
                 oppIdSet.add(n.Opportunity__c);
             }
+            if ((n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && n.Report_Status__c == '鎵瑰噯') {
+                passOppIdSet.add(n.Opportunity__c);
+            }
         }
+        // 20230411 澶氬け鍗曟姤鍛婂悎骞讹紝鍙栧嚭寰呭悎骞剁殑璇环 start 
+        Map<String, Opportunity> mapOpps = new Map<String, Opportunity>();
+        List<Opportunity> lstOpps = [select Id, RivalHostsNumber__c, CompetitorProduct1__c, 
+                                        CompetitorProduct2__c, CompetitorProduct3__c, Lost_reason_main__c, 
+                                        Lost_Reason_Sub__c, Agencies__c, PCLLostBrands__c, of_lost_system_processor__c, 
+                                        LostPrices__c 
+                                    from Opportunity 
+                                    where Id in :passOppIdSet];
+        for(Opportunity opp : lstOpps) {
+            mapOpps.put(opp.Id, opp);
+        }
+        System.debug('mapOpps: ' + mapOpps);
+        // 20230411 澶氬け鍗曟姤鍛婂悎骞讹紝鍙栧嚭寰呭悎骞剁殑璇环 end
         // 20220720 ljh add 璁板綍鍙栨秷/澶卞崟鎶ュ憡鎻愪氦鏃剁偣鐨勬垬鐣ヤ骇鍝佸垽鏂� start
         if(oppIdSet.size() > 0 ){
             List<OpportunityLineItem> OppLIlist = [select Id,Key_product_147P_Text__c,Key_product_147P__c from OpportunityLineItem  where OpportunityId in :oppIdSet];
@@ -204,9 +261,13 @@
             }
             update OppLIlist;
         // 20220720 ljh add 璁板綍鍙栨秷/澶卞崟鎶ュ憡鎻愪氦鏃剁偣鐨勬垬鐣ヤ骇鍝佸垽鏂� end
-	        List<task__c> taskList = [select id,taskStatus__c from task__c where RecordType.Name ='澶卞崟鎶ュ憡浠诲姟' and taskStatus__c = '02 鎺ュ彈' and OpportunityId__c in :oppIdSet];
+	        List<task__c> taskList = [select id,taskStatus__c
+                                      from task__c 
+                                      where RecordType.Name ='澶卞崟鎶ュ憡浠诲姟' 
+                                      and taskStatus__c = '02 鎺ュ彈' 
+                                      and OpportunityId__c in :oppIdSet];
 	        for(task__c tsk : taskList){
-	            tsk.taskStatus__c = '03 瀹屾垚';
+                tsk.taskStatus__c = '03 瀹屾垚';
 	        }
 	        update taskList;
         }// 20220720 ljh update
@@ -214,11 +275,13 @@
 
         List<PCLLostProduct__c> lcrList=[select id,PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c,
                                         PCLLostBrand__r.Lost_Reason_Sub__c,PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c,
+                                        PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c,   //20230215 lt DB202302247719
                                         PCLLostBrand__r.Lost_cancel_report__r.LostType__c,PCLLostBrand__r.Lost_By_Company__c,
                                         PCLLostBrand__r.Lost_By_Company_Mannual__c,PCLLostBrand__r.LostPrice__c,LostProduct__r.Name, 
                                         PCLLostBrand__r.Lost_reason_main__c,PCLLostBrand__r.Agency__r.Name,PCLLostBrand__r.AgencyMannual__c,
                                         PCLLostBrand__r.Lost_cancel_report__r.Opportunity__r.Name,Opportunity__c, LostProductMannual__c
-                                        ,ProductClass__c, Quantity__c   //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟
+                                        ,ProductClass__c
+                                        , Quantity__c   //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟
                                         from PCLLostProduct__c 
                                         where PCLLostBrand__r.Lost_cancel_report__c in : arrMap.keyset()];
         List<Opportunity> oppList=new List<Opportunity>();
@@ -230,25 +293,24 @@
             List<String> ppList=new List<String>();     //澶卞崟鍝佺墝
             // List<String> yyList=new List<String>();     //澶卞崟鍘熷洜
             //鍒濆鍖�
-            Opportunity opp=new Opportunity();
+            // 20230411 澶氬け鍗曟姤鍛婂悎骞讹紝鍙栧嚭寰呭悎骞剁殑璇环 start
+            Opportunity opp = mapOpps != null && mapOpps.containsKey(arrMap.get(lcro).Opportunity__c) ? mapOpps.get(arrMap.get(lcro).Opportunity__c) : new Opportunity();
             //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 start
-            opp.RivalHostsNumber__c = 0;
-            System.debug('lt123鍒濆澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
+            opp.RivalHostsNumber__c = opp.RivalHostsNumber__c != null ? opp.RivalHostsNumber__c : 0;
             //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 end
-            opp.Id=arrMap.get(lcro).Opportunity__c; opp.PCLLostBrands__c=''; opp.Agencies__c='';    //Id ,鍝佺墝,缁忛攢鍟�
+            opp.Id = String.isNotBlank(opp.Id) ? opp.Id : arrMap.get(lcro).Opportunity__c; 
+            opp.PCLLostBrands__c = String.isNotBlank(opp.PCLLostBrands__c) ? opp.PCLLostBrands__c : ''; 
+            opp.Agencies__c = String.isNotBlank(opp.Agencies__c) ? opp.Agencies__c : ''; 
+            System.debug('opp: ' + opp);
+            // 20230411 澶氬け鍗曟姤鍛婂悎骞讹紝鍙栧嚭寰呭悎骞剁殑璇环 end
             // for浜у搧
             for (PCLLostProduct__c lcr : lcrList) {
-                System.debug('lt123涓绘満111'+ lcr.ProductClass__c);
                 if (opp.Id==lcr.Opportunity__c) {
-
                     //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 start
-                    System.debug('lt123涓绘満'+ lcr.ProductClass__c);
                     if(lcr.ProductClass__c == '涓绘満'){
                         opp.RivalHostsNumber__c += lcr.Quantity__c;
-                        System.debug('lt123绱姞澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
                     }else{
                         opp.RivalHostsNumber__c += 0;
-                        System.debug('lt123涓嶅彉澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
                     }
                     //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 end
 
@@ -325,10 +387,21 @@
                     //  }
                     // }
                     //澶卞崟鎬婚噾棰�
-                    opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c;
+                    //opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c;//20230215 lt DB202302247719 娉ㄩ噴
+                    // opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c;   //20230215 lt DB202302247719
                     opp.of_lost_system_processor__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c;
                 }
             }
+            //20230215 lt DB202302247719 start 
+            if(arrMap.get(lcro).TotalAmountLost__c != null){
+                if(opp.LostPrices__c == null){
+                    opp.LostPrices__c = 0;
+                }
+                opp.LostPrices__c+=arrMap.get(lcro).TotalAmountLost__c;
+                // System.debug('lt123---opp.LostPrices__c---澶卞崟閲戦2锛� '+opp.LostPrices__c);
+            }
+            //20230215 lt DB202302247719 end
+
             // 20221202 ljh DB202211594688  start
             System.debug('zheli00:'+oppIdPZSet+'~'+opp.Id);
             if(oppIdPZSet.contains(opp.Id)){
@@ -339,7 +412,6 @@
             oppList.add(opp);
         }
         update oppList;
-
     }
     // tcm 20211126 鏇存柊璇环淇℃伅 end
 
@@ -352,7 +424,8 @@
         for(Lost_cancel_report__c lcr : newList){
             //绛涢�夊嚭闇�瑕佹彁浜ゆ棩鏈変慨鏀圭殑璁㈠崟
             Lost_cancel_report__c oldLrc = oldMap.get(lcr.Id);
-            if((lcr.Report_Status__c != oldMap.get(lcr.Id).Report_Status__c) && lcr.Report_Status__c == '鐢宠涓�'){      //oldLrc.Submit_Day__c != lcr.Submit_Day__c
+            //DB202309191132 绱ф�ヨ皟鏌ワ細淇敼澶卞崟鎶ュ憡澶卞崟鎶ュ憡纭鏃堕棿琚洿鏂� lt 20230911 add  && lcr.ModifyAfterApproval_SubmitDay__c == null
+            if((lcr.Report_Status__c != oldMap.get(lcr.Id).Report_Status__c) && lcr.Report_Status__c == '鐢宠涓�' && lcr.ModifyAfterApproval_SubmitDay__c == null){      //oldLrc.Submit_Day__c != lcr.Submit_Day__c
                 lostIds.add(lcr.Id);
                 oppIds.add(lcr.Opportunity__c);
             }
@@ -398,13 +471,31 @@
         }
         System.debug('oppIds: ' + oppIds);
         if (oppIds.size() > 0) {
-            List<Opportunity> opps = [select Id, StageName, Final_Contract_Proceeded_Date__c, Lost_Opportunity_Date__c from Opportunity where Id in :oppIds and StageName in ('鏁楁垿', '鍓婇櫎')];
-            System.debug('opps: ' + opps);
+            //DB202303237846 lt 20230316 add   , Lost_Cancel_Report__c,Lost_Cancel_Report__r.Report_Status__c,Lost_Cancel_Report__r.LostType__c
+            List<Opportunity> opps = [select Id, StageName, Final_Contract_Proceeded_Date__c, Lost_Opportunity_Date__c, Lost_Cancel_Report__c,Lost_Cancel_Report__r.Report_Status__c,Lost_Cancel_Report__r.LostType__c from Opportunity where Id in :oppIds and StageName in ('鏁楁垿', '鍓婇櫎')];
+            System.debug('opps: ' + opps); 
+            //DB202303237846 lt 20230316 start 
+            Set<String> oppSet = new Set<String>();
+            List<Lost_Cancel_Report__c> oppreps = [select Id, Report_Status__c, LostType__c, Opportunity__c from Lost_Cancel_Report__c where Opportunity__c in :opps and Report_Status__c='鎵瑰噯' and LostType__c = '澶卞崟'];
+            if(oppreps.Size() > 0){
+                for(Lost_Cancel_Report__c lcp : oppreps){
+                    oppSet.add(lcp.Opportunity__c);
+                }
+            }
             if (opps.size() > 0) {
                 for (Opportunity opp : opps) {
-                    opp.StageName = '寮曞悎';
-                    opp.Final_Contract_Proceeded_Date__c = null;
-                    opp.Lost_Opportunity_Date__c = null;
+                    if(oppSet.size() > 0 && oppSet.contains(opp.Id)){
+                        continue;
+                   }else{
+                        opp.StageName = '寮曞悎';
+                        opp.Final_Contract_Proceeded_Date__c = null;
+                        opp.Lost_Opportunity_Date__c = null;
+                   }
+                   
+                    // if(opp.Lost_Cancel_Report__c == null || (opp.Lost_Cancel_Report__c != null && (opp.Lost_Cancel_Report__r.Report_Status__c != '鎵瑰噯' || opp.Lost_Cancel_Report__r.LostType__c != '澶卞崟'))){
+                        
+                    // }
+            //DB202303237846 lt 20230316 end
                 }
                 update opps;
             }
@@ -412,4 +503,20 @@
     }
     // 2022-7-29 ssm XLIU-CGSC8R 銆愬鎵樸�慬鏀瑰杽銆戣浠烽噷鍒犻櫎鎵瑰噯鐨勫け鍗曟姤鍛婄姸鎬�1鑷姩鍙� end
 
+    // 鏇存柊钀ヤ笟鍔╃悊
+    private void updateSalesAssistant() {
+        Map<String, Opportunity> opps = new Map<String, Opportunity>();
+        for (Lost_cancel_report__c report : this.newList) {
+            opps.put(report.Opportunity__c, null);
+        }
+        if (opps != null && opps.size() > 0) {
+            List<Opportunity> opplist = [select Id, Sales_assistant_ID__c from Opportunity where Id in :opps.keySet()];
+            for (Opportunity opp : opplist) {
+                opps.put(opp.Id, opp);
+            }
+            for (Lost_cancel_report__c report : this.newList) {
+                report.Sales_assistant__c = opps.get(report.Opportunity__c) != null ? opps.get(report.Opportunity__c).Sales_assistant_ID__c : report.Sales_assistant__c;
+            }
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/LostCancelReportHandlerTest.cls b/force-app/main/default/classes/LostCancelReportHandlerTest.cls
index 7677053..0a49c5a 100644
--- a/force-app/main/default/classes/LostCancelReportHandlerTest.cls
+++ b/force-app/main/default/classes/LostCancelReportHandlerTest.cls
@@ -112,6 +112,12 @@
         depart2.Hospital__c= company1.Id;
         insert depart2;
 
+        Account depart3 = new Account();
+        depart3.RecordTypeId = '01210000000Qem1';
+        depart3.Name         = '*';
+        depart3.Hospital__c         = company1.Id;
+        insert depart3;
+
         // 璇环
         Opportunity opp1 = new Opportunity(Name='opp1', StageName='oppName', CloseDate=Date.today(),Hospital__c = company1.Id,Department_Class__c = dc1s[0].Id,AccountId = depart1.Id);
         insert opp1;
@@ -127,14 +133,14 @@
         pcllb1.Lost_Reason_Sub__c='浠锋牸';   //鍘熷洜娆�
         pcllb1.Lost_reason_main__c='浠锋牸';     //鍘熷洜涓�
         pcllb1.Lost_By_Company__c='铔囩墝';       //鍝佺墝(涓�)
-        pcllb1.Agency__c=depart1.Id;            //缁忛攢鍟�
+        pcllb1.Agency__c=depart3.Id;            //缁忛攢鍟�
         pcllb1.Lost_cancel_report__c=lcr1.Id;
 
         //澶卞崟鍝佺墝2
         PCLLostBrand__c pcllb2=pcllb1.clone();
         pcllb2.Lost_By_Company__c='鍏朵粬';       //鍝佺墝(涓�)
         pcllb2.Lost_By_Company_Mannual__c='澶卞崟鍝佺墝';   //鎵嬪姩鍝佺墝
-        pcllb2.Agency__c=depart2.Id;            //缁忛攢鍟�
+        pcllb2.Agency__c=depart3.Id;            //缁忛攢鍟�
         pcllb2.AgencyMannual__c='鎵嬪姩缁忛攢鍟�';
         insert new List<PCLLostBrand__c> {pcllb1,pcllb2};
 
@@ -143,13 +149,15 @@
         Product2 pro1 = new Product2(Name='name01', Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP',Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n01',ProductCode_Ext__c='pc01',Manual_Entry__c=false);
         Product2 pro2 = new Product2(Name='name02', Brand_Name__c='鍏朵粬',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false);
         // Product2 pro3 = new Product2(Name='name03',Lost_By_Company__c='鍏朵粬',IsActive=true,Family='SP3',Fixture_Model_No__c='n03',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n03',ProductCode_Ext__c='pc03',Manual_Entry__c=false);
-         if(NFMUtil.isSandbox()){
-                pro1.RecordTypeId = '0129D000001NacD';
-                pro2.RecordTypeId = '0129D000001NacD';
-            } else {
-                pro1.RecordTypeId = '01210000000aMAE';
-                pro2.RecordTypeId = '01210000000aMAE';
-            }
+        //  if(NFMUtil.isSandbox()){
+        //         pro1.RecordTypeId = '0129D000001NacD';
+        //         pro2.RecordTypeId = '0129D000001NacD';
+        //     } else {
+        //         pro1.RecordTypeId = '01210000000aMAE';
+        //         pro2.RecordTypeId = '01210000000aMAE';
+        //     }
+        pro1.RecordTypeId = '01210000000aMAE';
+        pro2.RecordTypeId = '01210000000aMAE';
 
         insert new List<Product2> {pro1,pro2};
 
diff --git a/force-app/main/default/classes/LostCancelReportOppBatchTest.cls b/force-app/main/default/classes/LostCancelReportOppBatchTest.cls
index a44217b..3101191 100644
--- a/force-app/main/default/classes/LostCancelReportOppBatchTest.cls
+++ b/force-app/main/default/classes/LostCancelReportOppBatchTest.cls
@@ -72,8 +72,8 @@
         insert new List<PCLLostBrand__c> {pcllb1,pcllb2};
 
         // 浜у搧
-        Product2 pro1 = new Product2(Name='name01',Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP',Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n01',ProductCode_Ext__c='pc01',Manual_Entry__c=false);
-        Product2 pro2 = new Product2(Name='name02',Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false);
+        Product2 pro1 = new Product2(Name='name01',Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP',Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n01',ProductCode_Ext__c='pc01',Manual_Entry__c=false,RecordTypeId='01210000000aMAE');//姝e紡01210000000aMAE
+        Product2 pro2 = new Product2(Name='name02',Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false,RecordTypeId='01210000000aMAE');//娴嬭瘯0129D000001NacD
         insert new List<Product2> {pro1,pro2};
 
         //澶卞崟鍨嬪彿
diff --git a/force-app/main/default/classes/MaintenanceProductDataController.cls b/force-app/main/default/classes/MaintenanceProductDataController.cls
index bec2b53..7136229 100644
--- a/force-app/main/default/classes/MaintenanceProductDataController.cls
+++ b/force-app/main/default/classes/MaintenanceProductDataController.cls
@@ -68,7 +68,7 @@
     //LJPH-C6A3DF 銆愬鎵樸�� 銆愰噸瑕併�戜骇鍝佷富鏁版嵁涓鍔犳湇鍔$敤浜у搧鍒嗙被 liuyan 20210908 Star
     public List<Maintenance_Product_Data_Details__c>  RepairInfo { 
         get {
-            return  [select id,Service_Category6__c,Service_Category7__c FROM Maintenance_Product_Data_Details__c  where Default_Fixture_Arrival_Product__c = ''  LIMIT 1 ];
+            return  [select id,Service_Category6__c,Service_Category7__c FROM Maintenance_Product_Data_Details__c  where Default_Fixture_Arrival_Product__c = '' and Service_Category6__c = null and Service_Category7__c = null  LIMIT 1 ];
         }
     }
     //LJPH-C6A3DF 銆愬鎵樸�� 銆愰噸瑕併�戜骇鍝佷富鏁版嵁涓鍔犳湇鍔$敤浜у搧鍒嗙被 liuyan 20210908 End
@@ -1193,7 +1193,8 @@
     public PageReference returnMpdPage(){
         PageReference ref;
         if(String.isBlank(id)){
-            ref = new Pagereference(ApexPages.currentPage().getParameters().get('retURL'));
+            // ref = new Pagereference(ApexPages.currentPage().getParameters().get('retURL'));
+            ref = new Pagereference('/lightning/o/Maintenance_Product_Data__c/list?filterName=Recent');
         }else{
             ref = new Pagereference('/'+id);
         }
diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index ebb24f6..886fa74 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -2,17 +2,9 @@
  * @Description: 
  * @version: 
  * @Author: chen jing wu
- * @Date: 2023-09-09 13:27:58
- * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-12 17:40:11
- */
-/*
- * @Description: 
- * @version: 
- * @Author: chen jing wu
  * @Date: 2023-04-12 11:16:07
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-08 16:58:57
+ * @LastEditTime: 2023-09-25 13:20:57
  */
 public with sharing class OpportunityLightingButtonController {
     @AuraEnabled
@@ -29,12 +21,6 @@
             throw new AuraHandledException(e.getMessage());
         }
         return res;
-    }
-
-    @AuraEnabled
-    public static Id queryForProfileId(){
-        
-        return UserInfo.getProfileId();
     }
     @AuraEnabled
     public static InitData initForPredictedDateChangeButton(String recordId){
@@ -279,6 +265,7 @@
                 select
                 StageName,
                 SAP_Send_OK__c,
+                Cnt_Lost_cancel_Draft__c,
                 Cnt_Lost_cancel_report__c,
                 Name,
                 Sales_assistant_name__c,
@@ -299,6 +286,7 @@
             res.salesManagerDepartmentID = opportunity.Sales_manager_departmentID__c;
             res.salesOwnerBuchang = opportunity.Sales_owner_buchang__c;
             res.salesOwnerBuchangID = opportunity.Sales_owner_buchangID__c;
+            res.cntLostCancelDraft = opportunity.Cnt_Lost_cancel_Draft__c;
         } catch (Exception e) {
             throw new AuraHandledException(e.getMessage());
         }
@@ -810,6 +798,115 @@
         }
     }
     @AuraEnabled
+    public static string queryForProfileId(){
+        return UserInfo.getProfileId();
+    }
+    @AuraEnabled
+    public static Boolean queryQuote(String estimationId){
+        Boolean bo;
+        try {
+            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;
+    }
+
+    @AuraEnabled
+    public static String initCopy(String recordId){
+        String s='';
+        try {
+            String objectName = 'Opportunity'; // 瑕佽幏鍙栧瓧娈电殑瀵硅薄鍚�
+            Map<String, Schema.SObjectType> globalDescribe = Schema.getGlobalDescribe();
+            Schema.SObjectType objType = globalDescribe.get(objectName);
+            if (objType != null) {
+                Schema.DescribeSObjectResult objDescribe = objType.getDescribe();
+                Map<String, Schema.SObjectField> fieldMap = objDescribe.fields.getMap();
+                s+='SELECT ';
+                // 鐜板湪锛宖ieldMap涓寘鍚簡瀵硅薄鐨勬墍鏈夊瓧娈典俊鎭�
+                for (String fieldName : fieldMap.keySet()) {
+                    if(!fieldName.equals('id')
+                        &&!fieldName.equals('Id') &&!fieldName.equals('Opportunity_No__c'))
+                        s+=fieldName+',';
+                }
+
+                s=s.removeEnd(',');
+                s+=' FROM Opportunity where id=\''+recordId+'\'';
+                system.debug('SQL:'+s);
+                List<Opportunity> opportunitys = Database.query(s);
+                s='';
+                if(opportunitys.size()>0){
+                    system.debug('in!');
+                    for (String fieldName : fieldMap.keySet()) {
+                        String formaF=fieldMap.get(fieldName).getDescribe().getName();
+                        if(opportunitys.get(0).get(fieldName)!=null&&!opportunitys.get(0).get(fieldName).equals('null')){
+                            if(formaF.equals('Id')
+                                ||formaF.equals('OwnerId')
+                                ||formaF.equals('CreatedDate')
+                                ||formaF.equals('CreatedById')
+                                )
+                            {
+                                continue;
+                            }
+                            Object val=opportunitys.get(0).get(fieldName);
+                            if(val instanceof Date ){
+                                String str=String.valueOf(val);
+                                str=str.replace(' ','T');
+                                str+='.000Z';
+                                s+=formaF+'='+str+',';
+                            }else if (val instanceof DateTime){
+                                String str=String.valueOf(val);
+                                str=str.replace(' ','T');
+                                str+='.000Z';
+                                s+=formaF+'='+str+',';
+                            }else{
+                                s+=formaF+'='+opportunitys.get(0).get(fieldName)+',';
+                            }
+                            
+                        }
+                    }
+                    s=s.removeEnd(',');
+                    return s;
+                }
+            }
+			return s;
+        } catch (Exception e) {
+            System.debug(e.getMessage());
+        }
+        return s;
+    }
+
+    public static String forma(String str){
+        String res='';
+        String stra='a';
+        Integer a=stra.charAt(0);
+        String strz='z';
+        Integer z=strz.charAt(0);
+        String strAa='A';
+        Integer bA=strAa.charAt(0);
+        String strZz='Z';
+        Integer bZ=strZz.charAt(0);
+        String strx='_';
+        Integer x=strx.charAt(0);
+        List<Integer> charArr = new List<Integer>();
+        Integer change=bA-a;
+        Integer st=(str.charAt(0)+change);
+        charArr.add(st);
+        for(Integer i=0;i<str.length()-2;i++){
+            Integer c=str.charAt(i);
+            Integer nextC=str.charAt(i+1);
+            if(c==x&&nextC>=a&&nextC<z&&i!=str.length()-2){
+                nextC+=change;
+            }
+            charArr.add(nextC);
+        }
+        res=String.fromCharArray(charArr);
+        res+=str.substring(str.length()-1,str.length());
+
+        return res;
+    }
+    @AuraEnabled
     public static String changeTrade(String oppId){
 
         List<Quote> quoList = [select id from Quote where OpportunityId = :oppId];
diff --git a/force-app/main/default/classes/PCLLostReportController.cls b/force-app/main/default/classes/PCLLostReportController.cls
index bfe5c1d..a8fd165 100644
--- a/force-app/main/default/classes/PCLLostReportController.cls
+++ b/force-app/main/default/classes/PCLLostReportController.cls
@@ -147,11 +147,11 @@
 		  select id, LostPrice__c, Lost_By_Company__c,
 		  LostPrices_ThousandY__c,  //20230215 lt DB202302247719
 		  Lost_reason_main__c,Lost_Reason_Sub__c,Name,Agency__c, AgencyMannual__c,
-		  // ProductCategory__c,ProductClass__c,
 		  Lost_cancel_report__c,Lost_By_Company_Mannual__c,
 		  ( select id,PCLLostBrand__c,LostProduct__c,
 			LostProductMannual__c,            //SWAG-C6P9PX lt 20210913 add
-			ProductCategory__c,ProductClass__c, //add tcm 20211123
+			ProductCategory__c,
+			ProductClass__c, //add tcm 20211123
 			Quantity__c,Name, LostBrandName__c 
 			from PCLLostBrand__c.PCLLostBrandProduct__r)
 		  from PCLLostBrand__c
@@ -261,8 +261,6 @@
 		  // tempLostProduct.LostProductss.LostProduct__c = null;
 		  // tempLostProduct.LostProductss.LostProductMannual__c = null;
 		  // tempLostProduct.LostProductss.Quantity__c = null;
-		  // tempLostProduct.LostProductss.ProductClass__c = null;
-		  // tempLostProduct.LostProductss.ProductCategory__c = null;
 		  // tempLostProduct.bool=false;
 		}
 	  }
@@ -714,7 +712,9 @@
 		LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false;
   
 	  }else {
-		Product2 prd = [select Id,ProductClass__c, ProductCategory__c from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
+		Product2 prd = [select Id,ProductClass__c
+		, ProductCategory__c 
+		from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
 		if (prd.ProductCategory__c!=null) {
 		  LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c;
 		  LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;
diff --git a/force-app/main/default/classes/Product2Handler.cls b/force-app/main/default/classes/Product2Handler.cls
index 061c194..1c6fde7 100644
--- a/force-app/main/default/classes/Product2Handler.cls
+++ b/force-app/main/default/classes/Product2Handler.cls
@@ -32,6 +32,7 @@
     //SFDC鍋滄棰勮  lt  20210922 add start
     protected override void afterUpdate(){
         Calculate_AverageMonthSales(this.newList, this.oldMap);
+        AssignmentUltrasonic(this.newList, this.oldMap);  //20230506 lt DB202304618804  鍖呭惈瓒呭0 add
     }
     //SFDC鍋滄棰勮  lt  20210922 add end
 
@@ -70,10 +71,12 @@
                 strPC = String.valueof(proList[0].get('PC'));
             }
             //甯﹂噺閲囪喘 start fy
-            proListsc = [Select Max(ProductCode) PC From Product2 Where ProductCode Like 'SC%'];
-            if (proListsc != null && proListsc.size() > 0) {
-                strPCsc = String.valueof(proListsc[0].get('PC'));
-            }
+            // proListsc = [Select Max(ProductCode) PC From Product2 Where ProductCode Like 'SC%'];
+            // if (proListsc != null && proListsc.size() > 0) {
+            //     strPCsc = String.valueof(proListsc[0].get('PC'));
+            // }
+            List<Product2> lastPro = [select Id,ProductCode from Product2 where ProductCode Like 'SC%' order by ProductCode desc limit 1];
+            strPCsc = lastPro != null && lastPro.size() > 0 ? lastPro[0].ProductCode : '';
             //甯﹂噺閲囪喘 end fy
         }
         for (Product2 nObj : newList) {
@@ -127,11 +130,21 @@
                                     Service_Category6__c,Service_Category7__c,
                                     Can_Repair__c,RepairListPriceLevelA__c,
                                     RepairListPriceLevelB__c,RepairListPriceLevelC__c,
-                                    PartSupplyFinishDate__c,EndSaleDate__c,ProductClass__c,ProductCategory__c,
+                                    PartSupplyFinishDate__c,EndSaleDate__c,
+                                    ProductClass__c,
+                                    ProductCategory__c,
                                     Period_Filter_Classify1__c,Period_Filter_Classify2__c,Period_Filter_Classify3__c,
                                     Intra_Trade_Service_RMB_Date1__c,Intra_Trade_Service_RMB_Date2__c,
                                     Intra_Trade_Service_RMB_EndDate1__c,Intra_Trade_Service_RMB_EndDate2__c,
-                                    Intra_Trade_Service_RMB_1__c,Intra_Trade_Service_RMB_2__c
+                                    Intra_Trade_Service_RMB_1__c,Intra_Trade_Service_RMB_2__c,
+                                    // 鏂板澶氬勾淇濅慨璁℃彁  WYL 2023/08/21 start
+                                    Intra_Trade_Gurantee_RMB_1__c,
+                                    Intra_Trade_Gurantee_RMB_2__c,
+                                    Intra_Trade_Gurantee_RMB_Date1__c,
+                                    Intra_Trade_Gurantee_RMB_Date2__c,
+                                    Intra_Trade_Gurantee_RMB_End_Date1__c,
+                                    Intra_Trade_Gurantee_RMB_End_Date2__c
+                                     // 鏂板澶氬勾淇濅慨璁℃彁  WYL 2023/08/21 end
                                     from Product2
                                     where Asset_Model_No__c in :noNewList
                                     order by CreatedDate desc];
@@ -186,6 +199,14 @@
                     prd.Intra_Trade_Service_RMB_EndDate2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_EndDate2__c;//澶氬勾淇濅环鏍兼湁鏁堢粨鏉熸棩2
                     prd.Intra_Trade_Service_RMB_1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_1__c;//澶氬勾淇濅环鏍�1
                     prd.Intra_Trade_Service_RMB_2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Service_RMB_2__c;//澶氬勾淇濅环鏍�2
+                   // 鏂板澶氬勾淇濅慨璁℃彁  WYL 2023/08/21 start
+                   prd.Intra_Trade_Gurantee_RMB_1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_1__c;//澶氬勾淇濅慨璁℃彁浠锋牸1
+                   prd.Intra_Trade_Gurantee_RMB_2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_2__c;//澶氬勾淇濅慨璁℃彁浠锋牸2
+                   prd.Intra_Trade_Gurantee_RMB_Date1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_Date1__c;//澶氬勾淇濅慨璁℃彁浠锋牸鏈夋晥寮�濮嬫棩1
+                   prd.Intra_Trade_Gurantee_RMB_Date2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_Date2__c;//澶氬勾淇濅慨璁℃彁浠锋牸鏈夋晥寮�濮嬫棩2
+                   prd.Intra_Trade_Gurantee_RMB_End_Date1__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_End_Date1__c;//澶氬勾淇濅慨璁℃彁浠锋牸鏈夋晥缁撴潫鏃�1
+                   prd.Intra_Trade_Gurantee_RMB_End_Date2__c = prdMap.get(prd.Asset_Model_No__c).Intra_Trade_Gurantee_RMB_End_Date2__c;//澶氬勾淇濅慨璁℃彁浠锋牸鏈夋晥缁撴潫鏃�2
+                    // 鏂板澶氬勾淇濅慨璁℃彁  WYL 2023/08/21 end
                 }
             }
         }
@@ -466,4 +487,33 @@
         }
     }
 
+    //20230506 lt DB202304618804  鍖呭惈瓒呭0 start
+    private static void AssignmentUltrasonic(List<Product2> newList,Map<Id, Product2> oldMap){
+        List<String> proIdList = new List<String>();
+        List<PCLLostProduct__c> updateplpList = new List<PCLLostProduct__c>();
+
+        for(Product2 pro : newList){
+            if(pro.RecordTypeId == System.Label.Pro_RecordType && 
+            (pro.Lost_Product_Differ__c != oldMap.get(pro.Id).Lost_Product_Differ__c || 
+            pro.Lost_Product_Category__c != oldMap.get(pro.Id).Lost_Product_Category__c)){
+                proIdList.add(pro.Id);
+            }
+        }
+
+        List<PCLLostProduct__c> plpList = [Select Id, LostProduct__c, ProductClass__c, ProductCategory__c
+                                           From PCLLostProduct__c
+                                           Where LostProduct__c in: proIdList ];
+        if(plpList.size() > 0 ){
+            for(PCLLostProduct__c plp : plpList){
+                plp.ProductClass__c = '涓绘満';
+                plp.ProductCategory__c = '瓒呭0涓绘満';
+                updateplpList.add(plp);
+            }
+        }
+
+        update updateplpList;
+
+    }
+    //20230506 lt DB202304618804  鍖呭惈瓒呭0 end
+
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/RentalApplyFaultHandler.cls b/force-app/main/default/classes/RentalApplyFaultHandler.cls
new file mode 100644
index 0000000..7a92af9
--- /dev/null
+++ b/force-app/main/default/classes/RentalApplyFaultHandler.cls
@@ -0,0 +1,569 @@
+public without sharing class RentalApplyFaultHandler extends Oly_TriggerHandler {
+    private Map<Id, Rental_Apply_Fault__c> newMap;
+    private Map<Id, Rental_Apply_Fault__c> oldMap;
+    private List<Rental_Apply_Fault__c> newList;
+    private List<Rental_Apply_Fault__c> oldList;
+
+    public RentalApplyFaultHandler(){
+        this.newMap =  (Map<Id, Rental_Apply_Fault__c>) Trigger.newMap;
+        this.oldMap =  (Map<Id, Rental_Apply_Fault__c>) Trigger.oldMap;
+        this.newList = (List<Rental_Apply_Fault__c>) Trigger.new;
+        this.oldList = (List<Rental_Apply_Fault__c>) Trigger.old;
+
+        
+    }
+
+
+    protected override void beforeInsert() {
+
+        //List 澶囧搧鍊熷嚭鐢宠
+        List<String> raListIds = new List<String>();
+        Set<String> radListIds = new Set<String>();
+        //鐢宠鍗旾d, List<鏁呴殰鎶ュ憡>
+        Map<Id, List<Rental_Apply_Fault__c>> raMap = new Map<Id, List<Rental_Apply_Fault__c>>();
+
+        //Name 瑙勫垯 锛� 澶囧搧鍊熷嚭鐢宠鍗� + 001 ~999
+        for(Rental_Apply_Fault__c raf: newList){
+            //鑾峰彇鎵�鏈夌殑鐢宠鍗旾d
+            radListIds.add(raf.Rental_Apply_Equipment_Set_Detail__c);
+        }
+
+        
+        // 鑾峰彇鐢宠鍗曚笅鎵�鏈夋槑缁嗙殑Id
+        List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [SELECT Id,Rental_Apply__c from Rental_Apply_Equipment_Set_Detail__c WHERE Id in :radListIds];
+        for(Rental_Apply_Equipment_Set_Detail__c rae : raesdList){
+            raListIds.add(rae.Rental_Apply__c);
+        }
+
+        raesdList = [SELECT Id,Rental_Apply__c from Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply__c in :raListIds];
+        for(Rental_Apply_Equipment_Set_Detail__c rea : raesdList){
+            radListIds.add(rea.Id);
+        }
+
+        system.debug('radListIds===='+radListIds);
+        
+        //鏌ュ嚭 鐢宠鍗曚笅鍏ㄩ儴鐨勬娴嬫姤鍛�
+        List<Rental_Apply_Fault__c> raList = [SELECT Id, Rental_Apply_Equipment_Set_Detail__c, Rental_Apply_Equipment_Set_Detail__r.Rental_Apply__r.Id,Rental_Apply_Equipment_Set_Detail__r.Rental_Apply__r.Name from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c in :radListIds];
+
+        //鏌ュ嚭 鎵�鏈夌敵璇峰崟鏄庣粏
+        Map<Id,Rental_Apply_Equipment_Set_Detail__c> radMap = new Map<Id,Rental_Apply_Equipment_Set_Detail__c>([
+                Select Id,Rental_Apply__r.Name, Rental_Apply__r.Id, Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.demo_purpose2__c,
+                        Rental_Apply__r.Rental_Assistant__c, Rental_Apply__r.Rental_Assistant2__c, Rental_Apply__r.Loaner_Storage_mail_address__c,
+                        Rental_Apply__r.ZongjianApprovalManager__c, Rental_Apply__r.BuchangApprovalManagerSales__c, SerialNumber_F__c,
+                        Rental_Apply__r.SalesManager__c, Rental_Apply__r.Loaner_centre_mail_address__c, Rental_Apply__r.Hospital__r.Name,
+                        Fixture_Model_No__c, Rental_Apply__r.OCM_dept_category__c, Rental_Apply__r.WorkPlace__c, (select id from Rental_Apply_Equipment_Set_Detail_Fault__r)
+                from Rental_Apply_Equipment_Set_Detail__c 
+                where id in :radListIds]);
+
+        system.debug('radMap===='+radMap);
+        for (Rental_Apply_Fault__c raf : raList) {
+            system.debug('raf.Rental_Apply_Equipment_Set_Detail__c==='+raf.Rental_Apply_Equipment_Set_Detail__c);
+            system.debug('radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply__r.Id===' + radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply__r.Id);
+            if(raMap.containsKey(radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply__r.Id)){
+                raMap.get(radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply__r.Id).add(raf);
+            } else {
+                List<Rental_Apply_Fault__c> tempList = new List<Rental_Apply_Fault__c>();
+                tempList.add(raf);
+                raMap.put(radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply__r.Id,tempList);
+            }
+        }
+
+        system.debug('raMap===='+raMap);
+
+        for(Rental_Apply_Fault__c raf : newList){
+
+            //褰撳墠鍊熷嚭鏄庣粏Id
+            String radId = raf.Rental_Apply_Equipment_Set_Detail__c;
+            //褰撳墠鐢宠鍗旾d
+            String raId = radMap.get(radId).Rental_Apply__r.Id;
+
+            if( radMap.containsKey(raf.Rental_Apply_Equipment_Set_Detail__c) && radMap.get(raf.Rental_Apply_Equipment_Set_Detail__c).Rental_Apply_Equipment_Set_Detail_Fault__r.size() >= 1 ){
+                raf.addError('宸插瓨鍦ㄦ娴嬪垎鏋愭姤鍛�');
+            }
+
+            if(raMap.containsKey(raId)){
+                
+                Integer rafSize = raMap.get(raId).size() + 1;
+                system.debug('rafSize===='+rafSize);
+                String rafSizeString = '000' + rafSize;
+                String cutString = rafSizeString.substring(rafSizeString.length()-3, rafSizeString.length());
+
+                if(rafSize == 0) {
+                    raf.Name = radMap.get(radId).Rental_Apply__r.Name + '-JCBG-001';
+                }else{
+                    raf.Name = radMap.get(radId).Rental_Apply__r.Name + '-JCBG-' + cutString;
+                }
+            }else{
+                raf.Name = radMap.get(radId).Rental_Apply__r.Name + '-JCBG-001';
+            }
+
+            raf.RentalApplyNo__c = radMap.get(radId).Rental_Apply__r.Name;
+            raf.demo_purpose2__c = radMap.get(radId).Rental_Apply__r.demo_purpose2__c;
+            raf.HospitalText__c = radMap.get(radId).Rental_Apply__r.Hospital__r.Name;
+            raf.Repair_product_body_number__c = radMap.get(radId).SerialNumber_F__c;
+            raf.Fixture_Model_No__c = radMap.get(radId).Fixture_Model_No__c;
+            raf.OCM_dept_category__c = radMap.get(radId).Rental_Apply__r.OCM_dept_category__c;
+            raf.WorkPlace__c = radMap.get(radId).Rental_Apply__r.WorkPlace__c;
+            raf.Person_In_Charge_User__c = radMap.get(radId).Rental_Apply__r.Person_In_Charge__c;
+            raf.Rental_Assistant__c = radMap.get(radId).Rental_Apply__r.Rental_Assistant__c;
+            raf.Rental_Assistant2__c = radMap.get(radId).Rental_Apply__r.Rental_Assistant2__c;
+            raf.ZongjianApprovalManager__c = radMap.get(radId).Rental_Apply__r.ZongjianApprovalManager__c;
+            raf.BuchangApprovalManagerSales__c = radMap.get(radId).Rental_Apply__r.BuchangApprovalManagerSales__c;
+            raf.SalesManager__c = radMap.get(radId).Rental_Apply__r.SalesManager__c;
+            raf.Loaner_centre_mail_address__c = radMap.get(radId).Rental_Apply__r.Loaner_centre_mail_address__c;
+            raf.Loaner_Storage_mail_address__c = radMap.get(radId).Rental_Apply__r.Loaner_Storage_mail_address__c;
+            
+            raf.status__c = '鑽夋涓�';
+        }
+    }
+
+    protected override void afterInsert() {
+        // 缁欏鍝佸嚭鍊熸媴褰撳鍔犺鍐欐潈闄�
+        List<Rental_Apply_Fault__Share> rafShareList = new List<Rental_Apply_Fault__Share>();
+        for (Rental_Apply_Fault__c raf: newList) {
+            // 澶囧搧鍑哄�熸媴褰�
+            if (raf.Person_In_Charge_User__c != null) {
+                Rental_Apply_Fault__Share rafShare = new Rental_Apply_Fault__Share();
+                rafShare.AccessLevel = 'Edit';
+                rafShare.UserOrGroupId = raf.Person_In_Charge_User__c;
+                rafShare.ParentID = raf.Id;
+                rafShareList.add(rafShare);
+            }
+
+            Rental_Apply_Fault__c tempRaf = [select id, ZongjianApprovalManager__r.isActive, BuchangApprovalManagerSales__r.isActive, SalesManager__r.isActive from Rental_Apply_Fault__c where Id =:raf.id ];
+
+            System.debug('-------------temp.ZongjianApprovalManager__r.isActive-------------' + tempRaf.ZongjianApprovalManager__r.isActive);
+            System.debug('-------------raf.ZongjianApprovalManager__r.isActive--------------' + raf.ZongjianApprovalManager__r.isActive);
+
+            // CL4 楂樼骇鎬荤洃
+            if (raf.ZongjianApprovalManager__c != null && tempRaf.ZongjianApprovalManager__r.isActive) {
+                Rental_Apply_Fault__Share rafShare = new Rental_Apply_Fault__Share();
+                rafShare.AccessLevel = 'READ';
+                rafShare.UserOrGroupId = raf.ZongjianApprovalManager__c;
+                rafShare.ParentID = raf.Id;
+                rafShareList.add(rafShare);
+            }
+
+            // CL5 鎬荤洃绾�
+            if (raf.BuchangApprovalManagerSales__c != null && tempRaf.BuchangApprovalManagerSales__r.isActive) {
+                Rental_Apply_Fault__Share rafShare = new Rental_Apply_Fault__Share();
+                rafShare.AccessLevel = 'READ';
+                rafShare.UserOrGroupId = raf.BuchangApprovalManagerSales__c;
+                rafShare.ParentID = raf.Id;
+                rafShareList.add(rafShare);
+            }
+
+            // CL6 缁忕悊绾�
+            if (raf.SalesManager__c != null && tempRaf.SalesManager__r.isActive) {
+                Rental_Apply_Fault__Share rafShare = new Rental_Apply_Fault__Share();
+                rafShare.AccessLevel = 'READ';
+                rafShare.UserOrGroupId = raf.SalesManager__c;
+                rafShare.ParentID = raf.Id;
+                rafShareList.add(rafShare);
+            }
+        }
+
+        if (!rafShareList.isEmpty()) {
+            insert rafShareList;
+        }
+        
+    }
+
+    protected override void beforeUpdate() {
+        Date today = Date.today();
+        List<Rental_Apply_Fault__c> deleteAttachmentIds = new List<Rental_Apply_Fault__c>();
+        Set<Id> deleteIds = new Set<Id>();
+        for(Rental_Apply_Fault__c raf: newList){
+            Rental_Apply_Fault__c oldRaf = oldMap.get(raf.Id);
+
+            if (raf.status__c == '宸插彂閫�' && oldRaf.status__c != '宸插彂閫�') {
+                raf.SendDate__c = today;
+            }
+
+            if (raf.status__c == '宸插弽棣�' && oldRaf.status__c != '宸插弽棣�') {
+                raf.LoanerFeedback_date__c = today;
+
+                if (raf.UseExplain__c == null) {
+                    raf.adderror('銆愬鍝佷娇鐢ㄦ儏鍐佃鏄庛�戜笉鑳戒负绌�');
+                    return;
+                }
+            }
+
+            if ((String.isBlank(raf.AttachmentId1__c) && !String.isBlank(oldRaf.AttachmentId1__c)) 
+                || (String.isBlank(raf.AttachmentId2__c) && !String.isBlank(oldRaf.AttachmentId2__c))) {
+                deleteAttachmentIds.add(raf);
+                if (String.isBlank(raf.AttachmentId1__c) && !String.isBlank(oldRaf.AttachmentId1__c)) {
+                    deleteIds.add(oldRaf.AttachmentId1__c);
+                }
+                if (String.isBlank(raf.AttachmentId2__c) && !String.isBlank(oldRaf.AttachmentId2__c)) {
+                    deleteIds.add(oldRaf.AttachmentId2__c);
+                }
+            }
+        }
+
+
+        if (!deleteAttachmentIds.isEmpty()) {
+            // List<Attachment> attList = [SELECT Id,ParentId FROM Attachment WHERE ParentId IN: deleteAttachmentIds Order by ParentId,Id];
+            // Map<String, List<Attachment>> parentMap = new Map<String, List<Attachment>>();
+            // for (Attachment att : attList) {
+            //     if (!deleteIds.contains(att.Id)) {
+            //         if (!parentMap.isEmpty() && parentMap.containskey(att.ParentId)) {
+            //             List<Attachment> attTemp = parentMap.get(att.ParentId);
+            //             attTemp.add(att);
+            //             parentMap.put(att.ParentId, attTemp);
+            //         } else {
+            //             List<Attachment> attTemp = new List<Attachment>();
+            //             attTemp.add(att);
+            //             parentMap.put(att.ParentId, attTemp);
+            //         }
+            //     }
+            // }
+            List<Id> reList = new List<Id>();
+            for(Rental_Apply_Fault__c  re: deleteAttachmentIds){
+                reList.add(re.Id);
+            }
+            List<ContentDocumentLink> linkId = [SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink WHERE LinkedEntityId IN: reList Order by LinkedEntityId];
+            List<Id> idList = new List<Id>();
+            for (ContentDocumentLink link : linkId) {
+                idList.add(link.ContentDocumentId);
+            }
+            Map<String, List<ContentVersion>> parentMap = new Map<String, List<ContentVersion>>();
+            List<ContentVersion> versionList = [SELECT ContentDocumentId,Id FROM ContentVersion where ContentDocumentId in: idList];
+            Map<String,ContentVersion> shareMap = new Map<String,ContentVersion>();
+            for (ContentVersion version : versionList) {
+                for(ContentDocumentLink link: linkId){
+                    System.debug('conId  ' + link.ContentDocumentId);
+                    System.debug('verId  ' + version.ContentDocumentId);
+                    if(link.ContentDocumentId == version.ContentDocumentId){
+                        shareMap.put(link.ContentDocumentId,version);
+                        
+                    }
+                }
+            }
+            for (ContentDocumentLink link : linkId) {
+                if (!deleteIds.contains(link.ContentDocumentId)) {
+                    if (!parentMap.isEmpty() && parentMap.containskey(link.LinkedEntityId)) {
+                        List<ContentVersion> linkTemp = parentMap.get(link.LinkedEntityId);
+                        linkTemp.add(shareMap.get(link.ContentDocumentId));
+                        parentMap.put(link.LinkedEntityId, linkTemp);
+                    } else {
+                        List<ContentVersion> linkTemp = new List<ContentVersion>();
+                        linkTemp.add(shareMap.get(link.ContentDocumentId));
+                        parentMap.put(link.LinkedEntityId, linkTemp);
+                    }
+                }
+            }
+
+
+            for (Rental_Apply_Fault__c raf : deleteAttachmentIds) {
+                if (!parentMap.isEmpty() && parentMap.containskey(raf.Id)) {
+                    Rental_Apply_Fault__c oldObj = oldMap.get(raf.Id);
+                    System.debug('oldObj' + oldObj);
+                    // List<Attachment> attTemp = parentMap.get(raf.Id);
+                    List<ContentVersion> cVersionTemp = parentMap.get(raf.Id);
+                    System.debug('cVersionTemp' + cVersionTemp);
+                    for(Integer i = 0;i < cVersionTemp.size();i++){
+                        System.debug('attId1:' + raf.AttachmentId1__c);
+                        System.debug('attId2:' + raf.AttachmentId2__c);
+                        System.debug('oldattId1:' + oldObj.AttachmentId1__c);
+                        System.debug('oldattId2:' + oldObj.AttachmentId2__c);
+                        if(oldObj.AttachmentId1__c == cVersionTemp[i].Id && raf.AttachmentId1__c == null){
+                            System.debug('123456:' + cVersionTemp[i].Id);
+                            cVersionTemp.remove(i);
+                        }else if(oldObj.AttachmentId2__c == cVersionTemp[i].Id && raf.AttachmentId2__c == null){
+                            System.debug('123456:' + cVersionTemp[i].Id);
+                            cVersionTemp.remove(i);
+                        }
+
+                    }
+                    System.debug('========================================' + cVersionTemp);
+                    if(cVersionTemp.size() == 0){
+                    }else if (cVersionTemp.size() == 1) {
+                        // raf.AttachmentId1__c = attTemp[0].Id;
+                        raf.AttachmentId1__c = cVersionTemp[0].Id;
+                        raf.AttachmentId2__c = null;
+                    } else {
+                        // raf.AttachmentId1__c = attTemp[0].Id;
+                        // raf.AttachmentId2__c = attTemp[1].Id;
+                        raf.AttachmentId1__c = cVersionTemp[0].Id;
+                        raf.AttachmentId2__c = cVersionTemp[1].Id;
+                    }
+                    
+                }
+            }
+        }
+    }
+
+    protected override void afterUpdate() {
+        Set<Id> feedbackIds = new Set<Id>();
+        Set<Id> sendReportIds = new Set<Id>();
+        for(Rental_Apply_Fault__c raf: newList){
+            Rental_Apply_Fault__c oldRaf = oldMap.get(raf.Id);
+
+            if (raf.status__c == '宸插彂閫�' && oldRaf.status__c != '宸插彂閫�') {
+                sendReportIds.add(raf.Id);
+            }
+
+            if (raf.status__c == '宸插弽棣�' && oldRaf.status__c != '宸插弽棣�') {
+                feedbackIds.add(raf.Id);
+            }
+        }
+
+        if (!sendReportIds.isEmpty()) {
+            //澶囧搧涓績鎺ㄩ�侀偖浠剁粰鐜板満
+            sendEmail(sendReportIds, '1');
+        }
+        
+        if (!feedbackIds.isEmpty()) {
+            //鐜板満鍥炲鍚庢帹閫佺殑閭欢
+            sendEmail(feedbackIds, '2');
+        }
+    }
+
+    //鎺ㄩ�侀偖浠跺鐞�
+    public void sendEmail(Set<Id> rafIds, String flag) {
+        List<Rental_Apply_Fault__c> rafList = [
+                SELECT Id, Person_In_Charge_User__r.Email, Owner.Email, Rental_Assistant__r.Email, Rental_Assistant2__r.Email,
+                        Loaner_centre_mail_address__c, Loaner_Storage_mail_address__c, ZongjianApprovalManager__r.Email,
+                        BuchangApprovalManagerSales__r.Email, SalesManager__r.Email, Salesdept__c, StorageCheckEmail__c
+                FROM Rental_Apply_Fault__c 
+                WHERE Id IN: rafIds];
+
+        EmailTemplate et = null;
+        if (flag == '1') {
+            et = [Select id from EmailTemplate where name = '澶囧搧妫�娴嬪垎鏋愭姤鍛�' limit 1];
+        } else if (flag == '2') {
+            et = [Select id from EmailTemplate where name = '澶囧搧妫�娴嬪垎鏋愭姤鍛婃搷浣滀笉褰撴彁閱掑凡鍥炲' limit 1];
+        } else {
+            return;
+        }
+        
+        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();
+
+        for (Rental_Apply_Fault__c raf : rafList) {
+            String[] toAddresses = new String[]{};
+            String[] ccAddresses = new String[]{};
+
+            if (flag == '1') {
+                //7鏈�31鏃ユ紨绀烘敞閲� start 
+                //To 鐢宠浜�
+                //toAddresses.add(raf.Person_In_Charge_User__r.Email);
+                //To 澶囧搧璺熻繘鍔╃悊
+                // if(raf.Rental_Assistant__r.Email != null) {
+                //     toAddresses.add(raf.Rental_Assistant__r.Email);
+                // }
+                // if(raf.Rental_Assistant2__r.Email != null){
+                //     toAddresses.add(raf.Rental_Assistant2__r.Email);
+                // }
+
+                //CC   閮ㄥ 澶囧搧瀹℃壒娴佷汉鍛樺強鎵�灞炴�荤洃---cl4鎬荤洃閭 澶囧搧鎬荤獥鍙�
+                //閮ㄥ唴 鐧芥�汇�佸彜閮ㄩ暱锛屾灄閮ㄩ暱   鐧界锛屽彜鑺充附锛屾灄鑺�
+                //     ocmasset鍏叡閭
+                //     妫�娴嬩粨搴撳叕鍏遍偖绠�  
+                 
+                //ccAddresses = System.Label.RentalApplyFaultReplyToBuNei.split(';');
+
+                //cc 閮ㄥ 澶囧搧瀹℃壒娴佷汉鍛樺強鎵�灞炴�荤洃---cl4鎬荤洃閭  澶囧搧鎬荤獥鍙�  
+                //setEmailAddress(raf, ccAddresses);
+                //7鏈�31鏃ユ紨绀烘敞閲� end
+                if(raf.Loaner_Storage_mail_address__c!=null){
+                    ccAddresses.add(raf.Loaner_Storage_mail_address__c);
+                }
+                ccAddresses.add(raf.Loaner_centre_mail_address__c);
+                ccAddresses.add('sunxia@prec-tech.com');
+                toAddresses.add('lijinghuan@prec-tech.com');
+                //ccAddresses.add(raf.StorageCheckEmail__c);
+
+            } else if (flag == '2') {
+                //To ocmasset鍏叡閭 妫�娴嬩粨搴撳叕鍏遍偖绠� 妫�娴嬫媴褰�
+                //7鏈�31鏃ユ紨绀烘敞閲� start
+                // toAddresses.add(raf.Loaner_centre_mail_address__c);
+                // toAddresses.add(raf.Loaner_Storage_mail_address__c);
+                // //toAddresses.add(raf.StorageCheckEmail__c);
+                // toAddresses.add(raf.Owner.Email);
+
+                //閮ㄥ唴  鐧芥�汇�佸彜閮ㄩ暱锛屾灄閮ㄩ暱
+                
+                //ccAddresses = System.Label.RentalApplyFaultReplyToBuNei.split(';');
+
+                //cc 閮ㄥ 澶囧搧瀹℃壒娴佷汉鍛樺強鎵�灞炴�荤洃---cl4鎬荤洃閭  澶囧搧鎬荤獥鍙�  
+                //setEmailAddress(raf, ccAddresses);
+                //7鏈�31鏃ユ紨绀烘敞閲� end
+                ccAddresses.add('sunxia@prec-tech.com');
+                toAddresses.add('lijinghuan@prec-tech.com');
+
+                //Cc 澶囧搧璺熻繘鍔╃悊
+                /*if(raf.Rental_Assistant__r.Email != null) {
+                    ccAddresses.add(raf.Rental_Assistant__r.Email);
+                }
+                if(raf.Rental_Assistant2__r.Email != null){
+                    ccAddresses.add(raf.Rental_Assistant2__r.Email);
+                }*/
+            }
+            
+            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
+            mail = Messaging.renderStoredEmailTemplate(et.Id, null, raf.Id);
+            mail.setSaveAsActivity(false);
+            mail.setToAddresses(toAddresses);
+            System.debug('=============' + ccAddresses);
+            mail.setCcAddresses(ccAddresses);
+            emails.add(mail);
+        }
+
+        Messaging.sendEmail(emails);
+    }
+
+    public void setEmailAddress(Rental_Apply_Fault__c rafObj, String[] ccAddr) {
+        //鏈儴                绐楀彛    CL5鎬荤洃锛堝鍝佸鎵癸級 CL4楂樼骇鎬荤洃锛堝鍝佸鎵癸級   寤鸿鎶勯�佷汉1  寤鸿鎶勯�佷汉2  澶囨敞
+        //鍗庡寳                璧甸潠鑻�  鏄�                  鍚�                      鎱曟捣闇�       鏉庨阜
+        //涓滃寳                鍏宠礉濡�  鏄�                  鍚�                      璧靛織鎴�       鏉庨阜 
+        //瑗垮寳                寮犲獩濯�  鏄�                  鍚�                      棰滃ぇ搴�       瀹嬬惏
+        //瑗垮崡                璧甸洴闆�  鏄�                  鏄�
+        //鍗庝笢                寰愭槑妤�  鏄�                  鍚�                      瀹嬬湡         鏉ㄥ墤娓�  
+        //鍗庡崡                澶忎繆娲�  鏄�                  鏄�                      淇炴緶         涓ヨ晩鑺�  
+        //MA                  鏃�     鏄�                  鍚�                       闄嗗悏       
+        //SOLUTION            娈蜂匠楠�  鏄�                  鍚�
+        //鍖荤枟鏈嶅姟鏈儴         鏃�      鏄�                                         闄嗗悏锛堢悊璁轰笂娌℃湁锛�
+        //澶栫浜嬩笟鏈儴         鏉庢捣绾�  鏄�                  鍚� 
+        //甯傚満浼佸垝鏈儴         鏃�      鏄�                                         闄嗗悏锛堢悊璁轰笂娌℃湁锛� 
+        //娑堝寲.鍛煎惛鍐呴暅浜嬩笟鏈儴 鏃�      鏄�                 鍚�                      闄嗗悏  
+        //娑堝寲.鍛煎惛棰嗗煙瑙e喅鏂规鏈儴   鏃�   鏄�                                      闄嗗悏锛堢悊璁轰笂娌℃湁锛�  
+        if (rafObj.Salesdept__c == '鍖荤枟鍗庡寳钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Huabei) && System.Label.RentalApplyFaultReplyTo_Huabei != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Huabei.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟涓滃寳钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Dongbei) && System.Label.RentalApplyFaultReplyTo_Dongbei != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Dongbei.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟瑗垮寳钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Xibei) && System.Label.RentalApplyFaultReplyTo_Xibei != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Xibei.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟瑗垮崡钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (rafObj.ZongjianApprovalManager__c != null) {
+                ccAddr.add(rafObj.ZongjianApprovalManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Xinan) && System.Label.RentalApplyFaultReplyTo_Xinan != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Xinan.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟鍗庝笢钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Huadong) && System.Label.RentalApplyFaultReplyTo_Huadong != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Huadong.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟鍗庡崡钀ヤ笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (rafObj.ZongjianApprovalManager__c != null) {
+                ccAddr.add(rafObj.ZongjianApprovalManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Huanan) && System.Label.RentalApplyFaultReplyTo_Huanan != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Huanan.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == 'MA鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_MA) && System.Label.RentalApplyFaultReplyTo_MA != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_MA.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == 'Solution鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_SOLUTION) && System.Label.RentalApplyFaultReplyTo_SOLUTION != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_SOLUTION.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '鍖荤枟鏈嶅姟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Yiliao) && System.Label.RentalApplyFaultReplyTo_Yiliao != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Yiliao.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '澶栫浜嬩笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Waike) && System.Label.RentalApplyFaultReplyTo_Waike != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Waike.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '甯傚満浼佸垝鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_Shichang) && System.Label.RentalApplyFaultReplyTo_Shichang != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_Shichang.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '娑堝寲路鍛煎惛鍐呴暅浜嬩笟鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_HXNJ) && System.Label.RentalApplyFaultReplyTo_HXNJ != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_HXNJ.split(';'));
+            }
+        } else if (rafObj.Salesdept__c == '娑堝寲路鍛煎惛棰嗗煙瑙e喅鏂规鏈儴') {
+            if (rafObj.BuchangApprovalManagerSales__c != null) {
+                ccAddr.add(rafObj.BuchangApprovalManagerSales__r.Email);
+            }
+            if (rafObj.SalesManager__c != null) {
+                ccAddr.add(rafObj.SalesManager__r.Email);
+            }
+            if (!String.isBlank(System.Label.RentalApplyFaultReplyTo_HXLY) && System.Label.RentalApplyFaultReplyTo_HXLY != 'null') {
+                ccAddr.addAll(System.Label.RentalApplyFaultReplyTo_HXLY.split(';'));
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/RentalApplyFaultHandler.cls-meta.xml b/force-app/main/default/classes/RentalApplyFaultHandler.cls-meta.xml
new file mode 100644
index 0000000..541584f
--- /dev/null
+++ b/force-app/main/default/classes/RentalApplyFaultHandler.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>50.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index 8535a6b..7db2087 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -17,7 +17,7 @@
             res.recordTypeId1 = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ENG).getRecordTypeId();
             res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ET).getRecordTypeId();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -36,7 +36,7 @@
             res.opdPlan = rent.OPDPlan__c;
             res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OPD).getRecordTypeId();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -257,7 +257,7 @@
         try {
            res =  new InitData();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -276,7 +276,7 @@
             res.datec = re.Date__c;
             res.practitioner1 = re.Practitioner1__c;
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -293,18 +293,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //OPDtoSIS鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -317,18 +318,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
 
@@ -344,18 +346,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //瀹屾瘯鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -369,18 +372,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //OCSM瑕佹姤鍛婃搷浣滄洿鏂扮浉搴旀暟鎹�
@@ -393,18 +397,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
 
@@ -418,18 +423,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //DispatchOCSMQARA鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -442,18 +448,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //OCSM涓嶈鎶ュ憡鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -466,18 +473,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
 
@@ -491,18 +499,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     
@@ -536,18 +545,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
 
@@ -561,18 +571,19 @@
             update rac;
             return null;
         } catch (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();   
-            } 
+            // 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();   
+            // } 
+            return errorMessage(e);
         }
     }
 
@@ -589,18 +600,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //VOC鍥炵瓟鏇存柊鐩稿簲鏁版嵁
@@ -649,18 +661,19 @@
             update rac;
             return null;
         } catch (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();   
-            }
+            // 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();   
+            // }
+            return errorMessage(e);
         }
     }
     //VOC鍒ゅ畾鏇存柊鐩稿簲鏁版嵁
@@ -723,18 +736,19 @@
             update report;
             return null;
         } catch (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();   
-            }
+            return errorMessage(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();   
+            // }
         }
     }
     @AuraEnabled
@@ -743,7 +757,7 @@
         try {
             user = [select Id from User where Name =:name]; 
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return user.Id;
     }
@@ -753,10 +767,25 @@
         try {
             profile = [select Id from Profile where Name =:name];
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return profile.Id;
     }
+    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 String status;
diff --git a/force-app/main/default/classes/ReportControllerTest.cls b/force-app/main/default/classes/ReportControllerTest.cls
index 1b25d18..d5f7dc3 100644
--- a/force-app/main/default/classes/ReportControllerTest.cls
+++ b/force-app/main/default/classes/ReportControllerTest.cls
@@ -1,48 +1,85 @@
 @isTest
 private  class ReportControllerTest {
     @TestSetup
-    static void setData(){
-        List<String> strList= new List<String>();
-        strList.add('Agency_Contact__c');
-        strList.add('Contact');
-        TestDataUtility.CreatePIPolicyConfigurations(strList);
-        Consum_Apply__c ca = new Consum_Apply__c();
-        ca.DataMigration_Flag__c = true;
-        insert ca;
-        Address_Level__c al = new Address_Level__c();
-        al.Name = '鏉变含';
-        al.Level1_Code__c = 'CN-99';
-        al.Level1_Sys_No__c = '999999';
-        insert al;
-        // 甯�
-        Address_Level2__c al2 = new Address_Level2__c();
-        al2.Level1_Code__c = 'CN-99';
-        al2.Level1_Sys_No__c = '999999';
-        al2.Level1_Name__c = '鏉变含';
-        al2.Name = '娓嬭胺鍖�';
-        al2.Level2_Code__c = 'CN-9999';
-        al2.Level2_Sys_No__c = '9999999';
-        al2.Address_Level__c = al.id;
-        insert al2;
+    static void makeData(){
+        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
+        // 銉︺兗銈躲兗浣滄垚
+        User hpOwner = new User(Dept__c='鍖荤枟鍗庡寳钀ヤ笟鏈儴',Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
+        insert hpOwner;
+        // 鍙栧紩鍏堜綔鎴�
+        List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
+        if (rectHp.size() == 0) {
+            return;
+        }
+        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name = '瑷虹檪绉� 娑堝寲绉�'];
+        if (rectDpt.size() == 0) {
+            return;
+        }
+        List<RecordType> rectOPD = [select Id,name from RecordType where IsActive = true and SobjectType = 'Report__c' and Name = 'VOC'];
+        if (rectOPD.size() == 0) {
+            return;
+        }
+        
+        Account hp1 = new Account(RecordTypeId = rectHp[0].Id, Name = 'TestHp1', OwnerId = hpOwner.Id);
+        insert hp1;
 
+        List<Account> dc1 = [Select Id, Name, Department_Class_Label__c from Account where Parent.Id = :hp1.Id and Department_Class_Label__c = '娑堝寲绉�'];
+
+        Account depart1 = new Account();
+        depart1.RecordTypeId = rectDpt[0].Id;
+        depart1.Name         = '*';
+        depart1.Department_Name__c  = '瑷虹檪绉�1';
+        depart1.ParentId            = dc1[0].Id;
+        depart1.Department_Class__c = dc1[0].Id;
+        depart1.Hospital__c         = hp1.Id;
+
+        insert depart1;
+        //AccountShare dcTS1 = new AccountShare(UserOrGroupId=hpOwner.Id,  AccountId=hp1.Id,AccountAccessLevel='Read', OpportunityAccessLevel = 'Read');
+        //insert dcTS1;
+        Daily_Report__c dr1 = new Daily_Report__c();
+        dr1.Reporter__c = UserInfo.getUserId();
+        dr1.Reported_Date__c = date.today();
+        dr1.Status__c = '鐢宠珛涓�';
+        
+        insert dr1;
+        
+        Report__c rep1 = new Report__c();
+        rep1.CurrencyIsoCode         = 'CNY';
+        rep1.RecordTypeId            = rectOPD[0].Id;
+        rep1.Status__c               = '';
+        rep1.Daily_Report__c         = dr1.Id;
+        rep1.Purpose1__c             = 'OPD';
+        rep1.Purpose2__c             = '寮曞悎杩藉強娲诲嫊';
+        rep1.Reason__c               = '瀹熸柦鑳屾櫙';
+        rep1.Appeal_Point__c         = '瀹熸柦鐩殑銉昏ù姹傜偣';
+        rep1.Strategic_Department_Class__c = '1.娑堝寲绉�';
+        rep1.Technical_Category1__c  = '娑堝寲閬撴鏌�';
+        rep1.Technical_Category2__c  = '鏅�氳儍闀滄鏌�';
+        rep1.Patient_Status__c       = '鎮h�呯姸娉�';
+        rep1.Operation_Process__c    = '鎵嬭銉椼儹銈汇偣';
+        rep1.Operation_Task__c       = '鎵嬭涓娿伄瑾查';
+        rep1.Product_Evaluation_Advantage__c = '瑁藉搧瑭曚尽鍒╃偣';
+        rep1.Product_Evaluation_Faults__c = '瑁藉搧瑭曚尽娆犵偣';
+        rep1.OPD_Summarize__c        = 'OPD瀹熸柦绶忔嫭';
+        rep1.Activity_Plan__c        = '浠婂緦銇椿鍕曡▓鐢�';
+        rep1.Opportunity_Situation__c = '寮曞悎鐒�';
+        rep1.OPD_ProductCategory1__c ='3D System';
+        rep1.OPD_ProductCategory2__c ='OR Imaging Products';
+        rep1.Hospital_Reference__c   = hp1.Id;
+        rep1.Department_Class_Ref__c = dc1[0].Id;
+        rep1.Hospital_Department__c  = depart1.Id;
+        rep1.Status__c = '鑽夋涓�';
+        rep1.Date__c                 = Date.today().addDays(-1);
+        
+        insert rep1;
         // 鐥呴櫌銈掍綔銈�
         Account hospital = new Account();
         hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id;
         hospital.Name = 'test hospital';
-        hospital.Is_Active__c = '鏈夊姽';
-        hospital.Attribute_Type__c = '鍗敓閮�';
-        hospital.Speciality_Type__c = '缁煎悎鍖婚櫌';
-        hospital.Grade__c = '涓�绾�';
-        hospital.OCM_Category__c = 'SLTV';
-        hospital.Is_Medical__c = '鍖荤枟鏈烘瀯';
-        hospital.State_Master__c = al.id;
-        hospital.City_Master__c = al2.id;
-        hospital.Town__c = '涓滀含';
         insert hospital;
-
         // 鎴︾暐绉戝銈掑緱銈�
         Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH'];
-        // 瑷虹檪绉戙倰浣溿倠
+            // 瑷虹檪绉戙倰浣溿倠
         Account dep = new Account();
         dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id;
         dep.Name = 'test dep';
@@ -51,98 +88,101 @@
         dep.Department_Class__c = strategicDep[0].Id;
         dep.Hospital__c = hospital.Id;
         insert dep;
-
-        Contact contact2 = new Contact();
-        contact2.AccountId = dep.Id;
-        contact2.FirstName = '璨换鑰�';
-        contact2.LastName = 'test1缁忛攢鍟�';
-        insert contact2;
-
-        // 浜у搧
-        Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='SP',
-                Fixture_Model_No__c='n05',Serial_Lot_No__c='S/N tracing',
-                Fixture_Model_No_T__c = 'n05',
-                ProductCode_Ext__c='pc05',Manual_Entry__c=false);
-        insert pro5;
-
-        //澶囧搧鍊熷嚭鐢宠
-        Rental_Apply__c raObj = new Rental_Apply__c();
-        raObj.Name = 'testra';
-        raObj.Product_category__c = 'GI';
-        raObj.Demo_purpose1__c = '浜у搧璇曠敤';
-        raObj.demo_purpose2__c = FixtureUtil.raDemo_purpose2MAP.get('shiyongwuxunjia');
-        raObj.direct_send__c = '鍖荤枟鏈烘瀯';
-        raObj.Loaner_received_staff__c = '鐜嬩簲';
-        raObj.Loaner_received_staff_phone__c = '110';
-        raObj.direct_shippment_address__c = '鍖椾含甯�';
-        raObj.Hospital__c = hospital.Id;
-        raObj.Strategic_dept__c = strategicDep[0].Id;
-        raObj.Account__c = dep.Id;
-        raObj.Request_shipping_day__c = Date.toDay();  // 甯屾湜鍒拌揣鏃�
-        raObj.Hope_Lonaer_date_Num__c = 1;  // 甯屾湜鍊熺敤澶╂暟
-        // 棰勫畾褰掕繕鏃ヨ嚜鍔ㄧ敓鎴� 棰勫畾褰掕繕鏃�=锛堝笇鏈涘埌璐ф棩+甯屾湜鍊熺敤澶╂暟锛�-1
-        // raObj.Request_return_day__c = Date.toDay();  // 棰勫畾褰掕繕鏃�
-        // B.OLY_OCM-669 鍏ュ姏瑙勫垯: 甯屾湜鍊熺敤澶╂暟涓嶈兘涓虹┖
-        raObj.Phone_number__c = '1234567890';
-        raObj.Loaner_medical_Staff__c = contact2.Id;
-        insert raObj;
-
-        Report__c rep = new Report__c();
-        rep.VOC_Informer_Contact__c = '139';
-        rep.Comment__c = '娴嬭瘯';
-        rep.Manual_Name__c = '娴嬭瘯鍖婚櫌/绉戝/缁忛攢鍟�';
-        insert rep;
+     
+     
+        Consum_Apply__c ca = new Consum_Apply__c();
+        ca.DataMigration_Flag__c = true;
+        insert ca;
+        Rental_Apply__c ra = new Rental_Apply__c();
+        ra.Rental_Start_Date__c = Date.today().addDays(1);
+        ra.Request_return_day__c=Date.today().addDays(5);
+        ra.DataMigration_Flag__c = true;
+        //ra.demo_purpose2__c = '鍏朵粬';
+        //ra.Person_In_Charge__c = hpOwner.Id;
+        //System.runAs(hpOwner) {
+            insert ra;
     }
-    static testMethod void methodName1(){  
-        Report__c rep = [select Id from Report__c limit 1];
-        Rental_Apply__c re = [select Id from Rental_Apply__c limit 1];
+
+    static testMethod void test1() {
+        Report__c rep1 = [select Id,createdById from Report__c limit 1];
         Consum_Apply__c ca = [select Id from Consum_Apply__c limit 1];
-        Test.startTest();
-        ReportController.initForASACEditorButton(rep.Id);
-        ReportController.initForASRCEditorButton(rep.Id);
-        ReportController.initForCancelButton(rep.Id);
-        ReportController.initForCompleteButton(rep.Id);
-        ReportController.initForNewOnLineSurveyButton(rep.Id);
-        ReportController.initForOCSMNoToReportButton(rep.Id);
-        ReportController.initForOCSMToReportButton(rep.Id);
-        ReportController.initForOPDReportButton(re.Id);
+        Rental_Apply__c ra = [select Id from Rental_Apply__c limit 1];
+        Id reportId = rep1.Id;
+        String createdById = rep1.createdById;
+        System.Test.startTest();
         ReportController.initForOPDReportConsumButton(ca.Id);
-        ReportController.initForOPDtoSISButton(rep.Id);
-        ReportController.initForSIStoOPDButton(rep.Id);
-        ReportController.initForSubmitCompetitorReportButton(rep.Id);
-        ReportController.initForVOCAnswerButton(rep.Id);
-        ReportController.initForVOCCheckButton(rep.Id);
-        ReportController.initForVOCConfirmButton(rep.Id);
-        ReportController.initForVOCFinishButton(rep.Id);
-        ReportController.initForVOCSubmitButton(rep.Id);
-        ReportController.updateForCancelButton(rep.Id);
-        ReportController.updateForCancelButton('');
-        ReportController.updateForCancelSubmitReportButton(rep.Id);
-        ReportController.updateForCancelSubmitReportButton('');
-        ReportController.updateForCompleteButton(rep.Id);
-        ReportController.updateForCompleteButton('');
-        ReportController.updateForDispatchOCSMQARAButton(rep.Id);
-        ReportController.updateForDispatchOCSMQARAButton('');
-        ReportController.updateForOCSMNoToReportButton(rep.Id);
-        ReportController.updateForOCSMNoToReportButton('');
-        ReportController.updateForOCSMToReportButton(rep.Id);
-        ReportController.updateForOCSMToReportButton('');
-        ReportController.updateForOPDtoSISButton(rep.Id);
-        ReportController.updateForOPDtoSISButton('');
-        ReportController.updateForSIStoOPDButton(rep.Id);
-        ReportController.updateForSIStoOPDButton('');
-        ReportController.updateForSubmitButton(rep.Id);
-        ReportController.updateForSubmitButton('');
-        ReportController.updateForSubmitCompetitorReportButton(rep.Id);
-        ReportController.updateForSubmitCompetitorReportButton('');
-        ReportController.updateForVOCAnswerButton(rep.Id);
-        ReportController.updateForVOCAnswerButton('');
-        ReportController.updateForVOCCheckButton(rep.Id,'VOC',UserInfo.getUserId());
-        ReportController.updateForVOCConfirmButton(rep.Id,'鍚�', '鏄�');
-        ReportController.updateForVOCFinishButton(rep.Id);
-        ReportController.updateForVOCFinishButton('');
-        ReportController.updateForVOCSubmitButton(rep.Id, UserInfo.getUserId());
-        Test.stopTest();    
+        ReportController.initForOPDReportButton(ra.Id);
+        ReportController.initForVOCFinishButton(reportId);
+        ReportController.initForVOCCheckButton(reportId);
+        ReportController.initForVOCSubmitButton(reportId);
+        ReportController.initForVOCAnswerButton(reportId);
+        ReportController.initForVOCConfirmButton(reportId);
+        ReportController.initForCancelButton(reportId);
+        ReportController.initForOCSMNoToReportButton(reportId);
+        ReportController.initForSIStoOPDButton(reportId);
+        ReportController.initForOCSMToReportButton(reportId);
+        ReportController.initForCompleteButton(reportId);
+        ReportController.initForASRCEditorButton(reportId);
+        ReportController.initForASACEditorButton(reportId);
+        ReportController.initForOPDtoSISButton(reportId);
+
+        ReportController.initForSubmitCompetitorReportButton(reportId);
+        ReportController.initForNewOnLineSurveyButton(reportId);
+        ReportController.updateForSubmitButton(reportId);
+        ReportController.updateForOPDtoSISButton(reportId);
+        ReportController.updateForCancelSubmitReportButton(reportId);
+        ReportController.updateForCompleteButton(reportId);
+        ReportController.updateForOCSMToReportButton(reportId);
+        ReportController.updateForSIStoOPDButton(reportId);
+        ReportController.updateForDispatchOCSMQARAButton(reportId);
+        ReportController.updateForOCSMNoToReportButton(reportId);
+        ReportController.updateForCancelButton(reportId);
+        ReportController.updateForVOCConfirmButton(reportId,'鍚�','鏄�');
+        ReportController.updateForVOCAnswerButton(reportId);
+        ReportController.updateForSubmitCompetitorReportButton(reportId);
+        ReportController.updateForVOCSubmitButton(reportId,createdById);
+        ReportController.updateForVOCCheckButton(reportId,'VOC',UserInfo.getUserId());
+        ReportController.updateForVOCFinishButton(reportId);
+        System.Test.stopTest();
     }
+
+    static testMethod void test2() {
+        System.Test.startTest();
+        ReportController.initForOPDReportConsumButton('');
+        ReportController.initForOPDReportButton('');
+        ReportController.initForVOCFinishButton('');
+        ReportController.initForVOCCheckButton('');
+        ReportController.initForVOCSubmitButton('');
+        ReportController.initForVOCAnswerButton('');
+        ReportController.initForVOCConfirmButton('');
+        ReportController.initForCancelButton('');
+        ReportController.initForOCSMNoToReportButton('');
+        ReportController.initForSIStoOPDButton('');
+        ReportController.initForOCSMToReportButton('');
+        ReportController.initForCompleteButton('');
+        ReportController.initForASRCEditorButton('');
+        ReportController.initForASACEditorButton('');
+        ReportController.initForOPDtoSISButton('');
+
+        ReportController.initForSubmitCompetitorReportButton('');
+        ReportController.initForNewOnLineSurveyButton('');
+        ReportController.updateForSubmitButton('');
+        ReportController.updateForOPDtoSISButton('');
+        ReportController.updateForCancelSubmitReportButton('');
+        ReportController.updateForCompleteButton('');
+        ReportController.updateForOCSMToReportButton('');
+        ReportController.updateForSIStoOPDButton('');
+        ReportController.updateForDispatchOCSMQARAButton('');
+        ReportController.updateForOCSMNoToReportButton('');
+        ReportController.updateForCancelButton('');
+        ReportController.updateForVOCConfirmButton('','鍚�','鏄�');
+        ReportController.updateForVOCAnswerButton('');
+        ReportController.updateForSubmitCompetitorReportButton('');
+        ReportController.updateForVOCSubmitButton('','');
+        ReportController.updateForVOCCheckButton('','VOC',UserInfo.getUserId());
+        ReportController.updateForVOCFinishButton('');
+        System.Test.stopTest();
+    }
+    
     
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/StaticParameter.cls b/force-app/main/default/classes/StaticParameter.cls
index 02872c6..d1a25f8 100644
--- a/force-app/main/default/classes/StaticParameter.cls
+++ b/force-app/main/default/classes/StaticParameter.cls
@@ -20,6 +20,14 @@
     //璺宠繃璁㈠崟鐨勬煡璇� 
     public static Boolean ConsumableOrderTrigger = false;
 
+    //SummaryContractFMBatch
+    public static Boolean MaintenanceContractAssetTrigger = true;
+    public static Boolean SetContractEstimatePriceTrigger = true;
+    public static Boolean MaintenanceContractTrigger = true;
+    public static Boolean MaintenanceContractHpDeptUpdTrigger = true;
+    
+
+
     public static Boolean EscapeConsumableOrderDetail2Trigger = false;
     public static Boolean EscapeOrderDetail2Trigger = false;
 
@@ -30,7 +38,10 @@
     // 璺宠繃涓嶆秹鍙婂鍝佸�熷嚭鐨勯�昏緫
     public static Boolean rentalApplyIsRunning = false;
 
-    // accountdailyUpdate 璺宠繃 鏇存柊璇环
+    // TenderInformationTrigger 璺宠繃 鏇存柊璇环
+    public static Boolean EscapeTenderInformationUpdate  = true;
+
+    // accountdailyUpdate 璺宠繃 鏇存柊鎷涙爣椤圭洰
     public static Boolean EscapeOpportunityownerUpdate  = false;
     
     // 璺宠繃淇悊AE鏇存柊
@@ -66,8 +77,36 @@
 
     // 棰勬祴璺宠繃璇环鍜屾敞娈�
     public static Boolean EscapeOppandStaTrigger = false;
-    //璺宠繃鏂囨。閾炬帴鎺ュ彛
+
+    // 2023/3/30 姝e父鎵цRepairAgainAnTrigger 
+    public static Boolean RepairAgainAnStaTrigger = true;
+    // DB202304087063 SFDC绯荤粺闄勪欢涓婁紶鑷姩閫氱煡鍔熻兘寮�鍙戦渶姹� start
+    // 澶囨敞鐢熸垚闄勪欢鏃讹紝闄勪欢涓嶅彂閫侀偖浠�
+    public static Boolean AttachmentTrigger = true;
+    // DB202304087063 SFDC绯荤粺闄勪欢涓婁紶鑷姩閫氱煡鍔熻兘寮�鍙戦渶姹� end
+
+    public static Boolean EscapeQISTrigger = true;
+
+    // DB202306447415 gzw 鎺ュ彛鎵ц閫熷害浼樺寲 start
+    public static Boolean EscapeNFM110Trigger = false;
+    // DB202306447415 gzw 鎺ュ彛鎵ц閫熷害浼樺寲 end
+
+    // DB202307108459 ssm 鍩哄缓椤圭洰trigger璺宠繃鏍囪 start
+    public static Boolean EscapeInfrastructureProductTrigger = false;
+    // DB202307108459 ssm 鍩哄缓椤圭洰trigger璺宠繃鏍囪 end
+
+    //zc lt 20230918 start DB202308327700 璺宠繃浼楁垚鏁版嵁
+    public static Boolean EscapeZCUpdateTender = false;
+    //zc lt 20230918 end DB202308327700 璺宠繃浼楁垚鏁版嵁
+
+    //20230918 lt DB202306372336 杩涙嫑鏍囪Е鍙戝櫒(璇环鍏宠仈绉戝鏀瑰彉鏃�) start
+    public static Boolean UpdateDandang = false;
+    //20230918 lt DB202306372336 杩涙嫑鏍囪Е鍙戝櫒 end
+    //20230922 cjw 鏂囦欢鐩稿叧瑙﹀彂鍣� start
+    public static Boolean ContentDocumentTrigger = true;
     public static Boolean ContentDocumentLink = true;
+    public static Boolean ContentVerisonTrigger = true;
+    //20230922 cjw 鏂囦欢鐩稿叧瑙﹀彂鍣� start
     public StaticParameter(){
     }
 
diff --git a/force-app/main/default/classes/StaticParameter.cls-meta.xml b/force-app/main/default/classes/StaticParameter.cls-meta.xml
index f165265..d75b058 100644
--- a/force-app/main/default/classes/StaticParameter.cls-meta.xml
+++ b/force-app/main/default/classes/StaticParameter.cls-meta.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
-    <apiVersion>29.0</apiVersion>
+    <apiVersion>51.0</apiVersion>
     <status>Active</status>
 </ApexClass>
diff --git a/force-app/main/default/classes/UpdateContractAimAmountHandler.cls b/force-app/main/default/classes/UpdateContractAimAmountHandler.cls
index a9dcdb1..5759f5a 100644
--- a/force-app/main/default/classes/UpdateContractAimAmountHandler.cls
+++ b/force-app/main/default/classes/UpdateContractAimAmountHandler.cls
@@ -284,7 +284,7 @@
                     acc.CustomizePageFlg__c = false;
                 }else{
                     System.debug('lt123-----else,acc.CustomizePageFlg__c-----'+acc.CustomizePageFlg__c);
-                    acc.addError('璇风偣鍑婚摼鎺�(鐩稿叧椤�)纭鍏蜂綋淇℃伅鍚庡鎵广��');
+                     acc.addError('璇风偣鍑昏繘鍏ュ鎴疯鎯呴〉闈紝鍦ㄢ�樻壒鍑嗗巻鍙测�欐爮鐩笅杩涜鎵瑰噯鎴栨嫆缁濇搷浣�');
                 }
             }
         }
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 58c3650..a55853f 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -31,7 +31,11 @@
 	public static integer secondNum {get; set;}
 	// add tcm 20211122 end
 
-
+	@AuraEnabled(cacheable=true)
+    public static Id getUserProfileId() {
+        Id profileId = [SELECT ProfileId FROM User WHERE Id = :UserInfo.getUserId()].ProfileId;
+        return profileId;
+    }
 	@AuraEnabled
     public static String getPickList(String objectName, String fieldName) {
 		List<Map<String, String>> lstPickvals = new List<Map<String, String>>();
@@ -47,6 +51,8 @@
 		Map<string,List<Map<String, String>>> pickList =  new Map<string,List<Map<String, String>>>();
 		List<Map<String, String>> zhuji = new List<Map<String, String>>();
 		List<Map<String, String>> jingzi = new List<Map<String, String>>();
+		List<Map<String, String>> xixiaoji = new List<Map<String, String>>();
+		List<Map<String, String>> guangyuan = new List<Map<String, String>>();
 		List<Map<String, String>> xiaojingzhong = new List<Map<String, String>>();
 		List<Map<String, String>> nengliang = new List<Map<String, String>>();
 		List<Map<String, String>> qita = new List<Map<String, String>>();
@@ -57,19 +63,25 @@
 		nengliang.add(empty);
 		qita.add(empty);
 		for (Integer i = 0; i < lstPickvals.size(); i++) {
-			if ((i >= 0 && i <= 6) || i == 36) {
+			if ((i >= 0 && i <= 6) || i == 38) {
 				zhuji.add(lstPickvals[i]);
 			}
-			if ((i >= 7 && i <= 23) || i == 36) {
+			if ((i >= 7 && i <= 23) || i == 38) {
 				jingzi.add(lstPickvals[i]);
 			}
-			if ((i >= 24 && i <= 29) || i == 35) {
+			if ((i >= 24 && i <= 29) || i == 35|| i == 38) {
 				xiaojingzhong.add(lstPickvals[i]);
 			}
-			if ((i >= 30 && i <= 34) || i == 36) {
+			if ((i >= 30 && i <= 34) || i == 38) {
 				nengliang.add(lstPickvals[i]);
 			}
 			if (i == 36) {
+				guangyuan.add(lstPickvals[i]);
+			}
+			if (i == 37) {
+				xixiaoji.add(lstPickvals[i]);
+			}
+			if (i == 38) {
 				qita.add(lstPickvals[i]);
 			}
 		}
@@ -77,6 +89,8 @@
 		pickList.put('闀滃瓙', jingzi);
 		pickList.put('灏忛暅绉�', xiaojingzhong);
 		pickList.put('鑳介噺', nengliang);
+		pickList.put('娲楁秷鏈�', xixiaoji);
+		pickList.put('鍏夋簮', guangyuan);
 		pickList.put('鍏朵粬', qita);
         return JSON.serialize(pickList);
     }
@@ -156,7 +170,7 @@
 			 Manager_sales__c,recordtypeid,recordtype.DeveloperName
 			 from Lost_cancel_report__c
 			 where id =: lostReportId limit 1];
-
+			System.debug('chenjingwu' + lostReportList);
 			if(lostReportList.size() == 0) {
 				pageStatus = null;
 				maps.put('message', '鎮ㄦ病鏈夋煡鐪嬭繖涓け鍗�/閮ㄥ垎澶卞崟鎶ュ憡鐨勬潈闄愶紒');
@@ -193,11 +207,12 @@
 			[
 				select id, LostPrice__c, Lost_By_Company__c,
 				Lost_reason_main__c,Lost_Reason_Sub__c,Name,Agency__c, AgencyMannual__c,
-				// ProductCategory__c,ProductClass__c,
-				Lost_cancel_report__c,Lost_By_Company_Mannual__c,
+				Lost_cancel_report__c,Lost_By_Company_Mannual__c,ChannelSpecificReasons__c,
 				( select id,PCLLostBrand__c,LostProduct__c,
+				LostProduct__r.Name,
 				  LostProductMannual__c,            //SWAG-C6P9PX lt 20210913 add
-				  ProductCategory__c,ProductClass__c, //add tcm 20211123
+				  ProductCategory__c,
+				  ProductClass__c, //add tcm 20211123
 				  Quantity__c,Name, LostBrandName__c 
 				  from PCLLostBrand__c.PCLLostBrandProduct__r)
 				from PCLLostBrand__c
@@ -216,8 +231,11 @@
 					system.debug('check products:'+ (templostBrand.PCLLostBrandProduct__r != null) + '|' + (templostBrand.PCLLostBrandProduct__r.size() > 0));
 					if (templostBrand.PCLLostBrandProduct__r != null && templostBrand.PCLLostBrandProduct__r.size() > 0) {
 						for( PCLLostProduct__c tempProduct: templostBrand.PCLLostBrandProduct__r) {
-
-							tempProductList.add(new PCLLostProducts(productCount,tempProduct));
+							PCLLostProducts pro = new PCLLostProducts(productCount,tempProduct);
+							if(tempProduct.LostProduct__r.Name != null){
+								pro.productName = tempProduct.LostProduct__r.Name;
+							}
+							tempProductList.add(pro);
 							productCount++;
 						}
 					} else {
@@ -230,10 +248,15 @@
 								newProduct.LostProductss.LostBrandName__c = templostBrand.Lost_By_Company__c;
 							}
 							system.debug('aaa4+++'+templostBrand.Lost_By_Company_Mannual__c);
+							
 						tempProductList.add(newProduct);
 						productCount++;
 					}
-					LostBrandList.add( new LostBrand(brandCount,tempProductList, templostBrand));
+					LostBrand br = new LostBrand(brandCount,tempProductList, templostBrand);
+					if(tempLostBrand.ChannelSpecificReasons__c != null){
+						br.reasonFlag = true;
+					}
+					LostBrandList.add(br);
 					brandCount++;
 				}
 
@@ -245,8 +268,29 @@
 		// 璇诲彇绔炰簤瀵规墜鍝佺墝
 		// BrandmapSet();
 		
-		if (LostReport.lostReport.Report_Status__c != '鑽夋' && lostReportId != null) {
-			ProcessInstance pro = [
+		if (lostReportId != null) {
+			// List<ProcessInstance> pros = [
+			// SELECT 
+			// ProcessDefinition.Name,
+			// 	(
+			// 	SELECT 
+			// 	Id,
+			// 	StepStatus, 
+			// 	IsPending,
+			// 	Comments,
+			// 	CreatedDate,
+			// 	Actor.Name,  
+			// 	OriginalActor.Name,
+			// 	ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC, CreatedDate DESC 
+			// )
+			// FROM ProcessInstance where TargetObjectId =:LostReport.lostReport.id order by CreatedDate DESC
+			// ];
+			// List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+			// for(ProcessInstance pro: pros){
+			// 	items.add(pro.StepsAndWorkitems);
+			// }
+			// LostReport.approvalHistorys = items;
+			List<ProcessInstance> pros = [
 			SELECT 
 			ProcessDefinition.Name,
 				(
@@ -262,8 +306,19 @@
 			)
 			FROM ProcessInstance where TargetObjectId =:LostReport.lostReport.id order by CreatedDate DESC
 			];
+			if(pros.size() > 0){
+				List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+				for(ProcessInstance pro: pros){
+					items.addAll(pro.StepsAndWorkitems);
+				}
+				LostReport.approvalHistorys = items;
+			}else{
+				List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+				LostReport.approvalHistorys = items;
+			}
+			
+		}else{
 			List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
-			items.addall(pro.StepsAndWorkitems);
 			LostReport.approvalHistorys = items;
 		}
 		if(string.isNotEmpty(submitFlag)) {
@@ -309,7 +364,12 @@
                                   from BatchIF_Transfer__c
                                   where Dropped_Flag__c = false
                                           and Table__c = 'PCLLostBrand__c' and Column__c = 'Lost_By_Company__c' and External_value__c =: productName];
-			return transfer[0].Internal_value__c;
+			if(transfer.size() > 0){
+				return transfer[0].Internal_value__c;
+			}else{
+				return null;
+			}
+			
 		} catch (Exception e) {
 			throw new AuraHandledException(e.getMessage());
 		}
@@ -317,6 +377,7 @@
 	// 鏁版嵁褰曞叆
 	@AuraEnabled
 	public static Map<String,String> dataEntry(String report1,List<Id> deleteBrandIdList,List<Id> deleteProductIdList){
+		// LostReport report = (LostReport)JSON.deserializeUntyped(report1, LostReport.class);
 		LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class);
 		Map<String,String> messageMap = new Map <String,String>();
 		system.debug('save---start:');
@@ -332,8 +393,8 @@
 			report.lostReport.Lost_Reason_Sub__c  = null;
 			report.lostReport.Lost_By_Company__c = null;
 				//鎵瑰噯鏃ヤ笉涓虹┖鏃剁粰淇敼鍚庡啀鎵瑰噯璧嬪��
-			if(LostReport.lostReport.Approved_Day__c != null){
-				LostReport.lostReport.ModifyAfterApproval__c = true;
+			if(report.lostReport.Approved_Day__c != null){
+				report.lostReport.ModifyAfterApproval__c = true;
 			}
 			for(LostBrand tempLostBrand : report.LostBrands) {
 				if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) {
@@ -451,7 +512,7 @@
 				}
 			}
 			if (report.lostReport.Report_Status__c != '鑽夋') {
-				ProcessInstance pro = [
+				List<ProcessInstance> pros = [
 				SELECT 
 				ProcessDefinition.Name,
 				 (
@@ -468,16 +529,33 @@
 				FROM ProcessInstance where TargetObjectId =:reportId order by CreatedDate DESC
 				];
 				List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
-				items.addall(pro.StepsAndWorkitems);
+				for(ProcessInstance pro: pros){
+					items.addAll(pro.StepsAndWorkitems);
+				}
+				report.approvalHistorys = items;
+			}else{
+				List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
 				report.approvalHistorys = items;
 			}
 			// lostReportId = report.lostReport.id;
 			system.debug('save---end:');
 			messageMap.put('LostReport',JSON.serialize(report));
-		}catch (Exception ex) {
+		}catch (Exception e) {
 			Database.rollback(sp);
 			// 杩欓噷闇�瑕佸啓涓�浜涙姤閿欎俊鎭�
-			messageMap.put('error', ex.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());
+            }
+			
 			return messageMap;
 		}
 		return messageMap;
@@ -486,19 +564,20 @@
 	
 	// 鎻愪氦
 	@AuraEnabled
-	public static Map<string,Object> submit(String report1,String reportId){
-		LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class);
+	public static Map<string,Object> submit(String reportStatus,Boolean modifyAfterApproval,String reportId){
+		// LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class);
 		Map<string,string> messages = new Map<string,string>();
-		if(!'鑽夋'.equals(report.lostReport.Report_Status__c) && LostReport.LostReport.ModifyAfterApproval__c == false) {
+		if(!'鑽夋'.equals(reportStatus) && modifyAfterApproval == false) {
 			messages.put('error', '鍙湁鍦ㄨ崏妗堜腑鎵嶈兘鎻愪氦鐢宠锛�');
 			return messages;
 		}
 		Map<string,Object> objs = new Map<string,Object>();
+		Lost_cancel_report__c report = new Lost_cancel_report__c();
 		Savepoint sp = Database.setSavepoint();
 		try{
-			report.lostReport.Id = reportId;
-			report.lostReport.Report_Status__c = '鎻愪氦';
-			update report.lostReport;
+			report.Id = reportId;
+			report.Report_Status__c = '鎻愪氦';
+			update report;
 			// Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
 			// psr.setObjectId(reportId);
 			// Approval.ProcessResult submitResult = Approval.process(psr);
@@ -506,7 +585,7 @@
 			objs.put('Id', reportId);
 			objs.put('pageStatus', 'View');
 			objs.put('submitFlag', '1');
-			ProcessInstance pro = [
+			List<ProcessInstance> pros = [
 				SELECT 
 				ProcessDefinition.Name,
 				 (
@@ -522,13 +601,28 @@
 				)
 				FROM ProcessInstance where TargetObjectId =:reportId order by CreatedDate DESC
 			];
+			
 			List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
-			items.addall(pro.StepsAndWorkitems);
+			for(ProcessInstance pro:pros){
+				items.addAll(pro.StepsAndWorkitems);
+			}
+			
 			objs.put('approvalHistorys',items);
 			return objs;
-		}catch(exception ex) {
+		}catch(exception e) {
 			Database.rollback(sp);
-			messages.put('error', ex.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);
+                objs.put('error', ''+ newStr);
+            }else {
+                objs.put('error', ''+ e.getMessage());
+            }
 			return messages;
 		}
 	}
@@ -591,9 +685,14 @@
 		public list<PCLLostProducts> LostProducts;
 		@AuraEnabled
 		public Integer ProductSize;
+		@AuraEnabled
+		public Boolean reasonFlag = false;
+		@AuraEnabled
+		public String brandTitle; 
 		public LostBrand( integer lineNo ){
 			lostBrand = new PCLLostBrand__c();
 			this.lineNo = lineNo;
+			this.brandTitle = '澶卞崟鍝佺墝' + (lineNo + 1);
 			LostProducts = new list<PCLLostProducts> {new PCLLostProducts()};
 			ProductSize = 1;
 			lostBrand = new PCLLostBrand__c();
@@ -601,12 +700,14 @@
 		public LostBrand( integer lineNo, list<PCLLostProducts> LostProducts ){
 			lostBrand = new PCLLostBrand__c();
 			this.lineNo = lineNo;
+			this.brandTitle = '澶卞崟鍝佺墝' + (lineNo + 1);
 			this.LostProducts = LostProducts;
 			ProductSize = LostProducts.size();
 		}
 		public LostBrand( integer lineNo, list<PCLLostProducts> LostProducts,  PCLLostBrand__c lostBrand){
 			this.lostBrand = lostBrand;
 			this.lineNo = lineNo;
+			this.brandTitle = '澶卞崟鍝佺墝' + (lineNo + 1);
 			this.LostProducts = LostProducts;
 			ProductSize = LostProducts.size();
 		}
@@ -647,11 +748,12 @@
 	public static void search() {
 		if (LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) {
 			LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null;
-			LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null;
 			LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false;
 
 		}else {
-			Product2 prd = [select Id,ProductClass__c, ProductCategory__c from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
+			Product2 prd = [select Id,ProductClass__c
+			, ProductCategory__c 
+			from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
 			if (prd.ProductCategory__c!=null) {
 				LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c;
 				LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;
@@ -668,7 +770,10 @@
 	public static string searchProduct(String lostProduct){
 		Product2 prd = null;
 		try {
-			prd = [select Id,ProductClass__c, ProductCategory__c from Product2 where Id =:lostProduct];
+			prd = [select Id
+			,ProductClass__c
+			, ProductCategory__c 
+			from Product2 where Id =:lostProduct];
 		} catch (Exception e) {
 			throw new AuraHandledException(e.getMessage());
 		}
@@ -677,4 +782,38 @@
 
 	// add tcm 20211118 end
 
+	@AuraEnabled
+    public static String submitForApproval(String recordId, String comments,String action){
+		try {
+			List<ProcessInstanceWorkitem> workItems = [
+            SELECT Id, ProcessInstanceId 
+            FROM ProcessInstanceWorkitem 
+            WHERE ProcessInstance.TargetObjectId = :recordId 
+			];
+			Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();
+			req.setWorkitemId(workItems.get(0).Id);
+			req.setAction(action);
+			req.setComments(comments);
+		
+				
+			Approval.ProcessResult result = Approval.process(req);
+			return null; 
+		} catch (Exception e) {
+			return e.getMessage();
+		}
+        
+    }
+
+	@AuraEnabled
+    public static String reassignStep(String recordId, String newActorId ){
+		try {
+			List<ProcessInstanceWorkItem> workItemList = [SELECT ActorId FROM ProcessInstanceWorkitem WHERE ProcessInstance.TargetObjectId = : recordId];
+        	ApprovalHistoryUtil.reassignStep(workItemList, newActorId);
+			return null;
+		} catch (Exception e) {
+			return e.getMessage();
+		}
+        
+    }
+
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalHistoryLWC/ApprovalHistoryLWC.css b/force-app/main/default/lwc/approvalHistoryLWC/ApprovalHistoryLWC.css
new file mode 100644
index 0000000..d9d03ab
--- /dev/null
+++ b/force-app/main/default/lwc/approvalHistoryLWC/ApprovalHistoryLWC.css
@@ -0,0 +1,7 @@
+.slds-icon-standard-approval {
+    background-color: #dcd861;
+  }
+  
+  .lookup-form {
+    padding-bottom: 100px;
+  }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.html b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.html
new file mode 100644
index 0000000..65f977a
--- /dev/null
+++ b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.html
@@ -0,0 +1,200 @@
+<template>        
+          
+    <div>
+      
+      <lightning-card>
+        <template  if:true={isLoading}>
+              <p>娴嬭瘯</p>
+              <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+      </template>
+        <h3 slot="title">
+          <lightning-icon
+            icon-name="standard:approval"
+            size="small"
+          ></lightning-icon>
+          <a
+            class="slds-card__header-link slds-p-left_medium"
+            if:true={approvalHistory}
+            >鎵瑰噯鍘嗗彶 ({approvalHistory.approvalStepsSize})</a
+          >
+        </h3>
+        <div slot="actions" if:true={approvalHistory}>
+          <ul class='slds-button-group-list'>
+            <li if:true={showSubmitForApprovalButton}>
+              <lightning-button
+            data-id="SubmitForApproval"
+            label="Submit for Approval"
+            if:true={showSubmitForApprovalButton}
+            onclick={handleSubmitForApprovalClick}
+          ></lightning-button>
+            </li>
+            <li if:true={approvalHistory.isCurrentUserApprover}> 
+              <lightning-button
+            data-id="Approve"
+            label="鎵瑰噯"
+            if:true={approvalHistory.isCurrentUserApprover}
+            onclick={handleApproveClick}
+          ></lightning-button>
+        </li>
+            <li if:true={approvalHistory.isCurrentUserApprover}> 
+              <lightning-button
+            data-id="Reject"
+            label="鎷掔粷"
+            if:true={approvalHistory.isCurrentUserApprover}
+            onclick={handleRejectClick}
+          ></lightning-button></li>
+
+            <li ><lightning-button-menu 
+            menu-alignment='right' 
+            alternative-text="Show menu"
+            if:true={showButtonMenu}
+            
+          >
+            <lightning-menu-item
+              data-id="Reassign"
+              value="Reassign"
+              label="閲嶆柊鍒嗛厤"
+              if:true={approvalHistory.isCurrentUserApprover}
+              onclick={handleReassignClick}
+            ></lightning-menu-item>
+            <lightning-menu-item
+              data-id="Recall"
+              value="Recall"
+              label="鎾ゅ洖"
+              if:true={approvalHistory.showRecall}
+              onclick={handleRecallClick}
+            ></lightning-menu-item>
+          </lightning-button-menu></li>
+            
+          </ul>
+          <!-- <lightning-button
+            data-id="SubmitForApproval"
+            label="Submit for Approval"
+            if:true={showSubmitForApprovalButton}
+            onclick={handleSubmitForApprovalClick}
+          ></lightning-button>
+          <lightning-button
+            data-id="Approve"
+            label="鎵瑰噯"
+            if:true={approvalHistory.isCurrentUserApprover}
+            onclick={handleApproveClick}
+          ></lightning-button> -->
+<!--           <lightning-button
+            data-id="Approve1"
+            label="娴嬭瘯"
+            if:true={approvalHistory.isCurrentUserApprover}
+            onclick={handleApproveClick1}
+          ></lightning-button> -->
+         <!--  <lightning-button
+            data-id="Reject"
+            label="鎷掔粷"
+            if:true={approvalHistory.isCurrentUserApprover}
+            onclick={handleRejectClick}
+          ></lightning-button> -->
+          <!-- <lightning-button-menu
+            alternative-text="Show menu"
+            if:true={showButtonMenu}
+            
+          >
+            <lightning-menu-item
+              data-id="Reassign"
+              value="Reassign"
+              label="閲嶆柊鍒嗛厤"
+              if:true={approvalHistory.isCurrentUserApprover}
+              onclick={handleReassignClick}
+            ></lightning-menu-item>
+            <lightning-menu-item
+              data-id="Recall"
+              value="Recall"
+              label="鎾ゅ洖"
+              if:true={approvalHistory.showRecall}
+              onclick={handleRecallClick}
+            ></lightning-menu-item>
+          </lightning-button-menu> -->
+        </div>
+        <template if:true={showDataTable}>
+          <lightning-datatable
+            key-field="id"
+            data={approvalHistory.approvalSteps}
+            columns={columns}
+            hide-checkbox-column
+            class="myApprovalHistoryTable"
+          ></lightning-datatable>
+          
+        </template>
+        <template if:true={showDataTable}>
+          <!-- needed to use the footer class because the tob bar looked weird with the datatable component on top-->
+          <center>
+           <!--  <p  class="slds-p-around_large">
+              <lightning-formatted-url
+                value={viewAllUrl}
+                label="鏌ョ湅鍏ㄩ儴"
+              ></lightning-formatted-url>
+            </p>   -->
+          </center>
+          
+        </template>
+
+     
+
+        <c-modal data-id="submitForApproval" onclosedialog={handleModalCancel} obj-name={objectApiName}>
+          <div slot="header">{modalTitle}</div>
+          <div class="slds-form-element" if:true={showCommentModal} style="height:460px !important">
+            
+            <template lwc:if={isShow} >
+              <template lwc:if={isAcc}>
+                <lightning-record-edit-form object-api-name="Account" record-id={recordId}>
+                  <lightning-input-field  style={inputFieldStyle} disabled={RejectionReasonDis} field-name="RejectionReason__c" value={obj.RejectionReason__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field style={inputFieldStyle} disabled={AssociatedHospitalDis} field-name="AssociatedHospital__c" value={obj.AssociatedHospital__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field  style={inputFieldStyleTwo} disabled={InstitutionalTypeDis} field-name="InstitutionalType__c" value={obj.InstitutionalType__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field  style={inputFieldStyleTwo} disabled={HospitalTypeDis} field-name="HospitalType__c" value={obj.HospitalType__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field style={inputFieldStyleTwo} disabled={WhetherRiskPassingDis} field-name="WhetherRiskPassing__c" value={obj.WhetherRiskPassing__c} onchange={fieldChange}></lightning-input-field>
+                </lightning-record-edit-form>
+              </template>
+              <template lwc:elseif={isAccApply}>
+                <lightning-record-edit-form object-api-name="Account_Delay_Apply__c">
+                  <lightning-input-field style={inputFieldStyleThree} disabled={InstitutionalTypeDis}  field-name="InstitutionalType__c" value={obj.InstitutionalType__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field style={inputFieldStyleFour} disabled={HospitalTypeDis} field-name="HospitalType__c" value={obj.HospitalType__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field style={inputFieldStyleFour} disabled={WhetherRiskPassingDis} field-name="WhetherRiskPassing__c" value={obj.WhetherRiskPassing__c} onchange={fieldChange}></lightning-input-field>
+                </lightning-record-edit-form>
+              </template>
+              <template lwc:elseif={isSolution}>
+                <lightning-record-edit-form object-api-name="Solution_Programme__c">
+                  <lightning-input-field required="true" field-name="Confirmation_Result__c" value={obj.Confirmation_Result__c} onchange={fieldChange}></lightning-input-field>
+                  <lightning-input-field field-name="Remarks__c" value={obj.Remarks__c} onchange={fieldChange}></lightning-input-field>
+                </lightning-record-edit-form>
+              </template>
+            </template>
+            <!-- <lightning-input data-id="comment" type="text" label="瀹㈡埛姘�" value={obj.Name}></lightning-input> -->
+            <lightning-input data-id="comment" type="text" label="璇勮" value=""></lightning-input>
+          </div>
+          <div class="slds-form-element lookup-form" if:true={showLookupModal}>
+            <c-approval-look-up
+              errors={lookupErrors}
+              onsearch={handleLookupSearch}
+              onselectionchange={handleSelectionChange}
+              label={lookupLabel}
+              placeholder="Search Users..."
+              is-multi-entry={isMultiEntry}
+              required
+            >
+            </c-approval-look-up>
+          </div>
+          <div slot="footer">
+            <lightning-button
+              data-id="Cancel"
+              label="鍙栨秷"
+              onclick={handleModalCancel}
+            ></lightning-button>
+            <lightning-button
+              data-id="Submit"
+              label={modalsubmitLabel}
+              variant="brand"
+              class="slds-p-left_small"
+              onclick={handleModalSubmit}
+            ></lightning-button>
+          </div>
+        </c-modal>
+      </lightning-card>
+    </div>
+  </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js
new file mode 100644
index 0000000..2201cdc
--- /dev/null
+++ b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js
@@ -0,0 +1,859 @@
+import { LightningElement, api, track, wire } from "lwc";
+import getApprovalHistory from "@salesforce/apex/ApprovalHistoryController.getApprovalHistory";
+import submitForApprovalApex from "@salesforce/apex/ApprovalHistoryController.submitForApproval";
+import reassignStep from "@salesforce/apex/ApprovalHistoryController.reassignStep";
+import processStep from "@salesforce/apex/ApprovalHistoryController.processStep";
+import searchUsers from "@salesforce/apex/ApprovalHistoryController.searchUsers";
+import saveRecord from "@salesforce/apex/ApprovalHistoryController.saveRecord";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import getInitData from "@salesforce/apex/ApprovalHistoryController.getInitData";
+import { getRecord } from 'lightning/uiRecordApi';
+import ProfileId_SystemAdmin from '@salesforce/label/c.ProfileId_SystemAdmin';
+import ProfileId_2J3 from '@salesforce/label/c.ProfileId_2J3';
+import USER_ID from '@salesforce/user/Id';
+import {
+  verifyIfNextApproverWasNeeded,
+  hideModal,
+  showModal,
+  getCommentPropertyFromModal,
+  showGetNextApproverModal,
+  validateUserLookup,
+  setSelectedUser,
+  clearModalState,
+  displayToast,
+  extractErrorMessage,
+  modalStates,
+  displayToastErrorQuery
+} from "./approvalHistoryUtil.js";
+import { ShowToastEvent } from "lightning/platformShowToastEvent";
+import { refreshApex } from "@salesforce/apex";
+
+const ERROR = "error";
+const SUCCESS = "success";
+const FIELDS = ['ObjectName__c.Id', 'ObjectName__c.Name'];
+const columns = [
+  {
+    label: "姝ラ鍚嶇О",
+    fieldName: "stepName",
+    type: "text",
+    typeAttributes: {
+      label: {
+        fieldName: "stepName"
+      }
+    }
+  },
+  {
+    label: "鏃ユ湡",
+    fieldName: "createdDate",
+    type: "date",
+    typeAttributes: {
+      month: "numeric",
+      day: "numeric",
+      year: "numeric",
+      hour: "numeric",
+      minute: "numeric"
+    }
+  },
+  { label: "鐘舵��", fieldName: "stepStatus" },
+  {
+    label: "琚垎閰嶄汉",
+    fieldName: "OriginalToUrl",
+    type: "url",
+    typeAttributes: {
+      label: {
+        fieldName: "OriginalTo"
+      }
+    }
+  },
+  {
+    label: "瀹為檯鎵瑰噯浜�",
+    fieldName: "assignedToUrl",
+    type: "url",
+    typeAttributes: {
+      label: {
+        fieldName: "assignedTo"
+      }
+    }
+  },
+  { label: "璇勮", fieldName: "comments" },
+];
+export default class ApprovalHistory extends LightningElement {
+  @api recordId;
+  @track isLoading=false;
+  @api objectApiName;
+  @api showComments; //Determines if the component will show the comments column
+  @api allowSubmitForApproval; //determines if the component will allow Submit for Approval functionality
+  @track approvalHistory; //approval history to display on page
+  @track isShow;//鏄惁灞曠ず闇�瑕佸~鍐欑殑琛ㄥ崟
+  wiredApprovalHistory; //property used to refreshApex
+
+  //modal properties
+  currentModalState; //decides which type of modal to display depending on the action happening(approve, reject, recall, etc)
+  modalComment; //temporarily stores the value of the comment input field in the modal
+  selectedUser; //temporarily stores the selected user from the lookup component in the modal
+  //end modal properties
+
+  //lookup properties
+  lookupErrors = []; //errors related to the lookup component
+  isMultiEntry = false;
+  initialSelection = [];
+  @track obj = {};
+  fieldChange(event){
+    const { value } = event.detail;
+    const { fieldName } = event.target || event.currentTarget;
+    let checked = event.target.value||event.currentTarget.value;
+    if (value == undefined && checked != undefined) {
+        this.obj = {
+            ...this.obj,
+            [fieldName]: checked
+        };
+    } else {
+        let theValue = value instanceof Array ? value[0] : value;
+        if(theValue===undefined){
+            theValue = '';
+        }
+        this.obj = {
+            ...this.obj,
+            [fieldName]: theValue
+        };
+    }
+    if(this.objectApiName==='Account'&&fieldName=='RejectionReason__c'){
+      if(this.obj.RejectionReason__c==='閲嶅'){
+        this.AssociatedHospitalDis = false;
+      }else{
+        this.AssociatedHospitalDis = true;
+      }
+      if (this.isdealers) {
+        this.RejectionReasonDis = true;
+        this.AssociatedHospitalDis = true;
+        this.InstitutionalTypeDis = true;
+        this.HospitalTypeDis = true;
+        this.WhetherRiskPassingDis = false;
+      }else{
+        this.WhetherRiskPassingDis = true;
+      } 
+    }
+    if(this.objectApiName==='Account'&&fieldName=='InstitutionalType__c'){
+      if(this.obj.InstitutionalType__c==='闈炲尰鐤楁満鏋�'){
+        this.HospitalTypeDis = false;
+      }else{
+        this.HospitalTypeDis = true;
+      }
+      if (this.isdealers) {
+        this.RejectionReasonDis = true;
+        this.AssociatedHospitalDis = true;
+        this.InstitutionalTypeDis = true;
+        this.HospitalTypeDis = true;
+        this.WhetherRiskPassingDis = false;
+      }else{
+        this.WhetherRiskPassingDis = true;
+      } 
+    }
+    if(this.objectApiName==='Account_Delay_Apply__c'&&fieldName=='InstitutionalType__c'){
+      if(this.obj.InstitutionalType__c==='闈炲尰鐤楁満鏋�'){
+        this.HospitalTypeDis = false;
+      }else{
+        this.HospitalTypeDis = true;
+      }
+      if (this.isdealers) {
+        this.WhetherRiskPassingDis = false;
+      }else{
+        this.WhetherRiskPassingDis = true;
+      } 
+    }
+  }
+  //end lookup properties
+  get columns() {
+    let tempColumns = columns;
+    if(this.showComments){
+      tempColumns.push({
+        label: "Comments", fieldName: "comments" 
+      });
+    } 
+
+    return tempColumns;
+  }
+  //url that will display all of the approval process history
+  get viewAllUrl() {
+    return "/lightning/r/" + this.recordId + "/related/ProcessSteps/view";
+  }
+  @track isAcc;
+  @track isAccApply;
+  @track isSolution=false;
+  @track isadmin=false;
+  @track isdealers;
+  @track RejectionReasonDis = true;
+  @track AssociatedHospitalDis = true;
+  @track inputFieldStyle = 'display: block;';
+  @track inputFieldStyleTwo = 'display: block;';
+  @track inputFieldStyleThree = 'display: block;';
+  @track inputFieldStyleFour = 'display: block;';
+  @track InstitutionalTypeDis = true;
+  @track HospitalTypeDis = true;
+  @track WhetherRiskPassingDis = true;
+  nodeName;
+  connectedCallback(){
+    console.log('connectedCallback');
+    console.log(this.objectApiName);
+    console.log(this.recordId);
+    if(this.objectApiName==='Account'){
+      //瀹㈡埛
+      this.isAcc = true;
+      this.isAccApply = false;
+      this.isSolution = false;
+    }else if(this.objectApiName==='Account_Delay_Apply__c'){
+      //瀹㈡埛鍙樻洿鐢宠
+      this.isAcc = false;
+      this.isAccApply = true;
+      this.isSolution = false;
+    }else{
+      //Solution鏂规 this.objectApiName==='Solution_Programme__c'
+      this.isAcc = false;
+      this.isAccApply = false;
+      this.isSolution = true;
+    }
+    if(this.objectApiName==='Account'||this.objectApiName==='Account_Delay_Apply__c'||this.objectApiName==='Solution_Programme__c'){
+      getInitData({ recordId: this.recordId,objectApiName:this.objectApiName})
+      .then(result => {
+          this.obj =  JSON.parse(result.objJson);
+          // if(this.objectApiName==='Account'){
+              console.log('handleUserInfo');
+              var userProfileId = result.currentUserProfileId;
+              this.nodeName = result.nodeName;
+              console.log(this.nodeName + '<===this.nodeName');
+              console.log(userProfileId);
+              console.log(ProfileId_SystemAdmin);
+              console.log(ProfileId_2J3);
+              if(userProfileId===ProfileId_SystemAdmin){
+                this.isadmin = true;
+              }else{
+                this.isadmin = false;
+              }
+              if(userProfileId===ProfileId_2J3){
+                this.isdealers = true;
+              }else{
+                this.isdealers = false;
+              }
+              console.log(this.isadmin);
+              console.log(this.isdealers);
+              if(!this.isadmin && !this.isdealers) {
+                console.log('鍙岄潪閿佸畾');
+                this.RejectionReasonDis = true;
+                this.AssociatedHospitalDis = true;
+                this.InstitutionalTypeDis = true;
+                this.HospitalTypeDis = true;
+                this.WhetherRiskPassingDis = true;
+              }else if(this.isadmin && !this.isdealers){
+                console.log('娴嬭瘯鎵ц');
+                this.RejectionReasonDis = false;
+                this.AssociatedHospitalDis = true;
+                this.InstitutionalTypeDis = true;
+                if (this.objectApiName==='Account_Delay_Apply__c') {
+                    this.InstitutionalTypeDis = false;
+                    this.HospitalTypeDis = true;
+                    this.WhetherRiskPassingDis = true;
+                }else{
+                    this.InstitutionalTypeDis = true;
+                    this.HospitalTypeDis = false;
+                    this.WhetherRiskPassingDis = true;
+                }
+              }else if (this.isdealers) {
+                this.RejectionReasonDis = false;
+                this.AssociatedHospitalDis = true;
+                
+                if (this.objectApiName==='Account_Delay_Apply__c') {
+                    this.InstitutionalTypeDis = true;
+                    this.HospitalTypeDis = true;
+                    this.WhetherRiskPassingDis = false;
+                }else{
+                    this.InstitutionalTypeDis = true;
+                    this.HospitalTypeDis = false;
+                    this.WhetherRiskPassingDis = false;
+                }
+
+              }
+          // }
+      }).catch(error => {
+          console.error('Error loading report: ', error);
+      });
+    }
+  }
+  //decides if it will show the menu that may two buttons, the recall and the reassign 
+  get showButtonMenu() {
+    return (
+      this.approvalHistory.isCurrentUserApprover ||
+      this.approvalHistory.showRecall
+    );
+  }
+
+  //decides if it will show the submit for approval button
+  get showSubmitForApprovalButton() {
+    return this.approvalHistory &&
+      this.approvalHistory.showSubmitForApproval &&
+      this.allowSubmitForApproval
+      ? true
+      : false;
+  }
+
+  //will return a different modal title depending on the state 
+  get modalTitle() {
+    if (this.currentModalState && modalStates[this.currentModalState])
+      return modalStates[this.currentModalState].title;
+    return "";
+  }
+  // will return a different label for the submit button, depending on the current state.(Approve, Reject, Submit, etc)
+  get modalsubmitLabel() {
+    if (this.currentModalState && modalStates[this.currentModalState])
+      return modalStates[this.currentModalState].submitLabel;
+    return "";
+  } 
+
+  // decides if the comment input field will show in the modal, based on the current state
+  get showCommentModal() {
+    return (
+      this.currentModalState === modalStates.SUBMIT_APPROVAL.state ||
+      this.currentModalState === modalStates.APPROVE.state ||
+      this.currentModalState === modalStates.REJECT.state ||
+      this.currentModalState === modalStates.RECALL.state
+    );
+  }
+
+  // decides if the lookup component will show in the modal, based on the current state
+  get showLookupModal() {
+    return (
+      this.currentModalState === modalStates.GET_NEXT_APPROVER_SUBMIT.state ||
+      this.currentModalState === modalStates.REASSIGN.state ||
+      this.currentModalState === modalStates.GET_NEXT_APPROVER_APPROVE.state
+    );
+  }
+
+  // decides the label for the lookup component, based on the current state
+  get lookupLabel() {
+    return modalStates[this.currentModalState].lookupLabel;
+  }
+
+  get showDataTable() {
+    return this.approvalHistory && this.approvalHistory.approvalSteps.length > 0
+      ? true
+      : false;
+  }
+
+  @wire(getApprovalHistory, { recordId: "$recordId" })
+  wiredGetApprovalHist(value) {
+    this.wiredApprovalHistory = value;
+    if (value.data) {
+      this.approvalHistory = value.data;
+      console.log('wiredGetApprovalHist');
+      console.log(JSON.stringify(this.approvalHistory));
+    } else if (value.error) {
+      displayToastErrorQuery(this, ShowToastEvent);
+    }
+  }
+
+  refreshApprovalHistory() {
+    console.log('refreshApprovalHistory');
+    refreshApex(this.wiredApprovalHistory);
+    console.log('/lightning/r/'+this.objectApiName+'/'+this.recordId+'/view');
+    window.location.href = '/lightning/r/'+this.objectApiName+'/'+this.recordId+'/view';
+  }
+
+  @api
+  submitForApproval(){
+    this.handleSubmitForApprovalClick();
+  }
+  //button click handlers
+  //the handlers show the modal and change the currentModalState depending on the button clicked
+ 
+  handleSubmitForApprovalClick() {
+    console.log('handleSubmitForApprovalClick');
+    showModal(this);
+    this.currentModalState = modalStates.SUBMIT_APPROVAL.state;
+  }
+
+  handleReassignClick() {
+    showModal(this);
+    this.isShow = false;
+    this.currentModalState = modalStates.REASSIGN.state;
+  }
+
+  handleRecallClick() {
+    showModal(this);
+    this.isShow = false;
+    this.currentModalState = modalStates.RECALL.state;
+  }
+handleApproveClick1() {
+  this.isLoading=true;
+}
+  handleApproveClick() {
+    this.inputFieldStyle ='display: none;';
+    this.inputFieldStyleTwo = 'display: block;';
+    // this.inputFieldStyleThree = 'display: none;';
+    // this.inputFieldStyleFour = 'display: block;';
+    if(this.objectApiName==='Account'){
+      var InsType = this.obj.InstitutionalType__c;
+      if (this.nodeName.indexOf('鍖婚櫌鏂板缓瀹℃壒_浜嬩笟鎺ㄨ繘閮�')!=-1) {
+        this.RejectionReasonDis = false;
+        this.InstitutionalTypeDis = false;
+        console.log('InsType='+InsType);
+        if(InsType=== '闈炲尰鐤楁満鏋�'){
+          this.HospitalTypeDis = false;
+        }else{
+          this.HospitalTypeDis = true;
+        }
+      }
+      if (this.isdealers) {
+        this.RejectionReasonDis = true;
+        this.AssociatedHospitalDis = true;
+        this.InstitutionalTypeDis = true;
+        this.HospitalTypeDis = true;
+        this.WhetherRiskPassingDis = false;
+      }else{
+        this.WhetherRiskPassingDis = true;
+      }
+      
+    }
+    if(this.objectApiName==='Account_Delay_Apply__c'){
+      var InsType = this.obj.InstitutionalType__c;
+      console.log('InsType='+InsType);
+      if (this.nodeName.indexOf('鍖婚櫌鍙樻洿瀹℃壒_浜嬩笟鎺ㄨ繘閮�')!=-1) {
+        if(InsType== '闈炲尰鐤楁満鏋�'){
+          this.HospitalTypeDis = false;
+        }else{
+          this.HospitalTypeDis = true;
+        }
+        if (this.isdealers) {
+          this.WhetherRiskPassingDis = false;
+        }else{
+          this.WhetherRiskPassingDis = true;
+        }
+      }
+    }
+
+    showModal(this);
+    this.isShow = true;
+    this.currentModalState = modalStates.APPROVE.state;
+
+  }
+
+  handleRejectClick() {
+    this.inputFieldStyle = 'display: block;';
+    this.inputFieldStyleTwo = 'display: none;';
+    // this.inputFieldStyleThree = 'display: block;';
+    // this.inputFieldStyleFour = 'display: none;';
+    if(this.objectApiName==='Account'){
+      
+      if (this.nodeName.indexOf('鍖婚櫌鏂板缓瀹℃壒_浜嬩笟鎺ㄨ繘閮�')!=-1) {
+        this.InstitutionalTypeDis = false;
+        var InsType = this.InstitutionalTypeDis;
+        if(InsType=== '闈炲尰鐤楁満鏋�'){
+          this.HospitalTypeDis = false;
+        }else{
+          this.HospitalTypeDis = true;
+        }
+        if (this.isdealers) {
+          this.RejectionReasonDis = true;
+          this.AssociatedHospitalDis = true;
+          this.InstitutionalTypeDis = true;
+          this.HospitalTypeDis = true;
+          this.WhetherRiskPassingDis = false;
+        }else{
+          this.WhetherRiskPassingDis = true;
+        }
+      }
+    }
+
+    if(this.objectApiName==='Account_Delay_Apply__c'){
+      if (this.nodeName.indexOf('鍖婚櫌鍙樻洿瀹℃壒_浜嬩笟鎺ㄨ繘閮�')!=-1) {
+        var InsType = this.obj.InstitutionalType__c;
+          if(InsType=== '闈炲尰鐤楁満鏋�'){
+            this.HospitalTypeDis = false;
+          }else{
+            this.HospitalTypeDis = true;
+          }
+        if (this.isdealers) {
+          this.WhetherRiskPassingDis = false;
+        }else{
+          this.WhetherRiskPassingDis = true;
+        }
+      }
+    }
+    showModal(this);
+    this.isShow = true;
+    this.currentModalState = modalStates.REJECT.state;
+  }
+  //end button click handlers
+
+  //this function submits for approval, if a next approver is needed, 
+  //it will show the next approver modal which will trigger the submition again.
+  submitForApprovalApexCall() {
+    hideModal(this);
+    this.isLoading=true;
+    submitForApprovalApex({
+      recordId: this.recordId,
+      comments: this.modalComment,
+      nextApproverId: this.selectedUser
+    })
+      .then(result => {
+
+        let jsonResult = JSON.parse(result);
+        if (jsonResult.success) {
+          displayToast(this, ShowToastEvent, SUCCESS);
+          this.refreshApprovalHistory();
+        } else {
+          displayToast(this, ShowToastEvent, ERROR);
+        }
+        clearModalState(this);
+      })
+      .catch(error => {
+        if (verifyIfNextApproverWasNeeded(error.body.pageErrors)) {
+          showGetNextApproverModal(this, modalStates.GET_NEXT_APPROVER_SUBMIT.state);
+        } else {
+          let errorMessage = extractErrorMessage(error.body.pageErrors);
+          displayToast(this, ShowToastEvent, ERROR, errorMessage);
+          clearModalState(this);
+        }
+      });
+  }
+
+  //function that takes care of reassigning the pending step to the selected user.
+  reassignApexCall() {
+    hideModal(this);
+    reassignStep({ recordId: this.recordId, newActorId: this.selectedUser })
+      .then(() => {
+        displayToast(this, ShowToastEvent, SUCCESS);
+        clearModalState(this);
+        this.refreshApprovalHistory();
+      })
+      .catch(() => {
+        displayToast(this, ShowToastEvent, ERROR);
+        clearModalState(this);
+      });
+  }
+
+  //function that takes care of approve, reject, and recall. If next approver is needed
+  //it will show the next approver modal which will trigger the submition again.
+  processStepApexCall(action) {
+    console.log('processStepApexCall');
+    hideModal(this);
+    this.isLoading=true;
+    processStep({
+      recordId: this.recordId,
+      comments: this.modalComment,
+      nextApproverId: this.selectedUser,
+      action: action,
+      objApiName:this.objectApiName,
+      modalsubmitLabel:this.modalsubmitLabel,
+      objJson:JSON.stringify(this.obj)
+    })
+      .then(result => {
+        console.log('then');
+        console.log(result);
+        let jsonResult = JSON.parse(result);
+        console.log(jsonResult);
+        console.log(jsonResult.success);
+        if (jsonResult.success) {
+          // displayToast(this, ShowToastEvent, SUCCESS);
+          this.isLoading=false;
+          if (this.modalsubmitLabel=='鎵瑰噯') {
+            this.showToast('success','鎵瑰噯瀹屾垚');
+          }else{
+            this.showToast('success','椹冲洖瀹屾垚');
+          }
+          
+          setTimeout(() => {
+                this.refreshApprovalHistory();
+            }, 3000); 
+          
+        } else {
+          if(jsonResult.returnMes){
+            this.showToast('error',jsonResult.returnMes);
+              // window.location.href = '/lightning/r/'+this.objectApiName+'/'+this.recordId+'/view';
+             setTimeout(() => {
+                window.location.href = '/lightning/r/' + this.objectApiName + '/' + this.recordId + '/view';
+            }, 3000);   
+          }else{
+            displayToast(this, ShowToastEvent, ERROR);
+              // window.location.href = '/lightning/r/'+this.objectApiName+'/'+this.recordId+'/view';
+            setTimeout(() => {
+                window.location.href = '/lightning/r/' + this.objectApiName + '/' + this.recordId + '/view';
+            }, 3000); 
+          }
+        }
+        clearModalState(this);
+      })
+      .catch(error => {
+        console.log('error');
+        if (verifyIfNextApproverWasNeeded(error.body.pageErrors)) {
+          showGetNextApproverModal(this, modalStates.GET_NEXT_APPROVER_APPROVE.state);
+        } else {
+          let errorMessage = extractErrorMessage(error.body.pageErrors);
+          displayToast(this, ShowToastEvent, ERROR, errorMessage);
+          clearModalState(this);
+          setTimeout(() => {
+                window.location.href = '/lightning/r/' + this.objectApiName + '/' + this.recordId + '/view';
+            }, 3000); 
+          // window.location.href = '/lightning/r/'+this.objectApiName+'/'+this.recordId+'/view';
+        }
+      });
+  }
+
+  handleModalCancel() {
+    hideModal(this);
+    clearModalState(this);
+  }
+
+  //function that handles the modal Submit button.
+  //depending on the current state, it will call the appropriate imperative method
+  handleModalSubmit() {
+    
+    if(this.isShow&&(this.isAcc||this.isAccApply||this.isSolution)){
+      //鍏堟彁浜ゅ叾浠栧瓧娈电殑濉啓
+      var today = new Date();
+      console.log('------------');
+      console.log(this.objectApiName);
+      console.log(this.recordId);
+      console.log(this.isSolution);
+      console.log(this.modalsubmitLabel);
+      console.log(this.currentModalState);
+      console.log(JSON.stringify(this.obj));
+      // return;
+      // if(this.isAcc){
+      //   if(this.modalsubmitLabel === '鎵瑰噯' || this.modalsubmitLabel === '鎷掔粷'){
+      //     //== '姝ラ锛氬尰闄㈡柊寤哄鎵筥钀ヤ笟鏀彺閮紙绛夊緟澶勭悊鐨� 棣栧厛 鎵瑰噯锛�'
+      //     if(testlink.contains('鍖婚櫌鏂板缓瀹℃壒_钀ヤ笟鏀彺閮�') ){
+      //         if(this.modalsubmitLabel === '鎵瑰噯'){
+      //             if(!this.stringIsEmpty(this.obj.RejectionReason__c)){
+      //                 this.showToast('error', '鎮ㄥ凡濉啓椹冲洖鐞嗙敱锛屾壒鍑嗕笉闇�瑕侀┏鍥炵悊鐢便��');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.stringIsEmpty(this.obj.InstitutionalType__c)){
+      //                 this.showToast('error', '鎵瑰噯鍓嶏紝鏈烘瀯绫诲瀷蹇呭~銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.InstitutionalType__c === '闈炲尰鐤楁満鏋�' && this.stringIsEmpty(this.obj.HospitalType__c)){
+      //                 this.showToast('error', '闈炲尰鐤楁満鏋勮閫夋嫨鍖婚櫌绫诲瀷銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.InstitutionalType__c === '鍖荤枟鏈烘瀯' && !this.stringIsEmpty(this.obj.HospitalType__c)){
+      //                 this.showToast('error', '鍖荤枟鏈烘瀯涓嶉渶瑕侀�夋嫨鍖婚櫌绫诲瀷銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.InstitutionalType__c === '鍖荤枟鏈烘瀯'){
+      //                 this.obj = {
+      //                   ...this.obj,
+      //                   ['Is_Active__c']: '鏈夊姽'
+      //                 };
+      //                 this.obj = {
+      //                   ...this.obj,
+      //                   ['Approved_Confirm_Date__c']: today
+      //                 };
+      //             }
+      //         }
+      //         //鎷掔粷
+      //         if(this.modalsubmitLabel === '鎷掔粷'){
+      //             if(this.stringIsEmpty(this.obj.RejectionReason__c)){
+      //                 this.showToast('error', '鎷掔粷鍓嶏紝璇烽�夋嫨椹冲洖鐞嗙敱銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.RejectionReason__c === '閲嶅' && this.stringIsEmpty(this.obj.AssociatedHospital__c)){
+      //                 this.showToast('error', '椹冲洖鐞嗙敱鏄噸澶嶇殑锛岃濉啓鍏宠仈鍖婚櫌銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.RejectionReason__c !== '閲嶅' && !this.stringIsEmpty(this.obj.AssociatedHospital__c)){
+      //                 this.showToast('error', '椹冲洖鐞嗙敱涓嶆槸閲嶅鐨勶紝涓嶈兘濉啓鍏宠仈鍖婚櫌銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(!this.stringIsEmpty(this.obj.RejectionReason__c) && (!this.stringIsEmpty(this.obj.InstitutionalType__c)||!this.stringIsEmpty(this.obj.HospitalType__c))){
+      //                 this.showToast('error', '瀹℃壒鎷掔粷锛屼笉鍏佽濉啓鏈烘瀯绫诲瀷鎴栧尰闄㈢被鍨嬨��');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //             if(this.obj.RejectionReason__c === '鍖婚櫌宸插叧寮�' || this.obj.RejectionReason__c === '閲嶅'){
+      //                 this.obj = {
+      //                   ...this.obj,
+      //                   ['Is_Active__c']: '椹冲洖'
+      //                 };
+      //             }else{
+      //                 this.obj = {
+      //                   ...this.obj,
+      //                   ['Is_Active__c']: '鑽夋涓�'
+      //                 };
+      //             }
+      //         }
+      //     }else if(testlink.contains('璐ㄩ噺娉曡浜岀骇閮ㄩ暱') ){
+      //         if(this.modalsubmitLabel === '鎵瑰噯'){
+      //            if(this.obj.InstitutionalType__c === '闈炲尰鐤楁満鏋�' && this.obj.HospitalType__c === '楂樼瓑闄㈡牎'){
+      //               this.obj = {
+      //                 ...this.obj,
+      //                 ['Is_Active__c']: '鏈夊姽'
+      //               };
+      //               this.obj = {
+      //                 ...this.obj,
+      //                 ['Approved_Confirm_Date__c']: today
+      //               };
+      //            }
+      //         }
+      //         if(this.modalsubmitLabel === '鎷掔粷'){
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Is_Active__c']: '椹冲洖'
+      //             };
+      //          }     
+      //      }else if(testlink.contains('缁忛攢鍟嗙鐞嗛儴涓�绾у鎵�')){
+      //         if(this.modalsubmitLabel === '鎵瑰噯'){
+      //             if(this.stringIsEmpty(this.obj.WhetherRiskPassing__c)){
+      //                 this.showToast('error', '鏄惁涓烘湁椋庨櫓閫氳繃 蹇呭~銆�');
+      //                 hideModal(this);
+      //                 return;
+      //             }
+      //            if(this.obj.InstitutionalType__c === '闈炲尰鐤楁満鏋�' && this.obj.HospitalType__c === '浼佷笟闆嗗洟' && this.obj.WhetherRiskPassing__c === '鍚�'){
+      //               this.obj = {
+      //                 ...this.obj,
+      //                 ['Is_Active__c']: '鏈夊姽'
+      //               };
+      //               this.obj = {
+      //                 ...this.obj,
+      //                 ['Approved_Confirm_Date__c']: today
+      //               };
+      //            }
+      //         }
+      //          if(this.modalsubmitLabel == '鎷掔粷'){
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Is_Active__c']: '椹冲洖'
+      //             };
+      //          } 
+  
+      //     }else if(testlink.contains('鎬荤粡鐞嗗鎵�')){
+      //         if(this.modalsubmitLabel === '鎵瑰噯'){
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Is_Active__c']: '鏈夊姽'
+      //             };
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Approved_Confirm_Date__c']: today
+      //             };
+      //         }
+      //         if(this.modalsubmitLabel === '鎷掔粷'){
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Is_Active__c']: '椹冲洖'
+      //             };
+      //         } 
+      //     }else{
+      //         if(this.modalsubmitLabel === '鎷掔粷'){
+      //             this.obj = {
+      //               ...this.obj,
+      //               ['Is_Active__c']: '椹冲洖'
+      //             };
+      //          }   
+      //     }
+      //  }
+      // }
+      if(this.isSolution){
+        if(this.obj.Confirmation_Result__c){
+        }else{
+          this.showToast('error', '蹇呴』濉啓鍙嶉缁撴灉锛�');
+          hideModal(this);
+          return;
+        }
+      }
+      // this.handleSubmit();
+      // saveRecord({objectApiName:this.objectApiName,objId:this.recordId,objJson:JSON.stringify(this.obj)})
+      //     .then(result => {
+            this.handleSubmit();
+      //       hideModal(this);
+      //       return;
+      //     })
+      //     .catch(error => {
+      //       hideModal(this);
+      //       this.showToast('error', error);
+      //       return;
+      //     });
+    }else{
+      this.handleSubmit();
+    }
+  }
+  showToast(variant,mes) {
+    const event = new ShowToastEvent({
+        message: mes,
+        variant: variant,
+    });
+    this.dispatchEvent(event);
+    this.dispatchEvent(new CloseActionScreenEvent());
+    return;
+  }
+  handleSubmit(){
+    console.log('handleSubmit');
+    switch (this.currentModalState) {
+      case modalStates.SUBMIT_APPROVAL.state:
+        this.modalComment = getCommentPropertyFromModal(this);
+        this.submitForApprovalApexCall();
+        break;
+      case modalStates.GET_NEXT_APPROVER_SUBMIT.state:
+        if (validateUserLookup(this)) {
+          setSelectedUser(this);
+          this.submitForApprovalApexCall();
+        }
+        break;
+      case modalStates.REASSIGN.state:
+        if (validateUserLookup(this)) {
+          setSelectedUser(this);
+          this.reassignApexCall();
+        }
+        break;
+      case modalStates.APPROVE.state:
+        this.modalComment = getCommentPropertyFromModal(this);
+        this.processStepApexCall(modalStates.APPROVE.action);
+        break;
+      case modalStates.GET_NEXT_APPROVER_APPROVE.state:
+        if (validateUserLookup(this)) {
+          setSelectedUser(this);
+          this.processStepApexCall(modalStates.APPROVE.action);
+        }
+        break;
+      case modalStates.RECALL.state:
+        this.modalComment = getCommentPropertyFromModal(this);
+        this.processStepApexCall(modalStates.RECALL.action);
+        break;
+      case modalStates.REJECT.state:
+        console.log('1');
+        this.modalComment = getCommentPropertyFromModal(this);
+        console.log('2');
+        this.processStepApexCall(modalStates.REJECT.action);
+        console.log('3');
+        break;
+      default:
+        break;
+    }
+  }
+  //searches the users based on the lookup component search event.
+  handleLookupSearch(event) {
+    searchUsers(event.detail)
+      .then(results => {
+        this.template.querySelector("c-lookup").setSearchResults(results);
+      })
+      .catch(error => {
+        this.lookupErrors = [error];
+      });
+  }
+
+  handleSelectionChange() {
+    this.lookupErrors = [];
+  }
+  stringIsEmpty(str) {
+    if (str === '' || str === undefined || str === null) {
+        return true;
+    } else {
+        return false;
+    }
+  }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js-meta.xml b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js-meta.xml
new file mode 100644
index 0000000..78a16cc
--- /dev/null
+++ b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryLWC.js-meta.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>48.0</apiVersion>
+    <isExposed>true</isExposed>
+    <masterLabel>Approval History</masterLabel>
+    <description>This component executes the same as the Approval History related list.</description>
+    <targets>
+      <target>lightning__RecordPage</target>
+      <target>lightning__AppPage</target>
+      <target>lightning__HomePage</target>
+      <target>lightning__RecordAction</target>
+    </targets> 
+    <targetConfigs>
+      <targetConfig targets="lightning__RecordPage">
+        <property
+        name="allowSubmitForApproval"
+        type="Boolean"
+        label="Allow Submit For Approval"
+      />
+      <property
+        name="showComments"
+        type="Boolean"
+        label="Show Comments"
+      />
+      <property
+            name="objectApiName"
+            type="String"
+            label="Object Name"
+            description="Automatically bind the page's object name to the component variable"
+            default="{!objectApiName}" />
+       <supportedFormFactors>
+          <supportedFormFactor type="Small" />
+          <supportedFormFactor type="Large" />
+      </supportedFormFactors>
+      </targetConfig>
+    </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryUtil.js b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryUtil.js
new file mode 100644
index 0000000..1c5ab6e
--- /dev/null
+++ b/force-app/main/default/lwc/approvalHistoryLWC/approvalHistoryUtil.js
@@ -0,0 +1,264 @@
+const COMMENT_DATA_FIELD = "comment";
+const USER_REQUIRED_ERROR_MESSAGE = "You must select a user before submitting.";
+
+//constant used to store the toast error information if there is an error
+//querying the approval history
+const queryError = {
+  title: "Error!",
+  message:
+    "There was an error while fetching the Approval History. Please contact your System Administrator.",
+  variant: "error"
+};
+
+//stores every possible modal state with all properties associated to each state
+//this stores the success/error toast message information, the Modal titles, and the submit buttons
+export const modalStates = {
+  SUBMIT_APPROVAL: {
+    state: "SUBMIT_APPROVAL",
+    // title: "Submit for Approval",
+    title: "鎻愪氦瀹℃壒",
+    // submitLabel: "Submit",
+    submitLabel: "鎻愪氦",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "Approval Process submitted.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while submitting the Approval Process. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  },
+  GET_NEXT_APPROVER_SUBMIT: {
+    state: "GET_NEXT_APPROVER_SUBMIT",
+    // title: "Submit for Approval",
+    title: "鎻愪氦瀹℃壒",
+    // submitLabel: "Submit",
+    submitLabel: "鎻愪氦",
+    lookupLabel: "Choose Next Approver",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "Approval Process submitted.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while submitting the Approval Process. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  },
+  APPROVE: {
+    state: "APPROVE",
+    title: "鎵瑰噯",
+    // submitLabel: "Approve",
+    submitLabel: "鎵瑰噯",
+    action: "Approve",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "The step was approved successfully.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while approving the step. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  }, //want to get sobject type like Approve Account
+  GET_NEXT_APPROVER_APPROVE: {
+    state: "GET_NEXT_APPROVER_APPROVE",
+    title: "鎵瑰噯",
+    // submitLabel: "Approve",
+    submitLabel: "鎵瑰噯",
+    lookupLabel: "Choose Next Approver",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "The step was approved successfully.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while approving the step. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  }, //want to get sobject type like Approve Account
+  REJECT: {
+    state: "REJECT",
+    title: "鎷掔粷",
+    // submitLabel: "Reject",
+    submitLabel: "鎷掔粷",
+    action: "Reject",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "The step was rejected successfully.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while rejecting the step. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  }, //want to get sobject type like Reject Account
+  RECALL: {
+    state: "RECALL",
+    // title: "Recall Approval Request",
+    title: "鎾ゅ洖鎵瑰噯璇锋眰",
+    // submitLabel: "Recall",
+    submitLabel: "鎾ゅ洖",
+    action: "Removed",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "The step was recalled successfully.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while recalling the step. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  }, //want to get sobject type like Reject Account
+  REASSIGN: {
+    state: "REASSIGN",
+    // title: "Reassign Approval Request",
+    title: "閲嶆柊鍒嗛厤瀹℃壒璇锋眰",
+    // submitLabel: "Reassign",
+    submitLabel: "閲嶆柊鍒嗛厤",
+    lookupLabel: "Reassign To",
+    toastInfo: {
+      success: {
+        label: "success",
+        title: "Success!",
+        message: "Approval process step was reassigned.",
+        variant: "success"
+      },
+      error: {
+        label: "error",
+        title: "Error!",
+        message:
+          "There was an error while reassigning the approval process step. Please contact your System Administrator.",
+        variant: "error"
+      }
+    }
+  } //want to get sobject type like Reject Account
+};
+
+//error message that indicates the next approver is missing
+const MISSING_NEXT_APPROVER_ERROR = "missing required field: [nextApproverIds]";
+
+//function called after error message from an imperative method,
+//to verify if a next approver is needed
+export function verifyIfNextApproverWasNeeded(errors) {
+  const missingNextApprover = error =>
+    error.message === MISSING_NEXT_APPROVER_ERROR;
+  return errors.some(missingNextApprover);
+}
+
+//modal helper functions
+export function hideModal(self) {
+  let modalToHide = self.template.querySelector("c-modal");
+  modalToHide.hide();
+}
+
+export function showModal(self) {
+  let modalToShow = self.template.querySelector("c-modal");
+  modalToShow.show();
+}
+
+//end modal helper functions
+
+export function getCommentPropertyFromModal(self) {
+  console.log('getCommentPropertyFromModal');
+  return self.template.querySelector(`[data-id="${COMMENT_DATA_FIELD}"]`).value;
+}
+
+export function showGetNextApproverModal(self, newState) {
+  self.currentModalState = newState;
+  showModal(self);
+}
+
+//if a user was not selected in the lookup 
+//populate the error message
+export function validateUserLookup(self) {
+  const selection = self.template.querySelector("c-lookup").getSelection();
+  if (selection.length === 0) {
+    self.lookupErrors = [{ message: USER_REQUIRED_ERROR_MESSAGE }];
+    return false;
+  }
+  self.lookupErrors = [];
+  return true;
+  
+}
+//populates the selected user property based on the selected
+//user in the lookup component
+export function setSelectedUser(self) {
+  self.selectedUser = self.template
+    .querySelector("c-lookup")
+    .getSelection()[0].id;
+}
+
+export function clearModalState(self) {
+  self.currentModalState = "";
+  self.selectedUser = "";
+  self.lookupErrors = [];
+  self.modalComment = "";
+  self.initialSelection = [];
+}
+
+//displays a toast based on the current modal state and on the status=success/error
+export function displayToast(self, ShowToastEvent, status, messageOverride) {
+  const event = new ShowToastEvent({
+    title: modalStates[self.currentModalState].toastInfo[status].title,
+    message: messageOverride
+      ? messageOverride
+      : modalStates[self.currentModalState].toastInfo[status].message,
+    variant: modalStates[self.currentModalState].toastInfo[status].variant
+  });
+  self.dispatchEvent(event);
+}
+
+export function displayToastErrorQuery(self, ShowToastEvent) {
+  const event = new ShowToastEvent({
+    title: queryError.title,
+    message: queryError.message,
+    variant: queryError.variant
+  });
+  self.dispatchEvent(event);
+}
+
+export function extractErrorMessage(errors) {
+  let errorMessage = "";
+  errors.forEach(element => {
+    errorMessage += element.message;
+  });
+  return errorMessage;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalLookUp/approvalLookUp.css b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.css
new file mode 100644
index 0000000..a23d2c3
--- /dev/null
+++ b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.css
@@ -0,0 +1,30 @@
+.slds-combobox__input,
+.slds-combobox_container {
+  transition: border 0.1s linear, box-shadow 0.1 linear;
+}
+
+.slds-combobox__input {
+  box-shadow: none;
+}
+
+.slds-combobox__input.has-custom-border {
+  box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px rgb(221, 219, 218) inset;
+}
+
+.slds-combobox__input.has-custom-error {
+  border: 1px solid rgb(194, 57, 52);
+  box-shadow: rgb(194, 57, 52) 0 0 0 1px inset;
+}
+
+.slds-combobox_container.has-custom-error {
+  border: none !important;
+}
+
+.slds-combobox__input.has-custom-height {
+  height: 32px !important;
+}
+
+.form-error {
+  color: rgb(194, 57, 52);
+  display: block;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalLookUp/approvalLookUp.html b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.html
new file mode 100644
index 0000000..b281929
--- /dev/null
+++ b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.html
@@ -0,0 +1,189 @@
+<template>
+    <div class="slds-form-element">
+      <label if:true={label} class="slds-form-element__label" for="combobox">
+        <abbr if:true={required} title="required" class="slds-required">*</abbr>
+        {label}
+      </label>
+      <div class="slds-form-element__control">
+        <div class={getContainerClass}>
+          <div
+            class={getDropdownClass}
+            aria-expanded={isExpanded}
+            aria-haspopup="listbox"
+            role="combobox"
+          >
+            <!-- Search input start -->
+            <div class={getComboboxClass} role="none">
+              <template if:false={isMultiEntry}>
+                <lightning-icon
+                  icon-name={getSelectIconName}
+                  size="small"
+                  alternative-text="Selected item icon"
+                  class={getSelectIconClass}
+                >
+                </lightning-icon>
+              </template>
+  
+              <!-- Text input -->
+              <input
+                type="text"
+                class={getInputClass}
+                aria-autocomplete="list"
+                aria-controls="listbox"
+                autocomplete="off"
+                role="textbox"
+                id="combobox"
+                placeholder={placeholder}
+                value={getInputValue}
+                title={getInputTitle}
+                readonly={isInputReadonly}
+                onfocus={handleFocus}
+                onblur={handleBlur}
+                oninput={handleInput}
+              />
+  
+              <!-- Search icon -->
+              <lightning-icon
+                icon-name="utility:search"
+                size="x-small"
+                alternative-text="Search icon"
+                class={getSearchIconClass}
+              ></lightning-icon>
+  
+              <!-- Clear selection button icon for single entry lookups -->
+              <template if:false={isMultiEntry}>
+                <button
+                  title="Remove selected option"
+                  type="button"
+                  onclick={handleClearSelection}
+                  class={getClearSelectionButtonClass}
+                >
+                  <lightning-icon
+                    icon-name="utility:close"
+                    size="x-small"
+                    alternative-text="Remove selected option"
+                    class="slds-button__icon"
+                  ></lightning-icon>
+                </button>
+              </template>
+            </div>
+            <!-- Search input end -->
+  
+            <!-- Result list box start -->
+            <div id="listbox" role="listbox" onclick={handleComboboxClick}>
+              <ul class={getListboxClass} role="presentation">
+                <!-- Spinner to display when waiting for results of search -->
+                <div if:true={loading}>
+                  <lightning-spinner
+                    alternative-text="Loading"
+                    size="small"
+                  ></lightning-spinner>
+                </div>
+  
+                <!-- Display if results are present -->
+                <template
+                  for:each={searchResults}
+                  for:item="result"
+                  if:true={isExpanded}
+                >
+                  <li
+                    key={result.id}
+                    role="presentation"
+                    class="slds-listbox__item"
+                  >
+                    <span
+                      class="slds-media slds-listbox__option slds-listbox__option_entity slds-listbox__option_has-meta"
+                      role="option"
+                      onclick={handleResultClick}
+                      data-recordid={result.id}
+                    >
+                      <span class="slds-media__figure">
+                        <lightning-icon
+                          icon-name={result.icon}
+                          size="small"
+                          alternative-text="Result item icon"
+                        ></lightning-icon>
+                      </span>
+                      <span class="slds-media__body">
+                        <span
+                          class="slds-listbox__option-text slds-listbox__option-text_entity"
+                        >
+                          <lightning-formatted-rich-text
+                            value={result.titleFormatted}
+                            disable-linkify
+                          >
+                          </lightning-formatted-rich-text>
+                        </span>
+                        <span
+                          class="slds-listbox__option-meta slds-listbox__option-meta_entity"
+                        >
+                          <lightning-formatted-rich-text
+                            value={result.subtitleFormatted}
+                            disable-linkify
+                          >
+                          </lightning-formatted-rich-text>
+                        </span>
+                      </span>
+                    </span>
+                  </li>
+                </template>
+                <!-- Display that there are no results -->
+                <template if:false={isExpanded}>
+                  <li role="presentation" class="slds-listbox__item">
+                    <span
+                      class="slds-media slds-listbox__option_entity"
+                      role="option"
+                    >
+                      <span if:false={loading} class="slds-media__body">
+                        No results.
+                      </span>
+                      <span if:true={loading} class="slds-media__body">
+                        Loading...
+                      </span>
+                    </span>
+                  </li>
+                </template>
+              </ul>
+            </div>
+            <!-- Result list box end -->
+          </div>
+        </div>
+  
+        <!-- Multi-selection start -->
+        <template if:true={isMultiEntry}>
+          <div id="selection" role="listbox" aria-orientation="horizontal">
+            <ul
+              class="slds-listbox slds-listbox_inline slds-var-p-top_xxx-small"
+              role="group"
+              aria-label="Selected Options:"
+            >
+              <template for:each={curSelection} for:item="item">
+                <li key={item.id} role="presentation" class="slds-listbox__item">
+                  <lightning-pill
+                    label={item.title}
+                    title={item.title}
+                    onremove={handleRemoveSelectedItem}
+                    name={item.id}
+                  >
+                    <lightning-icon icon-name={item.icon}></lightning-icon>
+                  </lightning-pill>
+                </li>
+              </template>
+            </ul>
+          </div>
+        </template>
+        <!-- Multi-selection end -->
+  
+        <!-- Errors start -->
+        <template for:each={errors} for:item="error">
+          <label
+            key={error.id}
+            role="alert"
+            class="slds-form-element__label slds-var-m-top_xx-small form-error"
+            >{error.message}</label
+          >
+        </template>
+        <!-- Errors end -->
+      </div>
+    </div>
+  </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js
new file mode 100644
index 0000000..6dc6f30
--- /dev/null
+++ b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js
@@ -0,0 +1,326 @@
+import { LightningElement, api } from "lwc";
+
+const MINIMAL_SEARCH_TERM_LENGTH = 2; // Min number of chars required to search
+const SEARCH_DELAY = 300; // Wait 300 ms after user stops typing then, peform search
+
+export default class Lookup extends LightningElement {
+  @api label;
+  @api required;
+  @api placeholder = "";
+  @api isMultiEntry = false;
+  @api errors = [];
+  @api scrollAfterNItems;
+
+  searchTerm = "";
+  searchResults = [];
+  hasFocus = false;
+  loading = false;
+  isDirty = false;
+
+  cleanSearchTerm;
+  blurTimeout;
+  searchThrottlingTimeout;
+  curSelection = [];
+
+  // EXPOSED FUNCTIONS
+  @api
+  set selection(initialSelection) {
+    this.curSelection = Array.isArray(initialSelection)
+      ? initialSelection
+      : [initialSelection];
+  }
+  get selection() {
+    return this.curSelection;
+  }
+
+  @api
+  setSearchResults(results) {
+    // Reset the spinner
+    this.loading = false;
+    // Clone results before modifying them to avoid Locker restriction
+    const resultsLocal = JSON.parse(JSON.stringify(results));
+    // Format results
+    this.searchResults = resultsLocal.map(result => {
+      // Clone and complete search result if icon is missing
+      if (this.searchTerm.length > 0) {
+        const regex = new RegExp(`(${this.searchTerm})`, "gi");
+        result.titleFormatted = result.title
+          ? result.title.replace(regex, "<strong>$1</strong>")
+          : result.title;
+        result.subtitleFormatted = result.subtitle
+          ? result.subtitle.replace(regex, "<strong>$1</strong>")
+          : result.subtitle;
+      }
+      if (typeof result.icon === "undefined") {
+        const { id, sObjectType, title, subtitle } = result;
+        return {
+          id,
+          sObjectType,
+          icon: "standard:default",
+          title,
+          subtitle
+        };
+      }
+      return result;
+    });
+  }
+
+  @api
+  getSelection() {
+    return this.curSelection;
+  }
+
+  // INTERNAL FUNCTIONS
+
+  updateSearchTerm(newSearchTerm) {
+    this.searchTerm = newSearchTerm;
+
+    // Compare clean new search term with current one and abort if identical
+    const newCleanSearchTerm = newSearchTerm
+      .trim()
+      .replace(/\*/g, "")
+      .toLowerCase();
+    if (this.cleanSearchTerm === newCleanSearchTerm) {
+      return;
+    }
+
+    // Save clean search term
+    this.cleanSearchTerm = newCleanSearchTerm;
+
+    // Ignore search terms that are too small
+    if (newCleanSearchTerm.length < MINIMAL_SEARCH_TERM_LENGTH) {
+      this.searchResults = [];
+      return;
+    }
+
+    // Apply search throttling (prevents search if user is still typing)
+    if (this.searchThrottlingTimeout) {
+      clearTimeout(this.searchThrottlingTimeout);
+    }
+    // eslint-disable-next-line @lwc/lwc/no-async-operation
+    this.searchThrottlingTimeout = setTimeout(() => {
+      // Send search event if search term is long enough
+      if (this.cleanSearchTerm.length >= MINIMAL_SEARCH_TERM_LENGTH) {
+        // Display spinner until results are returned
+        this.loading = true;
+
+        const searchEvent = new CustomEvent("search", {
+          detail: {
+            searchTerm: this.cleanSearchTerm,
+            selectedIds: this.curSelection.map(element => element.id)
+          }
+        });
+        this.dispatchEvent(searchEvent);
+      }
+      this.searchThrottlingTimeout = null;
+    }, SEARCH_DELAY);
+  }
+
+  isSelectionAllowed() {
+    if (this.isMultiEntry) {
+      return true;
+    }
+    return !this.hasSelection();
+  }
+
+  hasResults() {
+    return this.searchResults.length > 0;
+  }
+
+  hasSelection() {
+    return this.curSelection.length > 0;
+  }
+
+  // EVENT HANDLING
+
+  handleInput(event) {
+    // Prevent action if selection is not allowed
+    if (!this.isSelectionAllowed()) {
+      return;
+    }
+    this.updateSearchTerm(event.target.value);
+  }
+
+  handleResultClick(event) {
+    const recordId = event.currentTarget.dataset.recordid;
+
+    // Save selection
+    let selectedItem = this.searchResults.filter(
+      result => result.id === recordId
+    );
+    if (selectedItem.length === 0) {
+      return;
+    }
+    selectedItem = selectedItem[0];
+    const newSelection = [...this.curSelection];
+    newSelection.push(selectedItem);
+    this.curSelection = newSelection;
+    this.isDirty = true;
+
+    // Reset search
+    this.searchTerm = "";
+    this.searchResults = [];
+
+    // Notify parent components that selection has changed
+    this.dispatchEvent(new CustomEvent("selectionchange"));
+  }
+
+  handleComboboxClick() {
+    // Hide combobox immediatly
+    if (this.blurTimeout) {
+      window.clearTimeout(this.blurTimeout);
+    }
+    this.hasFocus = false;
+  }
+
+  handleFocus() {
+    // Prevent action if selection is not allowed
+    if (!this.isSelectionAllowed()) {
+      return;
+    }
+    this.hasFocus = true;
+  }
+
+  handleBlur() {
+    // Prevent action if selection is not allowed
+    if (!this.isSelectionAllowed()) {
+      return;
+    }
+    // Delay hiding combobox so that we can capture selected result
+    // eslint-disable-next-line @lwc/lwc/no-async-operation
+    this.blurTimeout = window.setTimeout(() => {
+      this.hasFocus = false;
+      this.blurTimeout = null;
+    }, 300);
+  }
+
+  handleRemoveSelectedItem(event) {
+    const recordId = event.currentTarget.name;
+    this.curSelection = this.curSelection.filter(item => item.id !== recordId);
+    this.isDirty = true;
+    // Notify parent components that selection has changed
+    this.dispatchEvent(new CustomEvent("selectionchange"));
+  }
+
+  handleClearSelection() {
+    this.curSelection = [];
+    this.isDirty = true;
+    // Notify parent components that selection has changed
+    this.dispatchEvent(new CustomEvent("selectionchange"));
+  }
+
+  // STYLE EXPRESSIONS
+
+  get getContainerClass() {
+    let css = "slds-combobox_container slds-has-inline-listbox ";
+    if (this.hasFocus && this.hasResults()) {
+      css += "slds-has-input-focus ";
+    }
+    if (this.errors.length > 0) {
+      css += "has-custom-error";
+    }
+    return css;
+  }
+
+  get getDropdownClass() {
+    let css =
+      "slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ";
+    if (
+      this.hasFocus &&
+      this.cleanSearchTerm &&
+      this.cleanSearchTerm.length >= MINIMAL_SEARCH_TERM_LENGTH
+    ) {
+      css += "slds-is-open";
+    }
+    return css;
+  }
+
+  get getInputClass() {
+    let css = "slds-input slds-combobox__input has-custom-height ";
+    if (
+      this.errors.length > 0 ||
+      (this.isDirty && this.required && !this.hasSelection())
+    ) {
+      css += "has-custom-error ";
+    }
+    if (!this.isMultiEntry) {
+      css +=
+        "slds-combobox__input-value " +
+        (this.hasSelection() ? "has-custom-border" : "");
+    }
+    return css;
+  }
+
+  get getComboboxClass() {
+    let css = "slds-combobox__form-element slds-input-has-icon ";
+    if (this.isMultiEntry) {
+      css += "slds-input-has-icon_right";
+    } else {
+      css += this.hasSelection()
+        ? "slds-input-has-icon_left-right"
+        : "slds-input-has-icon_right";
+    }
+    return css;
+  }
+
+  get getSearchIconClass() {
+    let css = "slds-input__icon slds-input__icon_right ";
+    if (!this.isMultiEntry) {
+      css += this.hasSelection() ? "slds-hide" : "";
+    }
+    return css;
+  }
+
+  get getClearSelectionButtonClass() {
+    return (
+      "slds-button slds-button_icon slds-input__icon slds-input__icon_right " +
+      (this.hasSelection() ? "" : "slds-hide")
+    );
+  }
+
+  get getSelectIconName() {
+    return this.hasSelection() ? this.curSelection[0].icon : "standard:default";
+  }
+
+  get getSelectIconClass() {
+    return (
+      "slds-combobox__input-entity-icon " +
+      (this.hasSelection() ? "" : "slds-hide")
+    );
+  }
+
+  get getInputValue() {
+    if (this.isMultiEntry) {
+      return this.searchTerm;
+    }
+    return this.hasSelection() ? this.curSelection[0].title : this.searchTerm;
+  }
+
+  get getInputTitle() {
+    if (this.isMultiEntry) {
+      return "";
+    }
+
+    return this.hasSelection() ? this.curSelection[0].title : "";
+  }
+
+  get getListboxClass() {
+    return (
+      "slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid " +
+      (this.scrollAfterNItems
+        ? "slds-dropdown_length-with-icon-" + this.scrollAfterNItems
+        : "")
+    );
+  }
+
+  get isInputReadonly() {
+    if (this.isMultiEntry) {
+      return false;
+    }
+    return this.hasSelection();
+  }
+
+  get isExpanded() {
+    return this.hasResults();
+  }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js-meta.xml b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js-meta.xml
new file mode 100644
index 0000000..7eaa187
--- /dev/null
+++ b/force-app/main/default/lwc/approvalLookUp/approvalLookUp.js-meta.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle
+  xmlns="http://soap.sforce.com/2006/04/metadata"
+  fqn="lookup"
+>
+    <apiVersion>48.0</apiVersion>
+    <isExposed>false</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.css b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.css
new file mode 100644
index 0000000..bd47b80
--- /dev/null
+++ b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.css
@@ -0,0 +1,7 @@
+.custom-date-input .slds-datepicker {
+    /* 璁剧疆鏃ユ湡閫夋嫨鍣ㄧ殑瀹藉害 */
+    width: 300px; /* 鏍规嵁闇�瑕佽皟鏁村搴� */
+    /* 璁剧疆鏃ユ湡閫夋嫨鍣ㄧ殑楂樺害 */
+    height: 300px; /* 鏍规嵁闇�瑕佽皟鏁撮珮搴� */
+    /* 璁剧疆鍏朵粬鏍峰紡灞炴�э紝濡傚瓧浣撳ぇ灏忋�佽竟妗嗐�佽竟妗嗗渾瑙掔瓑 */
+  }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html
index 8a72d0c..2bf6b03 100644
--- a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html
+++ b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html
@@ -74,6 +74,7 @@
     <!-- 鏀瑰彉鏃ユ湡 -->
     <div>
       <lightning-input 
+        class="custom-date-input"
         type="date" 
         label="璇烽�夋嫨瑕佹敼鍙樼殑鏃ユ湡" 
         name="aaa" 
@@ -86,6 +87,7 @@
 
     <div if:true={flg}>
       <lightning-input 
+        class="custom-date-input"
         type="date" 
         label="棰勬祴鍙戣揣鏃�" 
         name="aa" 
diff --git a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
index a35eaa0..cd815ff 100644
--- a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
+++ b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
@@ -1,11 +1,15 @@
-import { LightningElement, track  } from 'lwc';
+import { api, wire,LightningElement } from 'lwc';
 import GetOppinformationcData from '@salesforce/apex/ImprovedForecastTimeController.GetOppinformationcData';
 import getReason from '@salesforce/apex/ImprovedForecastTimeController.getReason';
 import SaveData from '@salesforce/apex/ImprovedForecastTimeController.SaveData';
 import SystemModstamp from '@salesforce/schema/Account.SystemModstamp';
-
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+import lexDateCss from '@salesforce/resourceUrl/lexDateCss';
 export default class ImprovedForecastTime extends LightningElement {
-
+    @api recordId;
     //鏄剧ず涓庨殣钘�
     isAdvance = false;  //閫夌潃 鎻愬墠 鐨勬爣璇�
     isDelay = false; //閫夌潃 寤跺悗 鐨勬爣璇�
@@ -99,8 +103,12 @@
 
     //鍒濆鍖�
     connectedCallback(){
-        this.oppId = this.getQueryVariable('id');
-
+        Promise.all([
+            loadStyle(this, lwcCSS),
+            loadStyle(this, lexDateCss)
+           ]);
+        this.oppId = this.recordId;
+        console.log('oppId--' + this.oppId);
         GetOppinformationcData({ParamIdStr:this.oppId}).then(response=>{
             this.opp=JSON.parse(response);
 
@@ -136,10 +144,10 @@
 
         if (error) {
             this.TongzhiIcon = "standard:first_non_empty";
-            this.BgColorStyle = "background-color:#f88568";
+            this.BgColorStyle = "background-color:#ba0517";
         }else{
             this.TongzhiIcon = "standard:account";
-            this.BgColorStyle = "background-color:#69e669";
+            this.BgColorStyle = "background-color:#DD7A01";
         }
         if (left) {
             this.IsLeftStyle = "left: 0.25rem"
@@ -147,7 +155,25 @@
             this.IsLeftStyle = ""
         }
     }
+    showToast(msg,type) {
+        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);
+        }
 
+    }
     //鍏抽棴鎻愮ず妗�
     CloseAlert(){
         this.closeOffRefresh();
@@ -212,24 +238,24 @@
         // if(this.opp.Date_InAdvance_Delay == '' ||this.opp.Date_InAdvance_Delay == undefined || this.opp.Predicted_date_ChangeReason == '' ||this.opp.Predicted_date_ChangeReason == undefined|| myDate5 == '' || myDate5 == undefined){
         if(!this.opp.Date_InAdvance_Delay || !this.opp.Predicted_date_ChangeReason ||  !this.opp.Close_Forecasted_Date){
         //SWAG-CJR4PC銆愬鎵樸�戣皟鏌�-淇敼棰勬祴鏃ユ彁鍓嶇悊鐢遍敊璇� fy end
-            this.Alert("璇烽�夋嫨鏃ユ湡/鐞嗙敱銆�",false,true);
+            this.showToast("璇烽�夋嫨鏃ユ湡/鐞嗙敱銆�","error");
         }
         else if(this.opp.Date_InAdvance_Delay == '鎻愬墠' && (myDate5 >= myDate4 || myDate5 < myDate3)){
-            this.Alert("璇烽�夋嫨 鈥滄彁鍓嶁�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡 涓� 涓嶆棭浜庝粖澶┿��",false,true);
+            this.showToast("璇烽�夋嫨 鈥滄彁鍓嶁�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡 涓� 涓嶆棭浜庝粖澶┿��","error");
         }
         else if(this.opp.Date_InAdvance_Delay == '寤跺悗' && myDate5 <= myDate4){
-            this.Alert("璇烽�夋嫨 鈥滃欢鍚庘�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡銆�",false,true);
+            this.showToast("璇烽�夋嫨 鈥滃欢鍚庘�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡銆�","error");
         }
         else if(myDate7 < myDate5){
-            this.Alert("棰勬祴鍙戣揣鏃ヤ笉鑳藉皬浜庨娴嬬绾︽棩銆�",false,true);
+            this.showToast("棰勬祴鍙戣揣鏃ヤ笉鑳藉皬浜庨娴嬬绾︽棩銆�","error");
         }
 
         //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� start
         else if(myDate5 > OrderDate){
-            this.Alert("璁㈣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ヤ笁璐㈠勾鍐呫��",false,true);
+            this.showToast("璁㈣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ヤ笁璐㈠勾鍐呫��","error");
         }
         else if(myDate7 > ShipmentsDate){
-            this.Alert("鍙戣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ュ洓璐㈠勾鍐呫��",false,true);
+            this.showToast("鍙戣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ュ洓璐㈠勾鍐呫��","error");
         }
         //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� end
 
@@ -238,10 +264,15 @@
             SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{
                 if (response == '鎴愬姛') {
                     this.OnLoading(false);
-                    this.Alert("淇濆瓨鎴愬姛",false,true); 
-                    window.location.hash = "Refresh"+"=="+this.oppId;
+                    this.showToast("淇濆瓨鎴愬姛","success"); 
+                    // window.location.hash = "Refresh"+"=="+this.oppId;
+                    const closeEvent = new CustomEvent('closeaction', {
+                        bubbles: true, // 鍏佽浜嬩欢鍐掓场鑷崇埗缁勪欢
+                        composed: true, // 鍏佽浜嬩欢绌胯秺 Shadow DOM 鐣岄檺
+                    });
+                    this.dispatchEvent(closeEvent);
                 }else{
-                    this.Alert(response,true);
+                    this.showToast(response,"error");
                 }
             });
         }
diff --git a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml
index eac275d..3392981 100644
--- a/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml
+++ b/force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml
@@ -1,5 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
-    <apiVersion>55.0</apiVersion>
-    <isExposed>false</isExposed>
+    <apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js b/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
index dfaa5bb..f91d0c0 100644
--- a/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
+++ b/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-08 14:36:32
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-28 10:42:47
+ * @LastEditTime: 2023-09-14 16:10:05
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -12,6 +12,8 @@
 import init  from '@salesforce/apex/ReportController.initForASACEditorButton';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexASACEditor extends NavigationMixin(LightningElement) {
     @api recordId;
     lastModifiedDate
@@ -38,6 +40,10 @@
      }
     
     connectedCallback () {
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
index 4614e00..d2c38de 100644
--- a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
+++ b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-08 14:36:32
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-28 09:11:47
+ * @LastEditTime: 2023-09-14 16:10:33
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -12,6 +12,8 @@
 import init  from '@salesforce/apex/ReportController.initForASRCEditorButton';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexASRCEditor extends NavigationMixin(LightningElement) {
     @api recordId;
     lastModifiedDate
@@ -37,6 +39,10 @@
          }
      }
     connectedCallback () {
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.css b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.css
index 689c97d..1da79d7 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.css
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.css
@@ -1,4 +1,4 @@
-.inASACEditorHolder{
+/* .inASACEditorHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html
index 425fb96..d53e1da 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html
@@ -9,7 +9,6 @@
 <template>
     <div class="inASACEditorHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={showSuccess}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
index 0ab2880..2f53e5c 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-12 14:51:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-05 15:47:38
+ * @LastEditTime: 2023-10-04 12:28:54
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -20,6 +20,10 @@
 import TradeComplianceStatusFlag from '@salesforce/label/c.TradeComplianceStatusFlag';
 import IFTradeComplianceAlert from '@salesforce/label/c.IFTradeComplianceAlert';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+import queryQuote from '@salesforce/apex/OpportunityLightingButtonController.queryQuote';
+
 export default class LexAgencyAuthorize extends LightningElement {
     @api recordId;
     agency1Id;
@@ -68,6 +72,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -118,14 +125,20 @@
         var oppid = this.recordId;
         var angency = this.agency1Id;
         var profileId = this.profileId;
-         //娴嬭瘯宸查攣瀹氭巿鏉冨悎鍚岀敵璇蜂负鈥�1鈥�
-        this.estimationId = 'test';
         this.detailNum = 1;
         if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) {
             this.showToast("鎮ㄦ病鏈夋巿鏉冪敵璇风殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��","error");
             return;
         }
-        //璐告槗鍚堣 you
+        queryQuote({
+            estimationId: this.estimationId
+        }).then(result=>{
+            console.log(result);
+            if(result == true){
+                this.showToast("鍖呭惈铏氭嫙浜у搧锛屼笉鑳芥巿鏉冿紝璇锋洿鏂版姤浠峰崟鍚庣敵璇�","error");
+                return;
+            }
+             //璐告槗鍚堣 you
         var AccDealerBlacklist = this.AccDealerBlacklist;//鍒ゆ柇瀹㈡埛/缁忛攢鍟嗘槸鍚︿负榛戝悕鍗�
         var angency1 = this.angency1;
         var angency2 = this.angency2;
@@ -206,6 +219,10 @@
             this.ss();
         }
         //璐告槗鍚堣 you
+        });
+        
+
+       
     }
     ss(){
         if (this.stageName != '寮曞悎' && this.stageName != '璇环' ) {
@@ -221,10 +238,11 @@
             this.showToast("鑰楁潗涓嶅彲涓庡ゥ杈変骇鍝佸悓鏃跺瓨鍦紒","error");
             return;
         } else if (this.cntLostCancelDraft > 0) {
-            if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
-                this.dispatchEvent(new CloseActionScreenEvent());
-                return ;
-            }     
+            // if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
+            //     this.dispatchEvent(new CloseActionScreenEvent());
+            //     return ;
+            // }   
+            this.handleConfirmClick1("璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵");  
         } else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
             this.showToast('璇环鏈夊凡鎻愪氦鐨勫彇娑�/澶卞崟鎶ュ憡銆�',"error");
             return;
@@ -240,7 +258,13 @@
         }else if (this.ifSubmit == '1') {
             this.showToast('涓婁紶澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�!',"error");
             return;
+        }else{
+            this.dd();
         }
+        
+    }
+
+    dd(){
         if (this.ifAuthorizingLock == true) {
             this.showToast('璇环姝e湪鎺堟潈涓紝璇蜂笉瑕侀噸澶嶆彁浜ゃ��',"error");
             return;
@@ -290,11 +314,25 @@
             this.dispatchEvent(new CloseActionScreenEvent());
         }
     }
+
+    async handleConfirmClick1(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+        if (result) {
+            this.dd();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
     showToast(msg,type) {
         const event = new ShowToastEvent({
             title: '',
             message: msg,
-            variant: type
+            variant: type,
+            mode: 'sticky'
         });
         this.dispatchEvent(event);
         this.dispatchEvent(new CloseActionScreenEvent());
diff --git a/force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js b/force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js
index 8252f9c..d2cd082 100644
--- a/force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js
+++ b/force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-09-09 13:31:12
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 14:43:12
+ * @LastEditTime: 2023-09-14 16:09:41
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -12,6 +12,8 @@
 import init  from '@salesforce/apex/lexSolutionProjectRequirementsController.initForApplyAgainButton';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 
 export default class LexApplyAgainLwc extends NavigationMixin(LightningElement) {
     @api recordId;
@@ -33,6 +35,9 @@
          }
      }
      connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
index ed8f724..7b43a5b 100644
--- a/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
+++ b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-15 11:14:32
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-04 13:16:23
+ * @LastEditTime: 2023-09-21 17:13:37
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,6 +13,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP from '@salesforce/label/c.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexAssignTaskButton extends NavigationMixin(LightningElement) {
     @api recordId;
     accountName;
@@ -35,6 +37,9 @@
          }
      }
      connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -75,17 +80,25 @@
             taskDifferent__c: '涓婄骇鍒嗛厤浠诲姟',
             Name: '*'
         });
+        let states = 
+                {
+                    nooverride: '1',
+                    navigationLocation: 'LIST_VIEW',
+                    // backgroundContext: '/lightning/o/Account/list?filterName=Recent&0.source=alohaHeader',
+                    backgroundContext: '/lightning/r/Opportunity/'+this.recordId+'/view',
+                    defaultFieldValues: defaultValues,
+                };
+
+            // states['recordTypeId'] =  this.recordTypeId;
+        states['useRecordTypeCheck'] =  true;
+       
         this[NavigationMixin.Navigate]({
             type: 'standard__objectPage',
             attributes: {
                 objectApiName: 'task__c',
                 actionName: 'new'
             },
-            state: {
-                nooverride: '1',
-                defaultFieldValues: defaultValues,
-                recordTypeId: this.recordTypeId
-            }
+            state: states
         });
         this.dispatchEvent(new CloseActionScreenEvent());
      }
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.css b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.css
index 049e19f..dbee226 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.css
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.css
@@ -1,4 +1,4 @@
-.lexBeforeOPDPDFBtnHolder{
+/* .lexBeforeOPDPDFBtnHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.html b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.html
index 159518b..d6ad557 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.html
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.html
@@ -4,12 +4,11 @@
  * @Author: chen jing wu
  * @Date: 2023-04-13 15:08:43
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-14 14:13:25
+ * @LastEditTime: 2023-09-23 12:22:45
 -->
 <template>
     <div class="lexBeforeOPDPDFBtnHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={showToast}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
index f594976..46d4e66 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-13 15:08:43
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-25 16:41:24
+ * @LastEditTime: 2023-09-14 16:11:28
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import selectCommonSequence from '@salesforce/apex/ControllerUtil.selectCommonSequence';
 import addReportOPWithEvaluationPDF from '@salesforce/apex/Add_Report.addReportOPWithEvaluationPDF';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexBeforeOPDPDFBtn extends LightningElement {
     @api recordId;
     accountId;
@@ -35,6 +37,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.css b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.css
index 7980084..cbc475a 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.css
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.css
@@ -1,4 +1,4 @@
-.lexBeforeOPDPDFBtnSISHolder{
+/* .lexBeforeOPDPDFBtnSISHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html
index 234e137..bfe81c0 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html
@@ -9,6 +9,6 @@
 <template>
     <div class="lexBeforeOPDPDFBtnSISHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={showSuccess}></lightning-button>
+       
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js
index 5bcc76a..bbf8ecd 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-13 15:55:45
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:50:12
+ * @LastEditTime: 2023-09-14 16:11:51
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,7 +13,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import selectCommonSequence from '@salesforce/apex/ControllerUtil.selectCommonSequence';
 import addReportOPWithEvaluationPDF from '@salesforce/apex/Add_Report.addReportOPWithEvaluationPDF';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexBeforeOPDPDFBtnSIS extends LightningElement {
     @api recordId;
     accountId;
@@ -35,6 +36,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js b/force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js
index 6cded84..3f8c175 100644
--- a/force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js
+++ b/force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-07-28 15:58:45
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-10 14:27:50
+ * @LastEditTime: 2023-09-14 16:15:00
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,7 +14,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCBLBPNewLwc extends NavigationMixin(LightningElement) {
     @api recordId;
     // @wire(CurrentPageReference)
@@ -33,6 +34,9 @@
     //     }
     // }
     connectedCallback(){
+      Promise.all([
+        loadStyle(this, lwcCSS)
+       ]);
       this.CBLBPNewLwc();
     }
     CBLBPNewLwc(){
diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.js b/force-app/main/default/lwc/lexCancel/lexCancel.js
index be3a1c5..2fe56b4 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-08-25 16:41:19
+ * @LastEditTime: 2023-09-14 16:12:23
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,6 +13,8 @@
 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;
@@ -37,6 +39,9 @@
 
     connectedCallback(){
         console.log(this.recordId);
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result => {
diff --git a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.css b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.css
index a8fa542..de56943 100644
--- a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.css
+++ b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.css
@@ -1,4 +1,4 @@
-.cancelReportHolder{
+/* .cancelReportHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.html b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.html
index c738dca..1815f52 100644
--- a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.html
+++ b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.html
@@ -1,6 +1,13 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-21 17:59:08
+-->
 <template>
     <div class="cancelReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
index 7deae00..c2e872e 100644
--- a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
+++ b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
@@ -8,6 +8,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import ConSent from '@salesforce/apex/BidAnnouncementController.ConSent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCancelReport extends NavigationMixin(LightningElement) {
     @api recordId;
     stageName;
@@ -41,6 +43,10 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js b/force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js
index b705df0..b8ac66a 100644
--- a/force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js
+++ b/force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 14:32:05
+ * @LastEditTime: 2023-09-14 16:13:34
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -15,6 +15,8 @@
 import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCancelSubmit extends LightningElement {
     @api recordId;//OwnerId
     ownerId;
@@ -40,6 +42,10 @@
     }
 
     connectedCallback () {
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js b/force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js
index 95a9028..88d4cd3 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-11 13:53:55
+ * @LastEditTime: 2023-09-14 16:14:29
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -12,6 +12,8 @@
 import cancel  from '@salesforce/apex/ReportController.updateForCancelSubmitReportButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCancelSubmitReport extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -32,6 +34,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         this.cancelSubmit();
     }
diff --git a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
index b37012f..5c08358 100644
--- a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
@@ -1,4 +1,4 @@
-.lexChangeContractTypeHolder{
+/* .lexChangeContractTypeHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
index 008287e..60c96cb 100644
--- a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
@@ -1,7 +1,15 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:23:54
+-->
 <template>
     <div class="lexChangeContractTypeHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        <!-- <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button> -->
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
index 8f2be1c..76fb4e7 100644
--- a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-15 13:17:26
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:53:23
+ * @LastEditTime: 2023-09-25 10:17:42
  */
 /*
  * @Description: 
@@ -23,6 +23,8 @@
 import changeTrade from '@salesforce/apex/OpportunityLightingButtonController.changeTrade';
 import LightningConfirm from 'lightning/confirm';
 import { NavigationMixin } from 'lightning/navigation';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexChangeContractType extends NavigationMixin(LightningElement) {
     @api recordId;
     stageName;
@@ -56,24 +58,25 @@
             try {
                 console.log("22222");
                 changeTrade({
-                    oppId: oppId
+                    oppId: this.recordId
                 }).then(result=>{
                     console.log("1111");
-                    str = result;
+                    var str = result;
                     if(str != '1'){
                         this.showToast(str,"error");
                     }
                     this.IsLoading = false;
+                    window.location = '/' + this.recordId;
                     this.dispatchEvent(new CloseActionScreenEvent());
-                    this[NavigationMixin.Navigate]({
-                        type: 'standard__recordPage',
-                        attributes: {
-                            recordId: this.recordId,
-                            objectApiName: 'Opportunity',
-                            actionName: 'view'
-                        }
-                    });
-                    // window.location.href = '/lightning/r/Opportunity/' + this.recordId + '/view';
+                    // this[NavigationMixin.Navigate]({
+                    //     type: 'standard__recordPage',
+                    //     attributes: {
+                    //         recordId: this.recordId,
+                    //         objectApiName: 'Opportunity',
+                    //         actionName: 'view'
+                    //     }
+                    // });
+                    
                 }).catch(error=>{
                     console.log("error");
                     console.log(error);
@@ -87,6 +90,10 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -101,8 +108,6 @@
         });
     }
     changeContractType(){
-        var oppId = this.recordId;
-        var str ;
         var status = this.stageName;
         var quostatus = this.estimationDecision;
         var win = this.sapSendOK;
diff --git a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.html b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.html
index 22c6a45..9a0d3a5 100644
--- a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.html
+++ b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.html
@@ -4,11 +4,11 @@
  * @Author: chen jing wu
  * @Date: 2023-04-21 14:32:09
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-21 14:32:48
+ * @LastEditTime: 2023-09-23 12:24:10
 -->
 <template>
     <div class="lexCopyWithAssetHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
index 97ba72f..33401e2 100644
--- a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
+++ b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-21 14:32:09
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-12 11:39:47
+ * @LastEditTime: 2023-09-25 10:40:25
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import initCopy from '@salesforce/apex/OpportunityLightingButtonController.initCopy';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCopyWithAsset extends NavigationMixin(LightningElement) {
     @api recordId;
     sapSendOK;
@@ -44,6 +46,10 @@
         this.dispatchEvent(event);
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -78,7 +84,8 @@
                      + ',NotesApprovedNo__c='
                      + ',Assistant_Applied_Date__c='
                      + ',Contract_DB_SalesDept_complite_day__c='
-                     + ',Closing_Bid_Date__c=';
+                     + ',Closing_Bid_Date__c='
+                     + 'Opportunity_No__c=';
                     console.log(result);
                     this[NavigationMixin.Navigate]({
                         type: 'standard__objectPage',
diff --git a/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
index 583edb8..b88c76b 100644
--- a/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
+++ b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
@@ -1,6 +1,6 @@
 <template>
     <div class="lexCreateActivityHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
index 626bb7c..e63e751 100644
--- a/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
+++ b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
@@ -4,13 +4,15 @@
  * @Author: chen jing wu
  * @Date: 2023-05-15 09:50:42
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-15 10:34:33
+ * @LastEditTime: 2023-09-14 16:29:45
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import init from '@salesforce/apex/OpportunityLightingButtonController.initForCreateActivityButton';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexCreateActivity extends LightningElement {
     @api recordId;
     accountId;
diff --git a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.html b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.html
index 617f069..b833445 100644
--- a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.html
+++ b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.html
@@ -1,6 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:24:41
+-->
 <template>
     <div class="lexCreateEventReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <!-- <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> -->
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
index 2cb2568..4bd9c74 100644
--- a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:53:31
+ * @LastEditTime: 2023-09-14 16:31:46
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -12,6 +12,11 @@
 import updateForDispatchOCSMQARAButton  from '@salesforce/apex/ReportController.updateForDispatchOCSMQARAButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+Promise.all([
+    loadStyle(this, lwcCSS)
+   ]);
 export default class LexDispatchOCSMQARA extends LightningElement {
     @api recordId;
     IsLoading = true;
diff --git a/force-app/main/default/lwc/lexEditCancelReport/lexEditCancelReport.js b/force-app/main/default/lwc/lexEditCancelReport/lexEditCancelReport.js
index eb3468b..b795741 100644
--- a/force-app/main/default/lwc/lexEditCancelReport/lexEditCancelReport.js
+++ b/force-app/main/default/lwc/lexEditCancelReport/lexEditCancelReport.js
@@ -1,3 +1,11 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-11 10:34:37
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-26 09:29:28
+ */
 import { LightningElement, track, wire, api } from 'lwc';
 import {CurrentPageReference} from 'lightning/navigation';
 import { CloseActionScreenEvent } from 'lightning/actions';
@@ -42,6 +50,9 @@
             attributes: {
                 recordId: this.recordId,
                 actionName: 'edit'
+            },
+            state: {
+                nooverride: '1'
             }
         });
     }
diff --git a/force-app/main/default/lwc/lexEditLost/lexEditLost.js b/force-app/main/default/lwc/lexEditLost/lexEditLost.js
index 7b02b96..34cf2b2 100644
--- a/force-app/main/default/lwc/lexEditLost/lexEditLost.js
+++ b/force-app/main/default/lwc/lexEditLost/lexEditLost.js
@@ -1,3 +1,11 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-12 17:37:34
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-10-02 15:35:06
+ */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
@@ -6,10 +14,13 @@
 import init  from '@salesforce/apex/OpportunityLightingButtonController.queryForEditLostButton';
 import queryForProfileId  from '@salesforce/apex/OpportunityLightingButtonController.queryForProfileId';
 import PCLReportProfileId from '@salesforce/label/c.PCLReportProfileId';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexEditLost extends LightningElement {
     @api recordId;
     lostlist;
     AprofileId;
+    profileId;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -25,45 +36,66 @@
           }
         }
     }
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: ' ',
+            message: msg,
+            variant: type,
+            mode: 'sticky'
+        });
+        this.dispatchEvent(event);
+    }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
             this.lostlist = result;
-            queryForProfileId().then()
-            this.AprofileId = PCLReportProfileId.includes(this.profileId);
-            this.editLost();
+            queryForProfileId().then(res=>{
+                this.profileId = res;
+                this.AprofileId = PCLReportProfileId.includes(this.profileId);
+                console.log(PCLReportProfileId);
+                console.log(this.profileId);
+                this.editLost();
+            });
+            
         });
     }
     editLost(){
-        if (this.lostlist.size < 0){
-            alert('璇峰厛鍒涘缓澶卞崟鎶ュ憡');
-            return;
-         }else if(this.lostlist.size > 1){
+        console.log(this.lostlist.length);
+        if (this.lostlist.length <= 0){
+            // alert('璇峰厛鍒涘缓澶卞崟鎶ュ憡');
+            this.showToast('璇峰厛鍒涘缓澶卞崟鎶ュ憡','error');
+            this.dispatchEvent(new CloseActionScreenEvent());
+         }else if(this.lostlist.length > 1){
             //alert('1');
-            for(var lost of lostlist ){
+            for(var lost of this.lostlist ){
                 //alert('3');
                 //alert(lost.RecordTypeId);
                 if(lost.RecordTypeId == '01210000000R4hMAAS'){
                     //alert('4');
-                    if(lost.Report_Status__c == '鑽夋' || profileId == '00e10000000Y3o5' || (lost.Report_Status__c == '鎵瑰噯' && AprofileId)){
+                    if(lost.Report_Status__c == '鑽夋' || this.profileId == '00e10000000Y3o5' || (lost.Report_Status__c == '鎵瑰噯' && AprofileId)){
                         //alert('5');
-                        window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&Id="+lost.Id);
+                        window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId="+lost.Id);
                     }else{
-                        window.open("/apex/PCLLostReportPageLwc?pageStatus=View&Id="+lost.Id);
+                        window.open("/apex/PCLLostReportPageLwc?pageStatus=View&reportId="+lost.Id);
                     }
                 }
             }
+            this.dispatchEvent(new CloseActionScreenEvent());
             }
             else{
                 //alert('2');
                 //var status = lostlist[0].Report_Status__c;
-                if(lostlist[0].Report_Status__c == '鑽夋' || profileId == '00e10000000Y3o5' || (lostlist[0].Report_Status__c == '鎵瑰噯' && AprofileId)){
-                    window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&Id="+lostlist[0].Id);
+                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);
                 }else{
-                    window.open("/apex/PCLLostReportPageLwc?pageStatus=View&Id="+lostlist[0].Id);
+                    window.open("/apex/PCLLostReportPageLwc?pageStatus=View&reportId="+this.lostlist[0].Id);
                 }
+                this.dispatchEvent(new CloseActionScreenEvent());
             }
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexEnquiryNoBidding/lexEnquiryNoBidding.html b/force-app/main/default/lwc/lexEnquiryNoBidding/lexEnquiryNoBidding.html
index 617f069..213b2c4 100644
--- a/force-app/main/default/lwc/lexEnquiryNoBidding/lexEnquiryNoBidding.html
+++ b/force-app/main/default/lwc/lexEnquiryNoBidding/lexEnquiryNoBidding.html
@@ -1,6 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:24:56
+-->
 <template>
     <div class="lexCreateEventReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexImprovedForecastTimeNew/__tests__/lexImprovedForecastTimeNew.test.js b/force-app/main/default/lwc/lexImprovedForecastTimeNew/__tests__/lexImprovedForecastTimeNew.test.js
new file mode 100644
index 0000000..25ef866
--- /dev/null
+++ b/force-app/main/default/lwc/lexImprovedForecastTimeNew/__tests__/lexImprovedForecastTimeNew.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexImprovedForecastTimeNew from 'c/lexImprovedForecastTimeNew';
+
+describe('c-lex-improved-forecast-time-new', () => {
+    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-improved-forecast-time-new', {
+            is: LexImprovedForecastTimeNew
+        });
+
+        // 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/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.html b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.html
new file mode 100644
index 0000000..e9f6459
--- /dev/null
+++ b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.html
@@ -0,0 +1,135 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading} >
+        <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+      </div>
+      <div style="padding:30px">
+        <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">
+                        <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>
+                      </div>
+                      <div class="slds-notify__close">
+                        <lightning-button-icon icon-name="utility:close"  variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                      </div>
+                    </div>
+                  </div>
+                <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                    <div class="slds-notify_container slds-is-relative">
+                        <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(46, 132, 74);" role="success">
+                        <div class="slds-align_absolute-center">
+                            
+                            
+                        </div>
+                        </div>
+                    </div>
+                </div> -->
+            </template>
+            <template if:false={isSuccess}>
+                <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                    <div class="slds-notify_container slds-is-relative">
+                        <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(234, 0, 30);" role="success">
+                        <div class="slds-align_right">
+                           
+                           
+                            
+                        </div>
+                        </div>
+                    </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">
+                        <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>
+                      </div>
+                      <div class="slds-notify__close"> 
+                        <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                      </div>
+                    </div>
+                  </div>
+            </template>
+        </template>
+    
+        <p><lightning-formatted-text value="褰撳墠棰勬祴OCSM绛剧害鏃� : " ></lightning-formatted-text>{opp.Close_Forecasted_Check}</p>  
+    
+        <div class={xgxLy} style="width: 495px;padding:1px">
+            <lightning-combobox
+              name="progress"
+              label="鏃ユ湡鎻愬墠/鏃ユ湡寤跺悗"
+              value={opp.Date_InAdvance_Delay}
+              options={RelateOption}
+              onchange={handleRelationFn} >
+            </lightning-combobox>
+        </div>
+    
+        <!-- 鎻愬墠 -->
+        <div class={bxgLy} if:true={isAdvance}>
+            <lightning-combobox
+              name="progress"
+              label="棰勬祴鏃ユ湡鎻愬墠鐞嗙敱"
+              value={opp.Predicted_date_ChangeReason}
+              placeholder="璇烽�夋嫨鎻愬墠鐞嗙敱"
+              options={AdvanceReasons}
+              style="width: 495px;padding:1px"
+              onchange={handleRelationFn1}
+              >
+            </lightning-combobox>
+            <div style="font-size:10px;color:red" if:true={bxgLyFlag}>璇烽�夋嫨鎻愬墠鐞嗙敱</div>
+        </div>
+    
+        <!-- 寤跺悗 -->
+        <!-- onchange={handleIrrelevantFn} -->
+        <div class={bxgLy} if:true={isDelay}>
+            <lightning-combobox
+              name="progress"
+              label="棰勬祴鏃ユ湡寤跺悗鐞嗙敱"
+              value={opp.Predicted_date_ChangeReason}
+              placeholder="璇烽�夋嫨寤跺悗鐞嗙敱"
+              options={DelayReasons}
+              style="width: 495px;padding:1px"
+              onchange={handleRelationFn1}
+            >
+            </lightning-combobox>
+            <div style="font-size:10px;color:red" if:true={bxgLyFlag}>璇烽�夋嫨寤跺悗鐞嗙敱</div>
+        </div>
+    
+        <!-- 鏀瑰彉鏃ユ湡 -->
+        <div>
+          <lightning-input 
+            class="custom-date-input"
+            type="date" 
+            label="璇烽�夋嫨瑕佹敼鍙樼殑鏃ユ湡" 
+            name="aaa" 
+            style="width: 495px;padding:1px"
+            value={opp.Close_Forecasted_Date}
+            onchange={handleRelationFn2}
+          >
+        </lightning-input>
+        </div>
+    
+        <div if:true={flg}>
+          <lightning-input 
+            class="custom-date-input1"
+            type="date" 
+            label="棰勬祴鍙戣揣鏃�" 
+            name="aa" 
+            style="width: 495px;padding:1px"
+            value={opp.CloseDate}
+            onchange={handleRelationFn3}
+          >
+        </lightning-input>
+        </div>
+    
+        <button 
+          class="slds-button slds-button_brand" 
+          onclick={saveFn} 
+          style="margin-top: 10px" 
+        >
+        淇濆瓨
+        </button>
+    
+      </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js
new file mode 100644
index 0000000..fe41329
--- /dev/null
+++ b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js
@@ -0,0 +1,290 @@
+import { api, wire,LightningElement } from 'lwc';
+import GetOppinformationcData from '@salesforce/apex/ImprovedForecastTimeController.GetOppinformationcData';
+import getReason from '@salesforce/apex/ImprovedForecastTimeController.getReason';
+import SaveData from '@salesforce/apex/ImprovedForecastTimeController.SaveData';
+import SystemModstamp from '@salesforce/schema/Account.SystemModstamp';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+import lexDateCss1 from '@salesforce/resourceUrl/lexDateCss1';
+export default class LexImprovedForecastTimeNew extends LightningElement {
+    @api recordId;
+    //鏄剧ず涓庨殣钘�
+    isAdvance = false;  //閫夌潃 鎻愬墠 鐨勬爣璇�
+    isDelay = false; //閫夌潃 寤跺悗 鐨勬爣璇�
+    isSuccess = false;
+    message;
+    visible;
+    RelateOption=[
+        {label:"鎻愬墠",value:"鎻愬墠"},
+        {label:"寤跺悗",value:"寤跺悗"},
+    ]
+    closeAction(){
+        this.visible = false;
+    }
+        
+    handleRelationFn(event){
+
+        var value = event.target.value;
+        this.opp.Date_InAdvance_Delay = value;
+debugger
+        // this.opp.Predicted_date_ChangeReason__c = '';
+        //SWAG-CJR4PC銆愬鎵樸�戣皟鏌�-淇敼棰勬祴鏃ユ彁鍓嶇悊鐢遍敊璇� fy start
+        this.opp.Predicted_date_ChangeReason = ''
+        this.opp.Close_Forecasted_Date= '';
+        this.opp.CloseDate= '';
+        //SWAG-CJR4PC銆愬鎵樸�戣皟鏌�-淇敼棰勬祴鏃ユ彁鍓嶇悊鐢遍敊璇� fy end
+        if (value == "鎻愬墠") {
+            this.isAdvance = true;
+            this.isDelay = false;
+            
+        }
+        if (value == "寤跺悗") {
+            this.isAdvance = false;
+            this.isDelay = true;
+        }
+
+    }
+
+    handleRelationFn1(event){
+        var value = event.target.value;
+        this.opp.Predicted_date_ChangeReason = value;
+    }
+    flg=true;
+    handleRelationFn2(event){
+        var value = event.target.value;
+        this.opp.Close_Forecasted_Date = value;
+        this.flg=false;
+        debugger
+        this.CloseDateAssignment(value);
+    }
+    //缁欓娴嬪彂璐ф棩璧嬪��
+    CloseDateAssignment(value){
+        debugger
+        var value=this.addDay(30,value);
+        this.opp.CloseDate = value;
+        this.flg=true;
+    }
+    //鍔犲ぉ鏁�
+    addDay(dayNumber, value1) {
+        var date = new Date(value1);
+        var ms = dayNumber * (1000 * 60 * 60 * 24)
+ 
+        var newDate = new Date(date.getTime() + ms);
+        var value=newDate.toLocaleDateString();
+        var value2=value.split('/');
+        if(value2[1].length == 1){
+            value2[1]='0'+value2[1];
+        }
+        if(value2[2].length == 1){
+            value2[2]='0'+value2[2];
+        }
+        value=value2[0]+'-'+value2[1]+'-'+value2[2];
+        return value;
+    } 
+    handleRelationFn3(event){
+        var value = event.target.value;
+        this.opp.CloseDate = value;
+    }
+    //浠巙rl涓婂彇寰桰D
+    getQueryVariable(variable)
+    {
+        var query = window.location.search.substring(1);
+        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(false);
+    }
+
+    oppId = '';
+    opp = {};
+    Date_InAdvance_Delay = '';
+    
+    AdvanceReasons = [];
+    DelayReasons = [];
+
+    //鍒濆鍖�
+    connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS),
+            loadStyle(this, lexDateCss1)
+           ]);
+        this.oppId = this.recordId;
+        console.log('oppId--' + this.oppId);
+        GetOppinformationcData({ParamIdStr:this.oppId}).then(response=>{
+            this.opp=JSON.parse(response);
+
+            if(this.opp.Date_InAdvance_Delay == '鎻愬墠'){
+                this.isAdvance = true;
+                this.isDelay = false;
+            }
+            if(this.opp.Date_InAdvance_Delay == '寤跺悗'){
+                this.isAdvance = false;
+                this.isDelay = true;
+            }
+        });
+        
+        getReason().then(response=>{
+            var options = JSON.parse(response);
+            this.AdvanceReasons = options['鎻愬墠'];
+            this.DelayReasons = options['寤跺悗'];
+        });
+
+    }
+
+    //鎻愮ず
+    SaveShowText="淇濆瓨鎴愬姛";//鎻愮ず妗嗙殑鏂囨湰
+    Tongzhishow=false;  //鎻愮ず鏄剧ず鐨勬爣璇�
+    TongzhiIcon = 'standard:account' //鎻愮ず妗嗙殑鍥炬爣
+    IsLeftStyle = "" //鎻愮ず妗嗙殑鏍峰紡
+    BgColorStyle = ""
+
+    //寮规鎻愮ず content 鍐呭 error 鏄惁鏄敊璇彁绀烘  left 鏄惁灞呭乏
+    Alert(content,error = false,left = false){
+        this.SaveShowText = content;
+        this.Tongzhishow = true;
+
+        if (error) {
+            this.TongzhiIcon = "standard:first_non_empty";
+            this.BgColorStyle = "background-color:#ba0517";
+        }else{
+            this.TongzhiIcon = "standard:account";
+            this.BgColorStyle = "background-color:#DD7A01";
+        }
+        if (left) {
+            this.IsLeftStyle = "left: 0.25rem"
+        }else{
+            this.IsLeftStyle = ""
+        }
+    }
+    showToast(msg,type) {
+        try {
+            if(type == 'success'){
+                this.isSuccess = true;
+            }else{
+                this.isSuccess = false;
+            }
+            this.message = msg;
+            this.visible = true;
+            let delay = 5000;
+            console.log(this.message);
+            console.log('1');
+            // setTimeout(() => {
+            //     this.visible = false;
+            // }, delay ); 
+        } catch (error) {
+            console.log(error);
+        }
+
+        
+    }
+    //鍏抽棴鎻愮ず妗�
+    CloseAlert(){
+        this.closeOffRefresh();
+    }
+    closeOffRefresh(){
+        if (this.Tongzhishow == true) {
+            this.Tongzhishow = false;
+        }
+        if (this.SaveShowText != "") {
+            this.SaveShowText = "";
+        }
+    }
+    //鍔犺浇
+    IsLoading = false;
+    OnLoading(flag) {
+        this.IsLoading = flag;
+    }
+    //淇濆瓨鏁版嵁閫昏緫
+    saveFn(){
+        debugger
+        var myDate = new Date();                                        //浠婂ぉ鏃ユ湡
+        var myDate1 = new Date(this.opp.Close_Forecasted_Check);        //褰撳墠棰勬祴鏃ユ湡
+        var myDate2 = new Date(this.opp.Close_Forecasted_Date);  //鏀瑰彉鐨勯娴嬫棩鏈�
+        var myDate3 = new Date(myDate.toLocaleDateString());            //浠婂ぉ鏃ユ湡          鏍煎紡鍖�
+        var myDate4 = new Date(myDate1.toLocaleDateString());           //褰撳墠棰勬祴鏃ユ湡      鏍煎紡鍖�
+        var myDate5 = new Date(myDate2.toLocaleDateString());           //鏀瑰彉鐨勯娴嬫棩鏈�    鏍煎紡鍖�
+
+        var myDate6 = new Date(this.opp.CloseDate);
+        var myDate7 = new Date(myDate6.toLocaleDateString());    //鍙戣揣鏃ユ湡
+
+        //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� start 
+        var date1 = new Date();
+        var year = date1.getFullYear();
+        var month = date1.getMonth() + 1;
+        if(month > 3){
+            year = year + 1;
+        }
+
+        var strDate = "-03-31";
+        var Odate = year + 3;
+        var Sdate = year + 4;
+        var Odate1 = Odate + strDate;
+        var Sdate1 = Sdate + strDate;
+        var Odate2 = new Date(Odate1);
+        var Sdate2 = new Date(Sdate1);
+
+        // //璁㈣揣棰勬祴鏃�
+        var OrderDate = new Date(Odate2.toLocaleDateString());
+        // //鍙戣揣棰勬祴鏃�
+        var ShipmentsDate = new Date(Sdate2.toLocaleDateString());
+
+        //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� end
+        
+        console.warn('myDatevalue:='+myDate);
+        console.warn('浠婂ぉ鏃ユ湡'+myDate3);
+        console.warn('褰撳墠棰勬祴鏃ユ湡'+myDate4);
+        console.warn('1111111111'+myDate2);
+        console.warn('鏀瑰彉鐨勯娴嬫棩鏈�'+myDate5);
+        
+        //SWAG-CJR4PC銆愬鎵樸�戣皟鏌�-淇敼棰勬祴鏃ユ彁鍓嶇悊鐢遍敊璇� fy start
+        // if(this.opp.Date_InAdvance_Delay == undefined || this.opp.Predicted_date_ChangeReason == undefined || myDate5 == undefined){
+        // if(this.opp.Date_InAdvance_Delay == '' ||this.opp.Date_InAdvance_Delay == undefined || this.opp.Predicted_date_ChangeReason == '' ||this.opp.Predicted_date_ChangeReason == undefined|| myDate5 == '' || myDate5 == undefined){
+        if(!this.opp.Date_InAdvance_Delay || !this.opp.Predicted_date_ChangeReason ||  !this.opp.Close_Forecasted_Date){
+        //SWAG-CJR4PC銆愬鎵樸�戣皟鏌�-淇敼棰勬祴鏃ユ彁鍓嶇悊鐢遍敊璇� fy end
+            this.showToast("璇烽�夋嫨鏃ユ湡/鐞嗙敱銆�","error");
+        }
+        else if(this.opp.Date_InAdvance_Delay == '鎻愬墠' && (myDate5 >= myDate4 || myDate5 < myDate3)){
+            this.showToast("璇烽�夋嫨 鈥滄彁鍓嶁�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡 涓� 涓嶆棭浜庝粖澶┿��","error");
+        }
+        else if(this.opp.Date_InAdvance_Delay == '寤跺悗' && myDate5 <= myDate4){
+            this.showToast("璇烽�夋嫨 鈥滃欢鍚庘�� 浜庡綋鍓嶉娴婳CSM绛剧害鏃ョ殑鏃ユ湡銆�","error");
+        }
+        else if(myDate7 < myDate5){
+            this.showToast("棰勬祴鍙戣揣鏃ヤ笉鑳藉皬浜庨娴嬬绾︽棩銆�","error");
+        }
+
+        //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� start
+        else if(myDate5 > OrderDate){
+            this.showToast("璁㈣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ヤ笁璐㈠勾鍐呫��","error");
+        }
+        else if(myDate7 > ShipmentsDate){
+            this.showToast("鍙戣揣棰勬祴鏃ヨ鍦ㄦ湭鏉ュ洓璐㈠勾鍐呫��","error");
+        }
+        //20221226 lt DB202212359066澧炲姞闄愬埗-淇敼棰勬祴鏃ユ渶澶ф棩鏈� end
+
+        else{
+            this.OnLoading(true);
+            SaveData({JsonData:JSON.stringify(this.opp)}).then((response)=>{
+                if (response == '鎴愬姛') {
+                    this.OnLoading(false);
+                    this.showToast("淇濆瓨鎴愬姛","success"); 
+                    // window.location.hash = "Refresh"+"=="+this.oppId;
+                    const closeEvent = new CustomEvent('closeaction', {
+                        bubbles: true, // 鍏佽浜嬩欢鍐掓场鑷崇埗缁勪欢
+                        composed: true, // 鍏佽浜嬩欢绌胯秺 Shadow DOM 鐣岄檺
+                    });
+                    setTimeout(() => {
+                        window.close();
+                    }, 2000);
+                    this.dispatchEvent(closeEvent);
+                }else{
+                    this.showToast(response,"error");
+                }
+            });
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js-meta.xml b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexImprovedForecastTimeNew/lexImprovedForecastTimeNew.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
index 22c4e22..f2d27b9 100644
--- a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
+++ b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
@@ -4,10 +4,10 @@
  * @Author: chen jing wu
  * @Date: 2023-05-25 13:59:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-02 14:28:20
+ * @LastEditTime: 2023-09-27 15:30:16
 -->
 <template>
-    <div>
+    <div data-id="myInput">
         <div class="slds-form-element">
            <div class="slds-form-element__control">
               <div class="slds-combobox_container">
@@ -15,14 +15,18 @@
                     <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
                        <template if:false={recordselected}>
                           <input class="slds-input slds-combobox__input" id="combobox-id-1" aria-autocomplete="list" aria-controls="listbox-id-1"
-                             role="textbox" type="text" placeholder="Search..." style="width: 190px;"  onkeyup={onKeyChange} value={selectedValue}/ disabled={disabled} onclick={onKeyChange}>
+                             role="textbox" type="text" placeholder="Search..."   onkeyup={onKeyChange} value={selectedValue}/ disabled={disabled} onclick={onKeyChange} onblur={clear}>
                        </template>
                        <template if:true={recordselected}>
                           <span class="slds-pill slds-pill_link fullWidth slds-input slds-combobox__input"> 
+                           
                              <a href="javascript:void(0);"
                                 class="slds-pill__action slds-p-left_x-small" title={selectedValue} style="height: 32px;">
-                                <lightning-icon icon-name={iconname} size="x-small"></lightning-icon>
-                                <span class="slds-pill__label slds-p-left_x-small" style="display: inline-flex;width: 150px">{selectedValue}</span>
+                                <div style="width: 80%;">
+                                 <lightning-icon icon-name={iconname} size="x-small"></lightning-icon>
+                                <span class="slds-pill__label slds-p-left_x-small" style="display: inline-flex;max-width:185px">{selectedValue}</span>
+                                </div>
+                                
                              </a>
                              <button onclick={clearSelection}
                              class="slds-button slds-button_icon slds-button_icon slds-pill__remove" 
@@ -36,12 +40,12 @@
                     </div>
                     <template if:true={recordsList}>
                        <div class="slds-combobox_container">
-                          <div id="listbox-id-1" class="slds-dropdown slds-dropdown_fluid slds-dropdown_autocomplete" role="listbox" style="min-width: 350px; overflow: auto;">
+                          <div id="listbox-id-1" class="slds-dropdown slds-dropdown_fluid slds-dropdown_autocomplete" role="listbox" style=" overflow: auto;">
                              <ul class="slds-listbox slds-listbox_vertical" role="presentation">
                                 <template for:each={recordsList} for:item="item">
                                    <li key={item.Id} role="presentation" class="slds-listbox__item">
                                       <div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option"
-                                         data-itemid = {item.Id} data-itemname={item.Name} onclick={setSelectedValue}>
+                                         data-itemid = {item.Id} data-itemname={item.Name} onmousedown={setSelectedValue}>
                                          <span role="menuitem" tabindex="-1" data-itemid = {item.Id} data-itemname={item.Name}>
                                             <lightning-icon icon-name={iconname} size="x-small" data-itemid = {item.Id} data-itemname={item.Name}></lightning-icon> {item.Name}
                                          </span>
diff --git a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
index e459cd4..6c82379 100644
--- a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
+++ b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-25 13:59:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-16 13:59:32
+ * @LastEditTime: 2023-09-27 15:30:05
  */
 import { LightningElement, track, api } from 'lwc';
 import getRecordsByName from '@salesforce/apex/lexLookupController.getRecordsByName'
@@ -43,11 +43,14 @@
         
     }
     connectedCallback(){
+        
         if(this.initValue != '' && this.initValue != undefined && this.initValue != null){
             this.recordselected = true;
             this.selectedValue = this.initValue;
         }
     }
+   
+    
     @api
     letDisabledTrue(){
         this.recordselected = false;
@@ -65,6 +68,7 @@
     //Method to clear search list and show selected value.
     @api
     clearSelection() {
+        console.log('qwer');
         this.recordselected = false;
         this.selectedValue = "";
         this.recordsList = undefined;
@@ -90,4 +94,7 @@
         });
         this.dispatchEvent(selectedEvent);
     }
+    clear(){
+        this.recordsList = undefined;
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.css b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.css
index fe3c9f1..a5a7795 100644
--- a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.css
+++ b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.css
@@ -4,9 +4,9 @@
  * @Author: chen jing wu
  * @Date: 2023-04-13 10:31:18
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-13 10:46:09
+ * @LastEditTime: 2023-09-20 17:10:12
  */
-.lexLoseBidHolder{
+/* .lexLoseBidHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -15,4 +15,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.html b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.html
index a19a34b..f2279cd 100644
--- a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.html
+++ b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.html
@@ -1,7 +1,5 @@
 <template>
     <div class="lexLoseBidHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
index 7818a8f..5025ed8 100644
--- a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
+++ b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-08 14:36:33
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 16:46:08
+ * @LastEditTime: 2023-09-20 17:11:07
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -15,10 +15,12 @@
 import updateForLoseBidButton  from '@salesforce/apex/OpportunityLightingButtonController.updateForLoseBidButton';
 import queryForLexLoseBidButton  from '@salesforce/apex/OpportunityLightingButtonController.queryForLoseBidButton';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexLoseBid extends LightningElement {
     @api recordId;
     ifOpenBid;
-    IsLoading = true;
+    IsLoading;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -40,6 +42,7 @@
             variant: 'headerless',
             label: 'this is the aria-label value',
         });
+        this.IsLoading = true;
         console.log(result);
         if(result){
             try {
@@ -63,6 +66,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.css b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.css
index 93da52a..c3575e3 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.css
+++ b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.css
@@ -1,10 +1,10 @@
-.lexLoseReportHolder{
+/* .lexLoseReportHolder{
     position: relative;
     display: inline-block;
-    width: 80px;
-    height: 80px;
+    width: 40px;
+    height: 40px;
     text-align: center;
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.html b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.html
index d7e25f9..da619a0 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.html
+++ b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.html
@@ -1,6 +1,13 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-22 14:21:54
+-->
 <template>
     <div class="lexLoseReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
     </div>
 </template>
\ 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 432e6d8..270d206 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-08-25 16:44:13
+ * @LastEditTime: 2023-09-25 13:21:17
  */
 /*
  * @Description: 
@@ -20,6 +20,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import init  from '@salesforce/apex/OpportunityLightingButtonController.initForLostReportButton';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexLoseReport extends LightningElement {
     @api recordId;
     stageName;
@@ -32,6 +34,7 @@
     salesManagerDepartmentID;
     salesOwnerBuchang;
     salesOwnerBuchangID;
+    cntLostCancelDraft;
     IsLoading = true;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -49,6 +52,10 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -62,6 +69,7 @@
             this.salesManagerDepartmentID = result.salesManagerDepartmentID;
             this.salesOwnerBuchang = result.salesOwnerBuchang;
             this.salesOwnerBuchangID = result.salesOwnerBuchangID;
+            this.cntLostCancelDraft = result.cntLostCancelDraft;
             this.loseReport();
         })
     }
@@ -75,8 +83,9 @@
         else if (this.sapSendOK == '1') {
             this.showToast("宸茬粡涓婁紶SAP銆佷笉鑳藉仛 澶卞崟 浜嗭紒","error");
         }
-        else if (this.cntLostCancelReport > 0) {
-            this.showToast("璇环宸茬粡鏈� 鍙栨秷锛忓け鍗曟姤鍛� 浜嗭紒","error");
+        else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
+            // this.showToast("璇环宸茬粡鏈� 鍙栨秷锛忓け鍗曟姤鍛� 浜嗭紒","error");
+            this.showToast('璇环宸茬粡鏈� 鍙栨秷锛忓け鍗曟姤鍛� 浜嗭紒','error');
         }
         //else if({!Not(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))} && //'{!Opportunity.InfoTypeBid__c}' != '3锛氱粨鏋�' ){
         //alert("鍏宠仈鎷涙姇鏍囬」鐩殑璇环锛屽彧鑳藉湪鏈夌粨鏋滃悗鍋氬け鍗曟姤鍛婏紒");
@@ -103,10 +112,37 @@
             title: ' ',
             message: msg,
             variant: type,
-            mode: 'sticky'
+            duration: 15000
         });
         this.dispatchEvent(event);
     }
+    //鏄剧ず淇℃伅
+    showMyToast(title, message, variant) {
+        console.log('show custom message');
+        let iconName = '';
+        let content = '';
+        if (variant == 'success') {
+            iconName = 'utility:check';
+        } else {
+            iconName = 'utility:error';
+        }
+        if (message != '') {
+            content =
+                '<h2><strong>' +
+                title +
+                '<strong/></h2><h5>' +
+                message +
+                '</h5>';
+        } else {
+            content = '<h2><strong>' + title + '<strong/></h2>';
+        }
+        this.template
+            .querySelector('c-common-toast')
+            .showToast(variant, content, iconName, 10000).then(result=>{
+                this.dispatchEvent(new CloseActionScreenEvent());
+            });
+        this.isLoading = false;
+    }
     updateRecordView(recordId) {
         updateRecord({fields: { Id: recordId }});
     }
diff --git a/force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js b/force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js
index a5bfcfb..866b87b 100644
--- a/force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js
+++ b/force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js
@@ -1,3 +1,11 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:31:12
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-14 16:33:54
+ */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
@@ -5,7 +13,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexNewAgencyHospital extends NavigationMixin(LightningElement) {
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -36,6 +45,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         var doubleFlg = false;
         if(!doubleFlg) {
         doubleFlg = true;
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.css b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.css
index 8ce8187..c99cd28 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.css
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.css
@@ -1,4 +1,4 @@
-.lexNewOpportunityAgencyHolder{
+/* .lexNewOpportunityAgencyHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.html b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.html
index b62fe53..02f1adf 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.html
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.html
@@ -1,6 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:27:19
+-->
 <template>
     <div class="lexNewOpportunityAgencyHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
index 115a49c..a0eccad 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -9,6 +9,9 @@
 import queryForRecords2 from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords2';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+
 export default class LexNewOpportunityAgency extends NavigationMixin(LightningElement) {
     @api recordId;
     agency1Id;
@@ -41,6 +44,10 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -206,8 +213,21 @@
                                             // + encodeURIComponent(this.opportunityCategory);
                                             // console.log(url);
                                             // window.open(url);
+                                            if(this.closeForecastedDate){
+                                                if(!this.closeForecastedDate.includes(' ')){
+                                                    this.closeForecastedDate += ' 00:00:00'
+                                                }
+                                                this.closeForecastedDate = this.closeForecastedDate.replace(' ','T').replaceAll('/','-') + '.000Z';
+                                                console.log(this.closeForecastedDate);
+                                            }
+                                            if(this.bidPlannedDate){
+                                                if(!this.bidPlannedDate.includes(' ')){
+                                                    this.bidPlannedDate += ' 00:00:00'
+                                                }
+                                                this.bidPlannedDate = this.bidPlannedDate.replace(' ','T').replaceAll('/','-') + '.000Z';
+                                            }
                                             const defaultValues = encodeDefaultFieldValues({
-                                                Name: '(OLYMPUS)',
+                                                Name: '(OLYMPUS)' + this.name,
                                                 Close_Forecasted_Date__c: this.closeForecastedDate,
                                                 Bid_Planned_Date__c: this.bidPlannedDate,
                                                 OCM_Change_To_Opportunity_Flg__c: '1',
diff --git a/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js
index 133f5b9..d14fefd 100644
--- a/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js
+++ b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-29 16:43:08
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:35:43
+ * @LastEditTime: 2023-09-14 16:35:40
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import init from '@salesforce/apex/OpportunityLightingButtonController.initForNewOpportunityFileButton';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexNewOpportunityFile extends NavigationMixin(LightningElement) {
     @api recordId;
     stockApplyStatus;
@@ -42,6 +44,9 @@
         this.dispatchEvent(event);
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js b/force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js
index 5ccdf85..5a0f048 100644
--- a/force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js
+++ b/force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-08-29 14:42:25
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:32:14
+ * @LastEditTime: 2023-09-14 16:36:05
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -15,7 +15,8 @@
 import LightningConfirm from 'lightning/confirm';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexNewSolutionClosingAttachment extends NavigationMixin(LightningElement) {
     @api recordId;
     schemeType;
@@ -44,6 +45,9 @@
         this.dispatchEvent(event);
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js b/force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js
index 7759e85..dc0f5b0 100644
--- a/force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js
+++ b/force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-26 11:10:52
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:23:16
+ * @LastEditTime: 2023-09-14 16:36:31
  */
 
 import { api, wire,LightningElement } from 'lwc';
@@ -16,7 +16,8 @@
 import LightningConfirm from 'lightning/confirm';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexNewSolutionProgramma extends NavigationMixin(LightningElement) {
   @api recordId;
   status;
@@ -49,6 +50,10 @@
     this.dispatchEvent(event);
 }
   connectedCallback(){
+    Promise.all([
+      loadStyle(this, lwcCSS)
+     ]);
+     
     init({
       recordId: this.recordId
     }).then(result=>{
diff --git a/force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js b/force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js
index b2d232f..2d6fe4d 100644
--- a/force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js
+++ b/force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-08-24 15:52:32
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-24 15:54:14
+ * @LastEditTime: 2023-09-14 16:36:52
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -21,7 +21,8 @@
 import SolutionXNLabel from '@salesforce/label/c.Solution_XN';
 import SolutionHDLabel from '@salesforce/label/c.Solution_HD';
 import SolutionHNLabel from '@salesforce/label/c.Solution_HN';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexNewSolutonProLwc extends NavigationMixin(LightningElement) {
     @api accountId;
     hospitalSalesdepartmentHP;
@@ -44,6 +45,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.accountId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
index 1cc63ff..5dfcd42 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
+++ b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-03-28 15:59:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:53:14
+ * @LastEditTime: 2023-10-03 12:39:11
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOCSMNoToReportForReport extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -51,7 +53,7 @@
                     this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
-                this.awareDate = Date.now();
+                // this.awareDate = Date.now();
                 if(this.awareDate != undefined ){
                    updateForOCSMNoToReportButton({
                         recordId: this.recordId
@@ -83,6 +85,9 @@
 
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log("123");
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
index 6f7c895..980c0ae 100644
--- a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:53:04
+ * @LastEditTime: 2023-09-14 16:38:02
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOCSMToReport extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -73,6 +75,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.css b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.css
index a9b43eb..598ef39 100644
--- a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.css
+++ b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.css
@@ -1,4 +1,4 @@
-.lexOLYwinBidHolder{
+/* .lexOLYwinBidHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,9 @@
 }
 .container .uiContainerManager{
 	display: none !important;
+} */
+.spinner-container {
+    display: flex;
+    justify-content: center;
+    align-items: center;
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.html b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.html
index a2425c6..6b030aa 100644
--- a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.html
+++ b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.html
@@ -1,7 +1,13 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-20 17:04:39
+-->
 <template>
     <div class="lexOLYwinBidHolder" if:true={IsLoading}>
-        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        <lightning-spinner class="spinner-container" alternative-text="Loading" size="medium"></lightning-spinner>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.js b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.js
index 402e766..35bbafa 100644
--- a/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.js
+++ b/force-app/main/default/lwc/lexOLYwinBid/lexOLYwinBid.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-13 13:15:52
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 16:53:01
+ * @LastEditTime: 2023-09-20 16:58:35
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -15,10 +15,12 @@
 import updateForOLYwinBidButton  from '@salesforce/apex/OpportunityLightingButtonController.updateForOLYwinBidButton';
 import queryForOLYwinBidButton  from '@salesforce/apex/OpportunityLightingButtonController.queryForOLYwinBidButton';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOLYwinBid extends LightningElement {
     @api recordId;
     ifOpenBid;
-    IsLoading = true;
+    IsLoading;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -40,6 +42,7 @@
             variant: 'headerless',
             label: 'this is the aria-label value',
         });
+        this.IsLoading = true;
         console.log(result);
         if(result){
             try {
@@ -63,6 +66,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexOPDReport/lexOPDReport.js b/force-app/main/default/lwc/lexOPDReport/lexOPDReport.js
index 0937ca1..dec11b5 100644
--- a/force-app/main/default/lwc/lexOPDReport/lexOPDReport.js
+++ b/force-app/main/default/lwc/lexOPDReport/lexOPDReport.js
@@ -5,7 +5,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import init from '@salesforce/apex/ReportController.initForOPDReportButton';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOPDReport extends NavigationMixin(LightningElement) {
     @api recordId;
     assetReturnDay2;
@@ -50,6 +51,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js b/force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js
index a1c5616..8c8dae1 100644
--- a/force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js
+++ b/force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-09 16:41:45
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:49:57
+ * @LastEditTime: 2023-09-14 16:39:39
  */
 import { LightningElement,api, track, wire } from 'lwc';
 import {CurrentPageReference} from 'lightning/navigation';
@@ -13,7 +13,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import init from '@salesforce/apex/ReportController.initForOPDReportConsumButton';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOPDReportConsum extends NavigationMixin(LightningElement) {
     @api recordId;
     raStatus;
@@ -57,6 +58,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js b/force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js
index cd5cea9..b6589e3 100644
--- a/force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js
+++ b/force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:52:47
+ * @LastEditTime: 2023-09-14 16:40:30
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,7 +14,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOPDtoSIS extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -40,6 +41,9 @@
 
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.html b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.html
index 7e59b68..13a4aea 100644
--- a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.html
+++ b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.html
@@ -1,6 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:27:55
+-->
 <template>
     <div class="opdToSISHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="min"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
index 37b248f..3ed036a 100644
--- a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
+++ b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-23 10:09:31
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-12 14:14:04
+ * @LastEditTime: 2023-09-14 16:40:55
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -15,6 +15,8 @@
 import initCopy from '@salesforce/apex/OpportunityLightingButtonController.initCopy';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexOpporSplite extends NavigationMixin(LightningElement) {
     @api recordId;
     authorizedDBNo;
@@ -39,6 +41,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
index 13e9cb0..ef26aba 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
@@ -1,84 +1,111 @@
-.combobox-container {
-    display: flex;
-    align-items: center;
-}
+@import 'c/lexCssUtility';
 
-.combobox-container label {
-    margin-right: 10px;
-}
-.THIS.white svg {
-    fill : white;
-}
-/* .holder{
-	position: relative;
-	display: inline-block;
-	width: 80px;
-	height: 80px;
-	text-align: center;
-} */
-.my-combobox {
-    display: flex;
-    align-items: center; 
-    padding: 0 0.5rem;
-    width: 200px;
-}
-
-.slds-form-element__label {
-    width: 144px;
-    margin-right: -5rem;
-
-}
-.myinitDiv{
-    
-}
-.card{
-    
-}
-
-.my-addbutton{
-    -webkit-text-size-adjust: 100%;
-    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';
-    line-height: normal;
-    color: rgb(3, 45, 96);
-    -webkit-tap-highlight-color: transparent;
-    border-spacing: 0;
-    border-collapse: separate;
-    font-size: 13px;
-    white-space: normal;
+.lexBorder[c-lexPCLLostReportPage_lexPCLLostReportPage] {
+    color: #0A81DF;
+    width: 88px !important;
+    height: 34px;
+    border-radius: 4px;
+    opacity: 1;
+    background: #FFFFFF;
     box-sizing: border-box;
-    border: 0;
+    border: 1px solid #0A81DF;
+    font-size: small;
+}
+lightning-combobox label {
+  color: black !important;
 }
 
-    .container {
-    display: flex;
-    justify-content: space-between; /* 璁剧疆瀛愬厓绱犻棿鐨勯棿璺� */
-    }
-    
-    .item {
-    flex: 1; /* 璁剧疆瀛愬厓绱犵殑浼哥缉姣斾緥锛屽钩鍒嗗墿浣欑┖闂� /
-    max-width: 100%; / 闃叉瀛愬厓绱犳孩鍑哄鍣� */
-    }
+label {
+  color: black !important;
+}
+.Pop{
+  height: 300px;
+  width: 400px;
+  background-color: white;
+}
 
-    .text-container p:first-line {
-        background-color: rgb(165, 63, 63);
-      }
+.lexBorder1 {
+    font-size: small;
+    font-family: 'sans-serif';
+    font-weight: 500;
+    color: #0A81DF;
+    width: 62px;
+    height: 34px;
+    border-radius: 4px;
+    opacity: 1;
+    background: #FFFFFF;
+    box-sizing: border-box;
+    border: 1px solid #0A81DF;
+}
+.iconButton button{
+    padding-bottom: 11px;
+}
+table tr {
+    text-align: center !important;
+  }
+.lexBorder3 {
+    font-size: small;
+    font-family: 'sans-serif';
+    font-weight: 500;
+    color: #0A81DF;
+    width: 114px;
+    height: 34px;
+    border-radius: 4px;
+    opacity: 1;
+    background: #FFFFFF;
+    box-sizing: border-box;
+    border: 1px solid #0A81DF;
+}
+/* 鑷畾涔夎〃澶存牱寮� */
+.custom-table th {
+    background-color: #F3F3F3; /* 灏嗚儗鏅鑹叉洿鏀逛负鐏拌壊 */
+    border-right: 1px solid #AEAEAE; /* 娣诲姞鍙充晶绔栫嚎 */
+    padding: 10px; /* 娣诲姞鍐呰竟璺濅互澧炲姞鍙鎬� */
+  }
 
-    .slds-accordion__summary-heading{
-        background-color: rgb(192, 70, 70);
-    }
+  /* 鏈�鍚庝竴涓〃澶村崟鍏冩牸涓嶆坊鍔犲彸渚х珫绾� */
+  .custom-table th:last-child {
+    border-right: none;
+  }
+  lightning-spinner {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 999; /* 纭繚鍦ㄦ渶涓婂眰鏄剧ず */
+  }
+
+  :host {
+    --slds-c-accordion-summary-color-background: #F3F3F3;
+    --slds-c-accordion-heading-text-color: #181818;
+  }
+
+  /* CSS 鏂囦欢涓殑鏍峰紡 */
+.spinner-overlay {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(255, 255, 255, 0.8); /* 鑳屾櫙鑹诧紝鍙互鏍规嵁闇�瑕佽皟鏁撮�忔槑搴� */
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  z-index: 9999; /* 纭繚瑕嗙洊鍏朵粬鍐呭 */
+}
+
+.spinner-overlay lightning-spinner {
+  margin-top: -100px; /* 璐熷�煎皢鍥炬爣鍚戜笂绉诲姩 */
+}
 
 
-    .THIS .x-accordion .x-accordion-group  .x-accordion-heading a .x-accordion-toggle {
-        color: red!important;
-        }
 
-    host { 
-        --sds-c-accordion-summary-color-background: var(--lwc-colorBackground,rgb(160, 60, 60)); 
-    }
-    .THIS .slds-truncate {
-        max-width: 100%;
-        background: brown !important;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
\ No newline at end of file
+
+
+@media (max-width: 768px) {
+  th, td {
+    display: block;
+    width: 10%;
+  }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index 0f2ffaa..1cd0435 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,36 +4,61 @@
  * @Author: chen jing wu
  * @Date: 2023-04-20 17:16:48
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-13 13:42:39
+ * @LastEditTime: 2023-10-03 12:02:30
 -->
 <template>
-    <div class="holder" if:true={IsLoading}>
-        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    <div if:true={IsLoading}>
+        <div class="spinner-overlay">
+            <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        </div>
     </div>
     <template if:true={visible}>
         <template if:true={isSuccess}>
-            <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+            <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">
+                    <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>
+                  </div>
+                  <div class="slds-notify__close">
+                    <lightning-button-icon icon-name="utility:close"  variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                  </div>
+                </div>
+              </div>
+            <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
                 <div class="slds-notify_container slds-is-relative">
                     <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(46, 132, 74);" role="success">
                     <div class="slds-align_absolute-center">
-                        <h2 style="color:white;font-size:large">{message}</h2>
-                        <lightning-icon class="white" icon-name="utility:success" alternative-text="success" variant="Success" size="small" ></lightning-icon>
+                        
+                        
                     </div>
                     </div>
                 </div>
-            </div>
+            </div> -->
         </template>
         <template if:false={isSuccess}>
-            <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+            <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
                 <div class="slds-notify_container slds-is-relative">
                     <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(234, 0, 30);" role="success">
-                    <div class="slds-align_absolute-center">
-                        <h2 style="color:white;font-size:large">{message}</h2>
-                        <lightning-icon class="white" icon-name="utility:error" alternative-text="error" variant="Error" size="small" ></lightning-icon>
+                    <div class="slds-align_right">
+                       
+                       
+                        
                     </div>
                     </div>
                 </div>
-            </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">
+                    <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>
+                  </div>
+                  <div class="slds-notify__close"> 
+                    <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                  </div>
+                </div>
+              </div>
         </template>
     </template>
     <template if:true={isInit}>
@@ -46,9 +71,9 @@
                                 <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 label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
-                                    <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
-                                    <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                    <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-layout-item>
                         </lightning-layout>
                     </div>
@@ -85,13 +110,18 @@
                                 </lightning-layout-item>
                             </template>
                         </lightning-layout>
-                                <lightning-accordion active-section-name="澶卞崟鍝佺墝" allow-multiple-sections-open="true" class="myAccordion">
+                                <template if:true={LostReport.LostBrands}>
+                                    <lightning-accordion active-section-name={brandTitle} allow-multiple-sections-open="true" class="example-accordion">
                                         <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
                                             <li key={brand.lineNo}>
                                                 <div class= "x-accordion-heading">
-                                                    <lightning-accordion-section active-section-name="澶卞崟鍝佺墝" class="" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝" active="true">
-                                                        <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
-                                                        <lightning-button name={i} label="鍒犻櫎" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
+                                                    <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-layout-item>
+                                                        </lightning-layout>
                                                         <lightning-layout>
                                                             <lightning-layout-item size="4" padding="around-small">
                                                                 <template if:true={isEdit}>
@@ -130,64 +160,99 @@
                                                             <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-layout-item>
-                                                            <lightning-layout-item size="4" padding="horizontal-small">
-                                                                <lightning-combobox name={i} label="娓犻亾鍏蜂綋鍘熷洜:" value={brand.lostBrand.ChannelSpecificReasons__c} options={reasonOptions} 
-                                                                onchange={handleChannelSpecificReasonChange} placeholder="--鏃�--"></lightning-combobox>               
-                                                            </lightning-layout-item>
+                                                            <template if:true={brand.reasonFlag}>
+                                                                <lightning-layout-item size="4" padding="horizontal-small">
+                                                                    <lightning-combobox name={i} label="娓犻亾鍏蜂綋鍘熷洜:" value={brand.lostBrand.ChannelSpecificReasons__c} options={reasonOptions} 
+                                                                    onchange={handleChannelSpecificReasonChange} placeholder="--鏃�--" required></lightning-combobox>               
+                                                                </lightning-layout-item>
+                                                            </template>
                                                         </lightning-layout>
                                                         <lightning-layout>
                                                             <lightning-layout-item flexibility="auto" padding="around-small">
                                                                 <template if:true={isInit}>
-                                                                    <div class="slds-card__body slds-card__body_inner">
-                                                                        <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                                                    <div class=" table-container">
+                                                                        <table class="custom-table slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large" style="max-width: 99%;"> 
                                                                             <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"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
+                                                                                        <!-- <th style="width: 13%;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                                        <th style="width: 21%;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                                        <th style="width: 5%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
+                                                                                        <th style="width: 10%;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
+                                                                                        <th style="width: 10%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
+                                                                                        <th style="width: 15%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
+                                                                                        <th></th> -->
+
+                                                                                        <th style="width: 161px;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                                        <th style="width: 250px;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                                        <th style="width: 60px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
                                                                                         <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
-                                                                                        <th><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
-                                                                                        <th><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
-                                                                                        <th></th>
+                                                                                        <th style="width: 105px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
+                                                                                        <th style="width: 166px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
+                                                                                        <th style="width: 80px;"></th>
                                                                                 </tr>
                                                                             </thead>
                                                                             <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" style="margin-bottom: 20px; width: 130px"></lightning-combobox> 
+                                                                                           <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>
                                                                                         <td>
                                                                                             <template if:true={isEdit}>
-                                                                                                <div style="padding-bottom: 17px;">
-                                                                                                    <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>
+                                                                                                <div style="padding-top: 4px;">
+                                                                                                    <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>
+                                                                                                    <template if:true={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.LostProductss.LostProduct__r.Name} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
+                                                                                                    </template>
                                                                                                 </div> 
                                                                                             </template>
                                                                                             <template if:false={isEdit}>
-                                                                                                <div style="padding-bottom: 17px;">
+                                                                                                <div style="padding-top: 4px;">
                                                                                                     <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>
-                                                                                           <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange} style="margin-bottom: 20px;"></lightning-input>
+                                                                                        <td style="width: 5%;">
+                                                                                           <lightning-input 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="margin-bottom: 20px;"></lightning-input>
+                                                                                            <lightning-input class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange} style=""></lightning-input>
                                                                                         </td>
                                                                                         <td>
-                                                                                            <lightning-combobox class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange} style="margin-bottom: 20px; width: 87px"></lightning-combobox> 
+                                                                                            <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 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 class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                </template> -->
+                                                                                            </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> 
+                                                                                            </template>
                                                                                         </td>
                                                                                         <td>
-                                                                                            <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" style="margin-bottom: 20px; width: 87px"></lightning-combobox> 
+                                                                                           
+                                                                                            <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> 
+                                                                                            </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> 
+                                                                                            </template>
                                                                                         </td>
                                         
                                                                                         <td>
-                                                                                            <lightning-button-icon name={i} icon-name="utility:add" value={j} variant="bare" onclick={addRow}></lightning-button-icon>
+                                                                                            
+                                                                                                <lightning-button-icon name={i} icon-name="utility:add" value={j} variant="bare" onclick={addRow}></lightning-button-icon> 
+                                                                                    
+                                                                                                <lightning-button-icon style="padding-left: 15px;" class="iconButton" data-id={i} name={i} icon-name="utility:delete" value={j} variant="bare" onclick={removeRow}></lightning-button-icon>
+                                                                               
                                                                                         </td>
-                                                                                        <td>
-                                                                                            <lightning-button-icon class="deleteButton" data-id={i} name={i} icon-name="utility:delete" value={j} variant="bare" onclick={removeRow}></lightning-button-icon>
-                                                                                        </td>
+                                                                                        
                                                                                     </tr>
                                                                                 </template>
                                                                             </tbody>
@@ -202,15 +267,17 @@
                                             </li>
                                         </template>                               
                             </lightning-accordion>
+                                </template>
+                                
                     </div> 
                     <div style="margin-top: 5px">
                         <div class="slds-box slds-p-around_medium slds-text-align_center">
                             <lightning-layout style="margin-top: 20px;">
                                 <div class="slds-align_absolute-center">
                                     <lightning-layout-item size="12">
-                                        <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
-                                        <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
-                                        <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                        <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-layout-item>
                                 </div>
                             </lightning-layout>
@@ -228,91 +295,94 @@
                                     <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={submitFlag}>
-                                            <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                        <template if:true={isCanSubmit}>
+                                            <lightning-button class="slds-button lexBorder1" label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                            
                                         </template>
-                                        <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
-                                        <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                        <template if:true={isCanEdit}>
+                                            <lightning-button class="slds-button lexBorder1" name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                        </template>
+                                        <lightning-button class="slds-button lexBorder" label="杩斿洖璇环" onclick={cancel}></lightning-button>
                                     </lightning-layout-item>
                             </lightning-layout>
                             <lightning-layout>
-                                <lightning-layout-item size="1">
-                                    <label>澶卞崟绫诲瀷:</label>
+                                
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="float: left;padding-top: 17px;">澶卞崟绫诲瀷:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostType__c}</span>
+                                    </div>
                                 </lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                        <lightning-output-field field-name="LostType__c" variant="label-hidden"></lightning-output-field>
-                                    </lightning-record-view-form> 
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="float: left;padding-top: 17px;">澶卞崟鎬婚噾棰濓紙鍏冿級:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostTotalAmount__c}</span>
+                                        <!-- {LostReport.lostReport.LostTotalAmount__c} -->
+                                    </div>
                                 </lightning-layout-item>
-                                <lightning-layout-item size="1"></lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <label>澶卞崟鎬婚噾棰濓紙鍏冿級:</label>
+                                <lightning-layout-item size="3" padding="around-small">      
+                                    <div style="float: left;padding-top: 17px;">鍖呭惈瓒呭0:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.InclusionUltrasound__c}</span>
+                                        <!-- {LostReport.lostReport.InclusionUltrasound__c} -->
+                                    </div>    
                                 </lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                        <lightning-output-field field-name="LostTotalAmount__c" variant="label-hidden"></lightning-output-field>
-                                    </lightning-record-view-form> 
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <template if:true={editStatus}>
+                                        <div style="float: left;padding-top: 17px;">鐘舵��:
+                                            <span style="margin-left: 5px;">{editStatus}</span>
+                                            <!-- {LostReport.lostReport.Report_Status__c} -->
+                                        </div>
+                                    </template>
+                                    <template if:false={editStatus}>
+                                        <div style="float: left;padding-top: 17px;">鐘舵��:
+                                            <span style="margin-left: 5px;">{LostReport.lostReport.Report_Status__c}</span>
+                                            <!-- {LostReport.lostReport.Report_Status__c} -->
+                                        </div>
+                                    </template>
+                                    
                                 </lightning-layout-item>
-                                <lightning-layout-item size="1"></lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <label>鍖呭惈瓒呭0:</label>
-                                </lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                        <lightning-output-field field-name="InclusionUltrasound__c" variant="label-hidden"></lightning-output-field>
-                                    </lightning-record-view-form> 
-                                </lightning-layout-item>
-                                <lightning-layout-item size="1"></lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <label>鐘舵��:</label>
-                                </lightning-layout-item>
-                                <lightning-layout-item size="1">
-                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                        <lightning-output-field field-name="Report_Status__c" variant="label-hidden"></lightning-output-field>
-                                    </lightning-record-view-form> 
-                                </lightning-layout-item> 
                             </lightning-layout>
                         </div>
                         <div style="margin-top: 5px">
                             <div class="slds-box slds-p-around_medium">
-                                <lightning-accordion allow-multiple-sections-open class="myAccordion" active-section-name="澶卞崟鍝佺墝">
+                                <lightning-accordion allow-multiple-sections-open class="myAccordion" active-section-name={brandTitle}>
                                     <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
                                         <li key={brand.lostBrand.Id}>
-                                            <lightning-accordion-section  class="text-container" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝" active>
-                                                
+                                            <lightning-accordion-section  class="text-container" data-id={i} name={brand.brandTitle} label={brand.brandTitle} active>
                                                     <lightning-layout>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>澶卞崟鍝佺墝:</label>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;"></lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟鍝佺墝锛�</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="Lost_By_Company__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="2"></lightning-layout-item>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>澶卞崟鍝佺墝锛堟墜鍔級:</label>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>澶卞崟鍝佺墝锛堟墜鍔級锛�</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="Lost_By_Company_Mannual__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
                                                     </lightning-layout>
                                                     <lightning-layout>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>澶卞崟鍘熷洜锛堜富锛�:</label>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟鍘熷洜锛堜富锛夛細</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="Lost_reason_main__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="2"></lightning-layout-item>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>澶卞崟鍘熷洜锛堟锛�:</label>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>澶卞崟鍘熷洜锛堟锛夛細</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="Lost_Reason_Sub__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form>
@@ -321,50 +391,61 @@
                                                     </lightning-layout>
                                                     <lightning-layout> 
                                                         
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>涓爣缁忛攢鍟�:</label>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>涓爣缁忛攢鍟嗭細</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="Agency__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="2"></lightning-layout-item>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>涓爣缁忛攢鍟嗭紙鎵嬪姩锛�:</label>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>涓爣缁忛攢鍟嗭紙鎵嬪姩锛夛細</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="AgencyMannual__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
                                                     </lightning-layout>
                                                     <lightning-layout>
-                                                        <lightning-layout-item size="2" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
-                                                            <label>澶卞崟閲戦锛堝厓锛�:</label>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟閲戦锛堝厓锛夛細</label>
                                                         </lightning-layout-item>
-                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
+                                                        <lightning-layout-item size="3">
                                                             <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
                                                                 <lightning-output-field field-name="LostPrice__c" variant="label-hidden"></lightning-output-field>
                                                             </lightning-record-view-form> 
                                                         </lightning-layout-item>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <template if:true={brand.lostBrand.ChannelSpecificReasons__c}>
+                                                            <lightning-layout-item style="width: 135px;">
+                                                                <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">
+                                                                <lightning-output-field field-name="ChannelSpecificReasons__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                            </lightning-layout-item>
+                                                        </template>
                                                     </lightning-layout>
                                                 
                                                 <lightning-layout>
-                                                    <lightning-layout-item flexibility="auto" padding="around-small">
+                                                    <lightning-layout-item flexibility="auto" padding="around-small" style="padding-left: 0px;">
                                                         <!-- <template if:true={isInit}>
                                                             <lightning-datatable hide-checkbox-column="true" key-field="is" columns={columns3} data={getData}></lightning-datatable>
                                                         </template> -->
                                                         <template if:true={isInit}>
-                                                            <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                                            <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 style="width: 145px;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                            <th style="width: 370px;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                            <th style="width: 60px;"><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 style="width: 100px;"><div class="slds-truncate">澶卞崟浜у搧绫诲埆</div></th>
+                                                                            <th style="width: 145px;"><div class="slds-truncate">澶卞崟浜у搧鍖哄垎</div></th>
                                                                     </tr>
                                                                 </thead>
                                                                 <tbody>
@@ -373,11 +454,18 @@
                                                                             <td>
                                                                                 <div>{product.LostProductss.LostBrandName__c}</div>
                                                                             </td>
+                                                                            <template if:false={product.LostProductss.LostProduct__r}>
+                                                                                <td>
+                                                                                    <div>{product.productName}</div>
+                                                                                </td>
+                                                                            </template>
+                                                                            <template if:true={product.LostProductss.LostProduct__r}>
+                                                                                <td>
+                                                                                    <div>{product.LostProductss.LostProduct__r.Name}</div>
+                                                                                </td>
+                                                                            </template>
                                                                             <td>
-                                                                                <div>{product.productName}</div>
-                                                                            </td>
-                                                                            <td>
-                                                                                <div>{product.LostProductss.Quantity__c}</div>
+                                                                                <div style="float: right;">{product.LostProductss.Quantity__c}</div>
                                                                             </td>
                                                                             <td>
                                                                                 <div>{product.LostProductss.LostProductMannual__c}</div>
@@ -404,31 +492,39 @@
                                 <lightning-layout style="margin-top: 20px;">
                                     <div class="slds-align_absolute-center">
                                         <lightning-layout-item size="12">
-                                            <template if:false={submitFlag}>
-                                                <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                            <template if:true={isCanSubmit}>
+                                                <lightning-button class="slds-button lexBorder1" label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                                
                                             </template>
-                                            <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
-                                            <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                            <template if:true={isCanEdit}>
+                                                <lightning-button class="slds-button lexBorder1" name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                            </template>
+                                            <lightning-button class="slds-button lexBorder" label="杩斿洖璇环" onclick={cancel}></lightning-button>
                                         </lightning-layout-item>
                                     </div>
                                 </lightning-layout>
                             </div> 
                         </div>
-                        <template if:true={submitFlag}>
+                        <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">
-                                        <lightning-button label="鎾ゅ洖鎵瑰噯璇锋眰" onclick={onApproveChange}></lightning-button>
+                                        <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="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                    <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>
@@ -439,13 +535,14 @@
                                         <tbody>
                                             <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
                                                 <tr class="inputRows" key={approvalHistory.Id}>
-                                                    <td>
+                                                    <!-- <td>
                                                         <template if:true={approvalHistory.IsPending}>
                                                             <a onclick={onApproveChange}>閲嶆柊鍒嗛厤</a>
+                                                            <label>&nbsp;</label>
                                                             <label>|</label>
                                                             <a onclick={onApproveChange}>鎵瑰噯/鎷掔粷</a>
                                                         </template>
-                                                    </td>
+                                                    </td> -->
                                                     <td>
                                                         <div>{approvalHistory.CreatedDate}</div>
                                                     </td>
@@ -471,5 +568,53 @@
                     </div>   
                 </lightning-card>
         </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">
+                    
+                    <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>
+                            
+                        </div>
+                    </template>
+                    
+                    <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>  
+                        </lightning-layout-item>
+                          
+                    </template>
+                    <div slot="footer" style="align-self: center;padding-top: 10px;">
+                        <lightning-button
+                          data-id="Cancel"
+                          label="鍙栨秷"
+                          onclick={handleModalCancel}
+                        ></lightning-button>
+                        <lightning-button
+                          data-id="Submit"
+                          label={modalsubmitLabel}
+                          variant="brand"
+                          class="slds-p-left_small"
+                          onclick={handleModalSubmit}
+                        ></lightning-button>
+                    </div>
+                </div>   
+            </section>
+            <div class="slds-backdrop slds-backdrop_open"></div>
+        </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 447299b..b733ee0 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-09-13 13:45:33
+ * @LastEditTime: 2023-10-03 11:54:18
  */
 let columns2=[
     { label: '--鏃�--', value: '' },
@@ -33,8 +33,10 @@
     { label: '--鏃�--', value: '' },
     { label: '涓绘満', value: '涓绘満' },
     { label: '闀滃瓙', value: '闀滃瓙' },
+    { label: '娲楁秷鏈�', value: '娲楁秷鏈�' },
     { label: '灏忛暅绉�', value: '灏忛暅绉�' },
     { label: '鑳介噺', value: '鑳介噺' },
+    { label: '鍏夋簮', value: '鍏夋簮' },
     { label: '鍏朵粬', value: '鍏朵粬' }
 ];
 const productCategoryOptions = [
@@ -79,7 +81,12 @@
 import {CloseActionScreenEvent} from 'lightning/actions'; 
 import lexLookupLwc from 'c/lexLookupLwc';
 import searchProduct from '@salesforce/apex/lexPCLLostReportLwcController.searchProduct';
-import { updateRecord } from 'lightning/uiRecordApi';
+import { updateRecord,getRecord } from 'lightning/uiRecordApi';
+import { refreshApex } from '@salesforce/apex';
+import submitForApproval from '@salesforce/apex/lexPCLLostReportLwcController.submitForApproval';
+import reassignStep from '@salesforce/apex/lexPCLLostReportLwcController.reassignStep';
+import getUserProfileId from '@salesforce/apex/lexPCLLostReportLwcController.getUserProfileId';
+import PCLReportProfileId from '@salesforce/label/c.PCLReportProfileId';
 export default class LexPCLLostReportPage extends NavigationMixin(LightningElement) {
     @track visible = false;
     @wire(CurrentPageReference) pageRef;
@@ -88,6 +95,12 @@
     @track status = {
         pageStatus: 'Create'
       }
+    newActorId = null;
+    newReport;
+    action;
+    isLookup;
+    modalsubmitLabel;
+    @track isPop;
     @track message;
     @track isSuccess;
     @track LostReport = {
@@ -95,6 +108,8 @@
         ],
         lostReport: {}
     }
+    editStatus;
+    reasonOptions = reasonOptions;
     @track brandOptions = [];
     @track isInit = false;
     lostType = '澶卞崟';
@@ -115,6 +130,16 @@
     deleteProductIdList = [];
     IsLoading;
     newApprovalHistorys;
+    userProfileId;
+    @wire(getUserProfileId)
+    wiredUserProfileId({ error, data }) {
+        if (data) {
+            this.userProfileId = data;
+            console.log(this.userProfileId + 'user');
+        } else if (error) {
+            // 澶勭悊閿欒
+        }
+    }
     handleCustomButtonClick(event) {
         try {
             var index1 = event.target.title;
@@ -148,14 +173,40 @@
                     this.LostReport = result.LostReport;
                 }else{
                     this.showToast(result.message,"error");
+                    setTimeout(() => {
+                        window.location = '/lightning/r/Opportunity/' + this.oppId + '/view';
+                    }, 2000);
                 }  
             }else{
+                if(result.LostReport.lostReport.Report_Status__c == '鐢宠涓�'){
+                    this.editStatus = '鐢宠涓�';
+                    console.log('shenqingzhong');
+                }else if(result.LostReport.lostReport.Report_Status__c == '鎵瑰噯'){
+                    this.editStatus = '鎵瑰噯';
+                    console.log('pizhun');
+                }
+                
                 var report = result.LostReport;
                 this.LostReport = report;
-                this.LostReport.lostReport.LostTotalAmount__c = 0.0;
-                this.LostReport.lostReport.InclusionUltrasound__c = '0';
+                
+                if(!this.LostReport.lostReport.LostTotalAmount__c){
+                    this.LostReport.lostReport.LostTotalAmount__c = 0.0;
+                }
+                if(!this.LostReport.lostReport.InclusionUltrasound__c){
+                    this.LostReport.lostReport.InclusionUltrasound__c = '0';
+                }
 
                 this.newProduct = JSON.parse(JSON.stringify(this.LostReport.LostBrands[0].LostProducts[0]));
+                if(this.newProduct.LostProductss.Id){
+                    delete this.newProduct.LostProductss.Id;
+                }
+                this.newProduct.LostProductss.LostBrandName__c = '';
+                this.newProduct.LostProductss.LostProduct__r = '';
+                this.newProduct.LostProductss.Quantity__c = '';
+                this.newProduct.LostProductss.LostProductMannual__c = '';
+                this.newProduct.LostProductss.ProductClass__c = '';
+                this.newProduct.LostProductss.ProductCategory__c = '';
+                // this.newProduct.LostProductss.Id = '';
                 this.newApprovalHistorys = JSON.parse(JSON.stringify(this.LostReport.approvalHistorys));
                 console.log(this.LostReport);
                 console.log(this.LostReport.approvalHistorys.length);
@@ -177,7 +228,7 @@
                         }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Reassigned'){
     
                         }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Rejected'){
-                            resthis.LostReportult.approvalHistorys[i].StepStatus = '宸叉嫆缁�';
+                                this.LostReport.approvalHistorys[i].StepStatus = '宸叉嫆缁�';
                         }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Removed'){
     
                         }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Started'){
@@ -187,8 +238,21 @@
                         console.log('321');
                     }
                     this.submitFlag = true;
+                    if(this.LostReport.lostReport.Report_Status__c == '鎵瑰噯'){
+                        this.submitFlag = false;
+                    }
                 }
-                this.isInit = true;
+                console.log(PCLReportProfileId.includes(this.userProfileId));
+                console.log(PCLReportProfileId);
+                console.log(this.userProfileId);
+                getUserProfileId().then(result1=>{
+                    this.userProfileId = result1;
+                    if(this.pageStatus == 'Edit' && !(this.LostReport.lostReport.Report_Status__c == '鑽夋' || this.userProfileId == '00e10000000Y3o5AAC' || (this.LostReport.lostReport.Report_Status__c == '鎵瑰噯' && PCLReportProfileId.includes(this.userProfileId)))){
+                        this.status.pageStatus = 'View';
+                    }
+                    this.isInit = true;
+                });
+                
             }
             }).catch(error=>{
                 console.log("error");
@@ -209,11 +273,13 @@
             fieldName: 'ProductCategory__c'
         }).then(result=>{
             this.productOptionsList = JSON.parse(result);
+            this.LostReport = JSON.parse(JSON.stringify(this.LostReport));
+            console.log(this.LostReport.approvalHistorys.length + 'size');
         }).catch(error=>{
             console.log('error');
             console.log(error);
         });
-
+        
     }
     renderedCallback(){
         const sections = this.template.querySelectorAll('lightning-accordion-section');
@@ -221,7 +287,12 @@
             console.log(section);
             section.active = true;    
         });
+        console.log('1');
+        console.log(this.LostReport.lostReport.LostTotalAmount__c);
+        this.LostReport.lostReport.LostTotalAmount__c = this.LostReport.lostReport.LostTotalAmount__c;
+        // this.LostReport = JSON.parse(JSON.stringify(this.LostReport));
     }
+    brandTitle = ['澶卞崟鍝佺墝1','澶卞崟鍝佺墝2','澶卞崟鍝佺墝3','澶卞崟鍝佺墝4','澶卞崟鍝佺墝5','澶卞崟鍝佺墝6'];
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -238,6 +309,33 @@
             }
         }
     }
+    closeAction(){
+        this.visible = false;
+    }
+
+    get haveApprovalHistorys(){
+        console.log(this.LostReport.approvalHistorys.length + 'size');
+        if(this.LostReport.approvalHistorys.length > 1){
+            return true;
+        }else{
+            return false;
+        }
+    }
+    get isCanSubmit(){
+        if(this.LostReport.lostReport.Report_Status__c == '鑽夋' || this.LostReport.lostReport.Report_Status__c == '鎵瑰噯'){
+            return true;
+        }else{
+            return false;
+        }
+    }
+
+    get isCanEdit(){
+        if(this.LostReport.lostReport.Report_Status__c == '鑽夋' || this.userProfileId == '00e10000000Y3o5AAC' || (this.LostReport.lostReport.Report_Status__c == '鎵瑰噯' && PCLReportProfileId.includes(this.userProfileId))){
+            return true;
+        }else{
+            return false;
+        }
+    }
 
     showToast(msg,type) {
         try {
@@ -251,9 +349,9 @@
             let delay = 5000;
             console.log(this.message);
             console.log('1');
-            setTimeout(() => {
-                this.visible = false;
-            }, delay ); 
+            // setTimeout(() => {
+            //     this.visible = false;
+            // }, delay ); 
         } catch (error) {
             console.log(error);
         }
@@ -311,6 +409,13 @@
         }
         return false;
     }
+    get isCaoAn(){
+        if(this.LostReport.lostReport.Report_Status__c == '鑽夋'){
+            return true;
+        }else{
+            return false;
+        }
+    }
 
     get isEdit(){
         if(this.status.pageStatus == 'Edit'){
@@ -318,6 +423,7 @@
         }
         return false;
     }
+
     get isSubmit(){
         if(this.submitFlag){
             return true;
@@ -330,6 +436,14 @@
             lineNo: this.LostReport.LostBrands.length
         }).then(result=>{
             this.LostReport.LostBrands.push(result);
+            // 鑾峰彇 lightning-accordion 鐨� DOM 鍏冪礌
+            setTimeout(() => {
+                const accordion = this.template.querySelector('.example-accordion');
+            console.log(accordion);
+            console.log('1');
+            accordion.activeSectionName = this.brandTitle;
+            }, 200);
+
         });
     }
     addRow(event){
@@ -345,8 +459,9 @@
         console.log('1');
         this.IsLoading = true;
         submit({
-            report1: JSON.stringify(this.LostReport),
-            reportId: this.reportId
+            reportStatus: this.LostReport.lostReport.Report_Status__c,
+            modifyAfterApproval: this.LostReport.lostReport.ModifyAfterApproval__c,
+            reportId: this.LostReport.lostReport.Id
         }).then(result=>{
             if(result.error){
                 this.showToast(result.error,"error");
@@ -381,8 +496,12 @@
                 }
                 this.submitFlag = JSON.parse(JSON.stringify(result.submitFlag));
                 console.log(this.LostReport);
-                this.updateRecordView(this.reportId);
-                this.LostReport.lostReport.Report_Status__c = '鐢宠涓�';
+                // this.updateRecordView(this.reportId);
+                this.showToast('鎻愪氦鎴愬姛锛�','success');
+                setTimeout(() => {
+                    
+                    window.location = '/' + this.LostReport.lostReport.Id;
+                }, 2000);
             }
             this.IsLoading = false;
         }).catch(error=>{
@@ -391,14 +510,19 @@
         });
     }
     onApproveChange(event){
-        window.open('/lightning/r/ProcessInstanceStep/'+ this.LostReport.approvalHistorys[0].Id + '/view?0.source=alohaHeader');
-        // this[NavigationMixin.Navigate]({
-        //     type: 'standard__recordPage',
-        //     attributes: {
-        //         recordId: this.LostReport.approvalHistorys[0].Id,
-        //         actionName: 'view'
-        //     }
-        // });
+        // var approvalId;
+        // for(var i=0;i < this.LostReport.approvalHistorys.length;i++){
+        //     if(this.LostReport.approvalHistorys[i].StepStatus == '寰呭鐞�'){
+        //         approvalId = this.LostReport.approvalHistorys[i].Id;
+        //     }  
+        // }
+        
+        // window.open('/lightning/r/ProcessInstanceStep/'+ approvalId + '/view?0.source=alohaHeader');
+        this.isPop = true;
+        
+    }
+    onApproveChange1(){
+        window.open('/lightning/r/' + this.LostReport.lostReport.Id + '/related/ProcessSteps/view?0.source=alohaHeader');
     }
     
 
@@ -439,6 +563,8 @@
         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;
         searchBatchIfForProduct({
             productName: this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c
         }).then(result=>{
@@ -454,6 +580,7 @@
                 this.setDefaultBrand(payload.value,index);
                 this.clearBrandMannualName(payload.value,index);
             }
+            console.log('cnm:' + JSON.stringify(this.LostReport));
         });
         
     }
@@ -514,8 +641,30 @@
         //         actionName: 'view'
         //     }
         // });
-        window.location = '/' +this.oppId;
+        window.location = '/lightning/r/Opportunity/' + this.LostReport.lostReport.Opportunity__c + '/view';
     }
+    removeFieldsWithR(obj) {
+        if (Array.isArray(obj)) {
+            // 濡傛灉灞炴�ф槸鏁扮粍锛岄亶鍘嗘暟缁勫厓绱�
+            for (var i = 0; i < obj.length; i++) {
+                // 閫掑綊璋冪敤鍑芥暟澶勭悊鏁扮粍鍏冪礌
+                this.removeFieldsWithR(obj[i]);
+            }
+        } else if (typeof obj === 'object' && obj !== null) {
+            // 濡傛灉灞炴�ф槸瀵硅薄锛屽垯閬嶅巻瀵硅薄灞炴��
+            for (var key in obj) {
+                if (key.includes('__r') || key === 'approvalHistorys') {
+                    // 濡傛灉灞炴�у悕浠� '__r' 缁撳熬锛屽垹闄ゅ畠
+                    console.log(key);
+                    delete obj[key];
+                }else if (typeof obj[key] === 'object' && obj[key] !== null) {
+                    // 濡傛灉灞炴�ф槸瀵硅薄锛屽垯閫掑綊璋冪敤璇ュ嚱鏁�
+                    this.removeFieldsWithR(obj[key]);
+                }
+            }
+        }
+    }
+    
     
     saveBrandJs(event) {
         this.IsLoading = true;
@@ -525,10 +674,13 @@
             return;
         }
         console.log(this.LostReport);
-        var newLostReport = JSON.parse(JSON.stringify(this.LostReport));
-        newLostReport.approvalHistorys = this.newApprovalHistorys;
+        this.newReport = JSON.parse(JSON.stringify(this.LostReport));
+        this.newReport.approvalHistorys = this.newApprovalHistorys;
+        console.log(JSON.stringify(this.newReport));
+        this.removeFieldsWithR(this.newReport);
+        console.log(JSON.stringify(this.newReport));
         dataEntry({
-            report1 : JSON.stringify(newLostReport),
+            report1 : JSON.stringify(this.newReport),
             deleteBrandIdList: this.deleteBrandIdList,
             deleteProductIdList: this.deleteProductIdList
         }).then(result=>{
@@ -685,7 +837,8 @@
     removeRow(event){
         var index1 = event.target.name;
         var index2 = event.target.value;
-        var deleteButtons = this.template.querySelectorAll('.deleteButton[data-id="' + index1 + '"]');
+        var deleteButtons = this.template.querySelectorAll('.iconButton[data-id="' + index1 + '"]');
+        console.log(deleteButtons.length + ' chen1');
         if(deleteButtons.length == 1){
             return;
         }
@@ -720,7 +873,13 @@
                     elements1[secondNum].readOnly = false;
                     elements2[secondNum].readOnly = false;
                     this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c;
-                    this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;
+                    console.log(prd.ProductClass__c + '  ' + prd.ProductCategory__c);
+                    if(prd.ProductClass__c == '鍏朵粬' && (prd.ProductCategory__c == '' || prd.ProductCategory__c == null || prd.ProductCategory__c == undefined)){
+                        this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c = '鍏朵粬';
+                    }else{
+                        this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;
+                    }
+                    
                     elements1[secondNum].readOnly = true;
                     elements2[secondNum].readOnly = true;
                 }else {
@@ -728,7 +887,7 @@
                     elements2[secondNum].readOnly = false;
                     this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null;
                     this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null;
-                    elements1[secondNum].readOnly = true;
+                    // elements1[secondNum].readOnly = true;
                     elements2[secondNum].readOnly = true;
                 }
             }).catch(error=>{
@@ -737,6 +896,84 @@
             });
 			
 		}
+    }
+    handleModalCancel(){
+        this.isPop = false;
+    }
+    handleModalSubmit(){
+        
+        this.IsLoading = true;
+        const comment = this.template.querySelector('.comment');
+        console.log(this.isLookup == true && this.newActorId == null);
+        if(this.isLookup == true && this.newActorId == null){
+            this.showToast('璇峰~鍏ユ柊鍒嗛厤浜�','error');
+            this.IsLoading = false;
+            return;
+        }
+        this.isPop = false;
+        if(this.newActorId){
+            reassignStep({
+                recordId: this.LostReport.lostReport.Id,
+                newActorId: this.newActorId
+            }).then(result=>{
+                if(result){
+                    this.showToast('鎮ㄦ棤鏉冮噸鏂板垎閰�','error');
+                    this.IsLoading = false;
+                }else{
+                    window.location = '/' + this.LostReport.lostReport.Id;
+                }
+                
+            });
+        }else{
+            submitForApproval({
+                recordId: this.LostReport.lostReport.Id,
+                comments: comment.value,
+                action: this.action
+            }).then(result=>{
+                if(result){
+                    if(this.action == 'Approve'){
+                        this.showToast('鎮ㄦ棤鏉冩壒鍑�','error');
+                    }else if(this.action == 'Reject'){
+                        this.showToast('鎮ㄦ棤鏉冩嫆缁�','error');
+                    }else if(this.action == 'Removed'){
+                        this.showToast('鎮ㄦ棤鏉冩挙鍥�','error');
+                    }
+                    
+                    this.IsLoading = false;
+                }else{
+                    window.location = '/' + this.LostReport.lostReport.Id;
+                } 
+            });
+        }
+        
+        
+    }
+    handleSubmitApp(){
+        this.modalsubmitLabel = '鎵瑰噯';
+        this.isPop = true;
+        this.action = 'Approve';
+        this.isLookup = false;
+        this.newActorId = null;
+    }
+    handleReStartApp(){
+        this.modalsubmitLabel = '閲嶆柊鍒嗛厤';
+        this.isPop = true;
+        this.isLookup = true;
+
+    }
+    handleNoApp(){
+        this.modalsubmitLabel = '鎷掔粷';
+        this.isPop = true;
+        this.action = 'Reject';
+        this.isLookup = false;
+        this.newActorId = null;
+    }
+    handleCancelApp(){
+        this.modalsubmitLabel = '鎾ゅ洖';
+        this.isPop = true;
+        this.action = 'Removed';
+        this.isLookup = false;
+        this.newActorId = null;
     }
 
     handleClear(event){
@@ -758,7 +995,8 @@
     }
     handleChannelSpecificReasonChange(event){
         var value = event.target.value;
-        this.LostReport.lostReport.LostType__c = value;
+        var index = event.target.name;
+        this.LostReport.LostBrands[index].lostBrand.ChannelSpecificReasons__c = value;
     }
     
     handleLostReasonMainChange(event){
@@ -766,7 +1004,10 @@
         var value = event.target.value;
         this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c = value;
         if(value == '娓犻亾鍥犵礌'){
-            
+            this.LostReport.LostBrands[index].reasonFlag = true;
+        }else if(this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c != '娓犻亾鍥犵礌' && this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c != '娓犻亾鍥犵礌'){
+            this.LostReport.LostBrands[index].reasonFlag = false;
+            this.LostReport.LostBrands[index].lostBrand.ChannelSpecificReasons__c = ''; 
         }
     }
 
@@ -774,6 +1015,12 @@
         var index = event.target.name;
         var value = event.target.value;
         this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c = value;
+        if(value == '娓犻亾鍥犵礌'){
+            this.LostReport.LostBrands[index].reasonFlag = true;
+        }else if(this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c != '娓犻亾鍥犵礌' && this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c != '娓犻亾鍥犵礌'){
+            this.LostReport.LostBrands[index].reasonFlag = false;
+            this.LostReport.LostBrands[index].lostBrand.ChannelSpecificReasons__c = ''; 
+        }
     }
 
     handleLostByCompanyMannualChange(event){
@@ -845,6 +1092,9 @@
         }
        
     }
+    handleActorChange(event){
+        this.newActorId = event.target.value;
+    }
 
     handleProductCategoryChange(event){
         var index1 = event.target.title;
diff --git a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.css b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.css
index 548c121..362c82b 100644
--- a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.css
+++ b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.css
@@ -1,4 +1,4 @@
-.predictedDateChangeHolder{
+/* .predictedDateChangeHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,11 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
+.custom-date-input .slds-datepicker {
+    /* 璁剧疆鏃ユ湡閫夋嫨鍣ㄧ殑瀹藉害 */
+    width: 300px; /* 鏍规嵁闇�瑕佽皟鏁村搴� */
+    /* 璁剧疆鏃ユ湡閫夋嫨鍣ㄧ殑楂樺害 */
+    height: 300px; /* 鏍规嵁闇�瑕佽皟鏁撮珮搴� */
+    /* 璁剧疆鍏朵粬鏍峰紡灞炴�э紝濡傚瓧浣撳ぇ灏忋�佽竟妗嗐�佽竟妗嗗渾瑙掔瓑 */
+  }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.html b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.html
index 621521f..eb6f5d6 100644
--- a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.html
+++ b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.html
@@ -1,6 +1,17 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-27 13:38:02
+-->
 <template>
-    <div class="predictedDateChangeHolder" if:true={IsLoading}>
-        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-    </div>
+       
+            <div if:true={flag}>
+                <div>
+                    <c-improved-forecast-time oncloseaction={handleChildEvent} record-id ={recordId}></c-improved-forecast-time>
+                </div>
+            </div>
+        
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
index f474a6c..b65ddb8 100644
--- a/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
+++ b/force-app/main/default/lwc/lexPredictedDateChange/lexPredictedDateChange.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-12 10:46:24
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-12 13:35:56
+ * @LastEditTime: 2023-09-20 17:28:12
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,11 +13,16 @@
 import init  from '@salesforce/apex/OpportunityLightingButtonController.initForPredictedDateChangeButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+import lexInputCSS from '@salesforce/resourceUrl/lexInputCSS';
 export default class LexPredictedDateChange extends LightningElement {
     @api recordId;
     IsLoading = true;
     directLossFLG;
     createdDay;
+    flag = false;
+    
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -35,17 +40,23 @@
     }
     showToast(msg,type) {
       const event = new ShowToastEvent({
-          title: ' ',
-          message: msg,
-          variant: type,
-          mode: 'sticky'
-      });
-      this.dispatchEvent(event);
+        title: ' ',
+        message: msg,
+        variant: type,
+        mode: 'sticky'
+    });
+    this.dispatchEvent(event);
+      
     }
     updateRecordView(recordId) {
       updateRecord({fields: { Id: recordId }});
     }
     connectedCallback(){
+      Promise.all([
+        loadStyle(this, lwcCSS),
+        loadStyle(this, lexInputCSS)
+       ]);
+       
       init({
         recordId: this.recordId
       }).then(result=>{
@@ -56,6 +67,10 @@
         console.log("error");
         console.log(error);
       })
+    }
+    handleChildEvent(){
+      console.log('close');
+      this.dispatchEvent(new CloseActionScreenEvent());
     }
     predictedDateChange(){
       // 20221206 ljh DB202212030068 start
@@ -77,8 +92,9 @@
           this.dispatchEvent(new CloseActionScreenEvent());
           return;
         } else {
-          window.open('/apex/ImprovedForecastTime?id=' + this.recordId,'','height=500,width=800,top=200,left=250,location=no');
-          this.dispatchEvent(new CloseActionScreenEvent());
+          this.flag = true;
+          // window.open('/apex/ImprovedForecastTimeAno?id=' + this.recordId,'','height=500,width=800,top=200,left=250,location=no');
+          // this.dispatchEvent(new CloseActionScreenEvent());
         }
       })
     }
diff --git a/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.html b/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.html
index 1ac43b5..ae8ae7a 100644
--- a/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.html
+++ b/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.html
@@ -1,6 +1,6 @@
 <template>
     <div class="lexQuotationRequestHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.css b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.css
index e2d6ce2..32739bb 100644
--- a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.css
+++ b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.css
@@ -1,4 +1,4 @@
-.lexQuotationRequestHolder{
+/* .lexQuotationRequestHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.html b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.html
index dff927d..51fbd74 100644
--- a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.html
+++ b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.html
@@ -4,11 +4,11 @@
  * @Author: chen jing wu
  * @Date: 2023-04-14 11:09:28
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-14 11:10:38
+ * @LastEditTime: 2023-09-23 12:29:03
 -->
 <template>
     <div class="lexQuotationRequestHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
index 2d54e0e..23590f5 100644
--- a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
+++ b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-14 11:09:28
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 16:56:06
+ * @LastEditTime: 2023-09-14 16:42:54
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,7 +13,8 @@
 import init  from '@salesforce/apex/OpportunityLightingButtonController.initForQuotationRequestButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexQuotationRequest extends LightningElement {
     @api recordId;
     biddingProjectNameBidId;
@@ -34,6 +35,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.css b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.css
index a524923..8d64895 100644
--- a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.css
+++ b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.css
@@ -1,4 +1,4 @@
-.lexRequestDBHolder{
+/* .lexRequestDBHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.html b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.html
index b4aff5b..3267831 100644
--- a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.html
+++ b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.html
@@ -1,6 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:29:23
+-->
 <template>
     <div class="lexRequestDBHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
index f339e18..cfdb850 100644
--- a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
+++ b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
@@ -6,6 +6,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexRequestDB extends NavigationMixin(LightningElement) {
     @api recordId;
     stageName;
@@ -39,6 +41,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
index 58432a2..338ef7e 100644
--- a/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
+++ b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:52:37
+ * @LastEditTime: 2023-09-14 16:43:46
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSIStoOPD extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -38,6 +40,10 @@
 
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
+           
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js b/force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js
index 72a5821..dc7e066 100644
--- a/force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js
+++ b/force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-06 15:41:32
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-01 09:33:28
+ * @LastEditTime: 2023-09-14 16:45:42
  */
 import { api, wire,LightningElement, track } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -16,6 +16,8 @@
 import LightningConfirm from 'lightning/confirm';
 import STATUS_FIELD from "@salesforce/schema/OpportunitySpecialApply__c.Status__c";
 import { refreshApex } from '@salesforce/apex';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSpecSubmit extends LightningElement {
     @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] })
     record;
@@ -55,6 +57,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexSpecilaApplyCreateAch/lexSpecilaApplyCreateAch.js b/force-app/main/default/lwc/lexSpecilaApplyCreateAch/lexSpecilaApplyCreateAch.js
index 8261397..741cf9c 100644
--- a/force-app/main/default/lwc/lexSpecilaApplyCreateAch/lexSpecilaApplyCreateAch.js
+++ b/force-app/main/default/lwc/lexSpecilaApplyCreateAch/lexSpecilaApplyCreateAch.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-25 10:54:07
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-07-07 11:22:38
+ * @LastEditTime: 2023-09-14 16:44:06
  */
 import { LightningElement,api, track, wire } from 'lwc';
 import {CurrentPageReference} from 'lightning/navigation';
@@ -13,7 +13,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import init from '@salesforce/apex/OpportunityLightingButtonController.initForSpecilaApplyCreateAchButton';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSpecilaApplyCreateAch extends NavigationMixin(LightningElement) {
     @api achId;
     oppId;
@@ -35,6 +36,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.achId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js b/force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js
index f9b3735..58d470b 100644
--- a/force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js
+++ b/force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js
@@ -5,7 +5,8 @@
 import { NavigationMixin } from 'lightning/navigation';
 import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
 import init from '@salesforce/apex/OpportunityLightingButtonController.initForSpecilaApplyCreateButton';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSpecilaApplyCreateLwc extends NavigationMixin(LightningElement) {
     @api oppId;
     oppName;
@@ -28,6 +29,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.oppId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexStockApply/lexStockApply.css b/force-app/main/default/lwc/lexStockApply/lexStockApply.css
index 39dab40..d379d74 100644
--- a/force-app/main/default/lwc/lexStockApply/lexStockApply.css
+++ b/force-app/main/default/lwc/lexStockApply/lexStockApply.css
@@ -1,4 +1,4 @@
-.lexStockApplyHolder{
+/* .lexStockApplyHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexStockApply/lexStockApply.html b/force-app/main/default/lwc/lexStockApply/lexStockApply.html
index 4fac2c9..0116476 100644
--- a/force-app/main/default/lwc/lexStockApply/lexStockApply.html
+++ b/force-app/main/default/lwc/lexStockApply/lexStockApply.html
@@ -1,7 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:29:43
+-->
 <template>
     <div class="lexStockApplyHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
-        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+       
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexStockApply/lexStockApply.js b/force-app/main/default/lwc/lexStockApply/lexStockApply.js
index 08225c6..d2697d9 100644
--- a/force-app/main/default/lwc/lexStockApply/lexStockApply.js
+++ b/force-app/main/default/lwc/lexStockApply/lexStockApply.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-14 13:04:53
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 16:58:40
+ * @LastEditTime: 2023-09-14 16:46:11
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -17,6 +17,8 @@
 import connection from '@salesforce/resourceUrl/connection20';
 import submitProcess  from '@salesforce/apex/OpportunityLightingButtonController.submitProcess';
 import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexStockApply extends LightningElement {
     @api recordId;
     stockApplyStatus;
@@ -101,6 +103,9 @@
         }
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js b/force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
index 36ecf31..99cdd9e 100644
--- a/force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
+++ b/force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-07 09:02:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-25 16:50:36
+ * @LastEditTime: 2023-09-14 16:46:40
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import init  from '@salesforce/apex/ReportController.initForSubmitCompetitorReportButton';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSubmitCompetitorReport extends LightningElement {
     @api recordId;
     IsLoading = true;
@@ -39,6 +41,9 @@
   }
 
     connectedCallback(){
+      Promise.all([
+        loadStyle(this, lwcCSS)
+       ]);
           init({
             recordId: this.recordId
           }).then(result=>{
diff --git a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.css b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.css
index d3a1bf5..667e1b0 100644
--- a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.css
+++ b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.css
@@ -1,4 +1,4 @@
-.specSubmitHolder{
+/* .specSubmitHolder{
     position: relative;
     display: inline-block;
     width: 80px;
@@ -7,4 +7,4 @@
 }
 .container .uiContainerManager{
 	display: none !important;
-}
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.html b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.html
index a02df8e..3aa1576 100644
--- a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.html
+++ b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.html
@@ -1,5 +1,13 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-11 09:20:29
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-26 09:31:46
+-->
 <template>
     <div class="specSubmitHolder" if:true={IsLoading}>
-        <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js
index ce88ffe..f87159c 100644
--- a/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js
+++ b/force-app/main/default/lwc/lexSubmitReport/lexSubmitReport.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-09-11 09:20:29
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 10:00:40
+ * @LastEditTime: 2023-09-26 09:32:55
  */
 import { api, wire,LightningElement, track } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -16,14 +16,15 @@
 import { refreshApex } from '@salesforce/apex';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import LightningConfirm from 'lightning/confirm';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSubmitReport extends LightningElement {
     @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] })
     record;
     @api recordId;
     cntLostCancelReport;
     cntLostCancelDraft;
-    IsLoading = true;
+    IsLoading;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -55,6 +56,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
@@ -80,6 +84,7 @@
             label: 'this is the aria-label value'
         });
         console.log(result);
+        this.IsLoading = true;
         if(result){
             updateSubmitReportButton({
                 recordId: this.recordId
@@ -89,9 +94,9 @@
                 }else{
                     setTimeout(() => {
                         this.IsLoading = false;
-                        refreshApex(this.record);
+                        window.location = '/' + this.recordId;
                         this.dispatchEvent(new CloseActionScreenEvent());
-                    }, 2000);
+                    }, 1000);
                 }
             });
         }else{
diff --git a/force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js b/force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js
index bf81d84..6d4cbd9 100644
--- a/force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js
+++ b/force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js
@@ -8,7 +8,8 @@
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import LightningConfirm from 'lightning/confirm';
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexSubmitSolutionSchemeForApproval extends LightningElement {
     @api recordId;
     schemeType;
@@ -35,6 +36,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         init({
             recordId: this.recordId
         }).then(result=>{
diff --git a/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js b/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
index c886649..bf82410 100644
--- a/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
+++ b/force-app/main/default/lwc/lexUpdateToOpp/lexUpdateToOpp.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-06-21 10:42:48
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 15:39:09
+ * @LastEditTime: 2023-09-14 16:47:51
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,6 +13,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import LightningConfirm from 'lightning/confirm';
 import updateOpportunity from '@salesforce/apex/OCMManagementProvinceWebService.updateOpportunity';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexUpdateToOpp extends LightningElement {
     showToast(msg,type) {
         const event = new ShowToastEvent({
@@ -24,6 +26,9 @@
         this.dispatchEvent(event);
     }
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         this.handleConfirmClick('鏄惁灏哋CSM绠$悊鐪佺殑鎷呭綋鑰呬俊鎭弽鏄犲埌鍏宠仈璇环锛�');
     }
     async handleConfirmClick(msg) {
diff --git a/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
index 4b754de..beebd63 100644
--- a/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
+++ b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-03-27 14:05:59
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-25 16:51:56
+ * @LastEditTime: 2023-09-14 16:48:12
  */
 import { LightningElement, wire, track, api } from "lwc";
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import updateForVOCAnswerButton from "@salesforce/apex/ReportController.updateForVOCAnswerButton";
 import { updateRecord } from "lightning/uiRecordApi";
 import { ShowToastEvent } from "lightning/platformShowToastEvent";
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexVOCAnswer extends LightningElement {
   @api recordId;
   status;
@@ -36,6 +38,9 @@
   }
 
   connectedCallback() {
+    Promise.all([
+      loadStyle(this, lwcCSS)
+     ]);
     console.log(this.recordId);
     init({
       recordId: this.recordId,
diff --git a/force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js b/force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
index c24126d..3c57a99 100644
--- a/force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
+++ b/force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
@@ -8,6 +8,8 @@
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 import getUserIdByName from '@salesforce/apex/ReportController.getUserIdByName';
 import getProfileIdByName from '@salesforce/apex/ReportController.getProfileIdByName';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexVOCCheck extends LightningElement {
     
     @api recordId;
@@ -39,6 +41,9 @@
 
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js b/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
index c3e089b..a04b7ac 100644
--- a/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
+++ b/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-03-27 14:08:56
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:48:56
+ * @LastEditTime: 2023-09-14 16:49:02
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import  updateForVOCConfirmButton from '@salesforce/apex/ReportController.updateForVOCConfirmButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexVOCConfirm extends LightningElement {
     @api recordId;
     status;
@@ -39,6 +41,9 @@
 
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js b/force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js
index 44dac34..0b54a8e 100644
--- a/force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js
+++ b/force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-03-27 14:11:17
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-11 13:49:03
+ * @LastEditTime: 2023-09-14 16:49:23
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -13,6 +13,8 @@
 import update  from '@salesforce/apex/ReportController.updateForVOCFinishButton';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexVOCFinish extends LightningElement {
     @api recordId;
     status;
@@ -40,6 +42,9 @@
     }
 
     connectedCallback(){
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js b/force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js
index ecea080..09c72ce 100644
--- a/force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js
+++ b/force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-03-27 13:39:23
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-08 15:42:21
+ * @LastEditTime: 2023-09-14 16:49:45
  */
 import { LightningElement,wire,track,api} from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
@@ -14,6 +14,8 @@
 import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
 import { updateRecord } from 'lightning/uiRecordApi';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
 export default class LexVOCSubmit extends LightningElement {
     @api recordId;
     createdById;
@@ -37,6 +39,9 @@
     }
     
     connectedCallback () {
+        Promise.all([
+            loadStyle(this, lwcCSS)
+           ]);
         console.log(this.recordId);
         init({
             recordId: this.recordId
diff --git a/force-app/main/default/lwc/modal/modal.css b/force-app/main/default/lwc/modal/modal.css
new file mode 100644
index 0000000..2e35b26
--- /dev/null
+++ b/force-app/main/default/lwc/modal/modal.css
@@ -0,0 +1,3 @@
+.modal-hidden {
+    display: none;
+  }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/modal/modal.html b/force-app/main/default/lwc/modal/modal.html
new file mode 100644
index 0000000..4ece7ae
--- /dev/null
+++ b/force-app/main/default/lwc/modal/modal.html
@@ -0,0 +1,47 @@
+<template>
+    <template if:true={showModal}>
+      <section
+        role="dialog"
+        tabindex="-1"
+        aria-labelledby="modal-heading-01"
+        aria-modal="true"
+        aria-describedby="modal-content-id-1"
+        class="slds-modal slds-fade-in-open"
+      >
+        <div class="slds-modal__container">
+          <header class="slds-modal__header">
+            <lightning-button-icon
+              class="slds-modal__close"
+              title="Close"
+              icon-name="utility:close"
+              icon-class="slds-button_icon-inverse"
+              onclick={handleDialogClose}
+            ></lightning-button-icon>
+  
+            <template if:true={hasHeaderString}>
+              <h2 class="slds-text-heading_medium slds-hyphenate header-string">
+                {header}
+              </h2>
+            </template>
+            <template if:false={hasHeaderString}>
+              <h2 class="slds-text-heading_medium slds-hyphenate header-slot">
+                <slot name="header"></slot>
+              </h2>
+            </template>
+  
+            <p class="slds-m-top_x-small modal-hidden">
+              <slot name="tagline" onslotchange={handleSlotTaglineChange}></slot>
+            </p>
+          </header>
+          <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
+            <slot></slot>
+          </div>
+  
+          <footer class="slds-modal__footer modal-hidden">
+            <slot name="footer" onslotchange={handleSlotFooterChange}></slot>
+          </footer>
+        </div>
+      </section>
+      <div class="slds-backdrop slds-backdrop_open"></div>
+    </template>
+  </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/modal/modal.js b/force-app/main/default/lwc/modal/modal.js
new file mode 100644
index 0000000..18d96ca
--- /dev/null
+++ b/force-app/main/default/lwc/modal/modal.js
@@ -0,0 +1,46 @@
+import { LightningElement, api, track } from "lwc";
+
+const CSS_CLASS = "modal-hidden";
+
+export default class Modal extends LightningElement {
+  @track showModal = false;
+  @api objName;
+  @api
+  set header(value) {
+    this.hasHeaderString = value !== "";
+    this._headerPrivate = value;
+  }
+  get header() {
+    return this._headerPrivate;
+  }
+
+  @track hasHeaderString = false;
+  _headerPrivate;
+
+  @api show() {
+    this.showModal = true;
+    console.log('show!!!!!!!!');
+    console.log(this.objName);
+  }
+
+  @api hide() {
+    this.showModal = false;
+  }
+
+  handleDialogClose() {
+    //Let parent know that dialog is closed (mainly by that cross button) so it can set proper variables if needed
+    const closedialog = new CustomEvent("closedialog");
+    this.dispatchEvent(closedialog);
+    this.hide();
+  }
+
+  handleSlotTaglineChange() {
+    const taglineEl = this.template.querySelector("p");
+    if (taglineEl && taglineEl.classList) taglineEl.classList.remove(CSS_CLASS);
+  }
+
+  handleSlotFooterChange() {
+    const footerEl = this.template.querySelector("footer");
+    if (footerEl && footerEl.classList) footerEl.classList.remove(CSS_CLASS);
+  }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/modal/modal.js-meta.xml b/force-app/main/default/lwc/modal/modal.js-meta.xml
new file mode 100644
index 0000000..ca5f792
--- /dev/null
+++ b/force-app/main/default/lwc/modal/modal.js-meta.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<LightningComponentBundle
+  xmlns="http://soap.sforce.com/2006/04/metadata"
+  fqn="modal"
+>
+    <apiVersion>48.0</apiVersion>
+    <isExposed>false</isExposed>
+    <targets>
+      <target>lightning__RecordPage</target>
+      <target>lightning__AppPage</target>
+      <target>lightning__HomePage</target>
+      <target>lightning__RecordAction</target>
+    </targets> 
+    <targetConfigs>
+      <targetConfig targets="lightning__RecordPage">
+       <supportedFormFactors>
+          <supportedFormFactor type="Small" />
+          <supportedFormFactor type="Large" />
+      </supportedFormFactors>
+      </targetConfig>
+    </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
index b62762f..cdae2ba 100644
--- a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-25 17:41:26
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-01 16:34:11
+ * @LastEditTime: 2023-09-27 17:36:59
 -->
 
 <!-- Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header -->
@@ -16,25 +16,28 @@
             <span style="color:red;font-size: 10px;">*</span>
             {label}</label>
     </template>
-    <div class="slds-combobox_container">
+    <div data-id="myinput" class="slds-combobox_container">
         <div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aria-expanded="true" aria-haspopup="listbox" role="combobox">
             <!-- Search Input -->
             <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
-                <lightning-input data-id="myinput" disabled={disabled} class="inputBox" placeholder={placeholder} onblur={blurEvent} onclick={showOptions} onkeyup={filterOptions} value={searchString} auto-complete="off" variant="label-hidden" id="combobox-id-1" required={isRequired}></lightning-input>
-                <lightning-icon class="slds-input__icon" icon-name="utility:down" size="x-small" alternative-text="search"></lightning-icon>
+                <lightning-input data-id="myinput" disabled={disabled} class="inputBox" placeholder={placeholder} onblur={blurEvent} onclick={showOptions} onkeyup={filterOptions} value={searchString} auto-complete="off" variant="label-hidden" id="combobox-id-1"></lightning-input>
+                <lightning-icon class="slds-input__icon slds-input__icon_right slds-icon-utility-down slds-icon_container" icon-name="utility:down" size="x-small" alternative-text="search"></lightning-icon>
             </div>
             <!-- Dropdown List -->
             <template if:true={showDropdown}>
-                <div id="listbox-id-1" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid"><!--style="{! 'max-height:' + (8 + (v.recordCount * 40)) + 'px' }""-->
+                <div id="listbox-id-1" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid"  role="listbox"><!--style="{! 'max-height:' + (8 + (v.recordCount * 40)) + 'px' }""-->
                     <ul class="slds-listbox slds-listbox_vertical recordListBox" role="presentation">
                         <template if:false={message} >
                             <template for:each={optionData} for:item="option">
                                 <template if:true={option.isVisible}>
                                     <li key={option.value} data-id={option.value} onmousedown={selectItem} class="slds-listbox__item eachItem">
-                                        <template if:true={option.selected}>
-                                            <lightning-icon icon-name="utility:check" size="x-small" alternative-text="icon" ></lightning-icon>
-                                        </template>
-                                        <span class="slds-media slds-listbox__option_entity verticalAlign slds-truncate">{option.label}</span>
+                                        <div id="option724" class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option">
+                                            <template if:true={option.selected}>
+                                                <lightning-icon icon-name="utility:check" size="x-small" alternative-text="icon" ></lightning-icon>
+                                            </template>
+                                            <span class="slds-media slds-listbox__option_entity verticalAlign slds-truncate">{option.label}</span>
+                                        </div>
+                                        
                                     </li>
                                 </template>
                             </template>
@@ -49,6 +52,9 @@
             </template>
         </div>
     </div>
+    <template if:true={errorFlag}>
+        <div style="color:#EA001E;font-size:10px">濉啓姝ゅ瓧娈点��</div>
+    </template>
     <!-- Multi Select Pills -->
     <template for:each={optionData} for:item="option">
         <template if:true={option.selected}>
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
index b96314d..ef794da 100644
--- a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.js
@@ -19,6 +19,7 @@
     @track message;
     @track showDropdown = false;
     @api placeholder = '--鏃�--';
+    @track errorFlag = false;
     connectedCallback() {
         this.showDropdown = false;
         var optionData = this.options ? (JSON.parse(JSON.stringify(this.options))) : null;
@@ -159,6 +160,17 @@
                 count++;
             }
         }
+        if(!previousLabel){
+            var element = this.template.querySelector('[data-id="myinput"]');
+            element.classList.add('slds-has-error');
+            this.errorFlag = true;
+            this.showDropdown = false;
+        }else{
+            var element = this.template.querySelector('[data-id="myinput"]');
+            element.classList.remove('slds-has-error');
+            this.errorFlag = false;
+            this.showDropdown = false;
+        }
         if(this.multiSelect)
         	this.searchString = count + ' Option(s) Selected';
         else
diff --git a/force-app/main/default/lwc/tEnquiry/tEnquiry.html b/force-app/main/default/lwc/tEnquiry/tEnquiry.html
index c620a8b..9407461 100644
--- a/force-app/main/default/lwc/tEnquiry/tEnquiry.html
+++ b/force-app/main/default/lwc/tEnquiry/tEnquiry.html
@@ -1,38 +1,74 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-09-09 13:28:00
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-09-23 12:14:01
+-->
 <template>
+  <!-- <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> -->
+  <!-- 鎴愬姛 -->
+  <div>
 
-      <!-- 鎴愬姛 -->
-      <div style="float:right" >
-        <div class="demo-only demo-only_viewport" style="height:4.5rem;" if:true = {Tongzhishow}>
-          <div class="slds-notification-container" style={IsLeftStyle} >
-            <div aria-live="assertive" aria-atomic="true" class="slds-assistive-text">鎻愮ず</div>
-            <section class="slds-notification" role="dialog" aria-labelledby="noti77" aria-describedby="dialog-body-id-43">
-              <div class="slds-notification__body" id="dialog-body-id-43">
-                <a class="slds-notification__target slds-media" href="#" style={BgColorStyle}>
-                  <span class="slds-icon_container slds-icon-standard-task slds-media__figure" title="task">
-                      <lightning-icon icon-name={TongzhiIcon} alternative-text="Account" title="Account"></lightning-icon>                  
-                  </span>
-                  <div class="slds-media__body">
-                    <h2 class="slds-text-heading_small slds-m-bottom_xx-small" id="noti77">
-                      <span class="slds-assistive-text">task notification:</span>鎻愮ず</h2>
-                    <p>{SaveShowText}</p>
-                  </div>
-                </a>
-                <button class="slds-button slds-button_icon slds-button_icon-container slds-notification__close" title="close">
-                    <lightning-icon icon-name="utility:close" alternative-text="close" title="close"  size="x-small" onclick={CloseAlert}></lightning-icon>     
-                </button>
+  </div>
+  <div>
+    <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">
+                  <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>
+                </div>
+                <div class="slds-notify__close">
+                  <lightning-button-icon icon-name="utility:close"  variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                </div>
               </div>
-            </section>
-  
-  
-          </div>
-        </div>
-        </div>
-    <div class="exampleHolder" if:true={IsLoading}>
-      <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
-    </div>
-    <div  style="height:600px;overflow:scroll;">
-      <div style="display:inline">
-        <!-- <div style="width:200px;float: left" >
+            </div>
+          <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+              <div class="slds-notify_container slds-is-relative">
+                  <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(46, 132, 74);" role="success">
+                  <div class="slds-align_absolute-center">
+                      
+                      
+                  </div>
+                  </div>
+              </div>
+          </div> -->
+      </template>
+      <template if:false={isSuccess}>
+          <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+              <div class="slds-notify_container slds-is-relative">
+                  <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(234, 0, 30);" role="success">
+                  <div class="slds-align_right">
+                     
+                     
+                      
+                  </div>
+                  </div>
+              </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">
+                  <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>
+                </div>
+                <div class="slds-notify__close"> 
+                  <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                </div>
+              </div>
+            </div>
+      </template>
+  </template>
+  </div>
+  <div class="exampleHolder" if:true={IsLoading}>
+    <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
+  </div>
+  <div style="height:600px;overflow:scroll;">
+    <div style="display:inline">
+      <!-- <div style="width:200px;float: left" >
           <label class="slds-form-element__label" for="select-02">璇环缂栫爜:</label>
           <div class="slds-form-element__control">
             <input type="text" style="width:200px" id="text-input-id-1" placeholder="璇疯緭鍏ヨ浠风紪鐮�" required="" onchange={handleXJBMFn}  aria-describedby="error-message-unique-id" class="slds-input" aria-invalid="true"  />
@@ -41,22 +77,25 @@
 
         </div> -->
 
-        <div style="width: 500px;float: left;margin-left: 10px;">
-          <!-- <div style="width: 450px;float: left;margin-left: 10px;"> -->
-          <!-- <c-jzlookupv3  data-parent-id="lookup1" label="鍏宠仈鍖婚櫌" placeholder="璇烽�夋嫨鍏宠仈鍖婚櫌.."  onsearchchange={onsearchchange} searchdata={searchdata} option={option} onselected={selectedFn}>  </c-jzlookupv3> -->
+      <div style="width: 500px;float: left;margin-left: 10px;">
+        <!-- <div style="width: 450px;float: left;margin-left: 10px;"> -->
+        <!-- <c-jzlookupv3  data-parent-id="lookup1" label="鍏宠仈鍖婚櫌" placeholder="璇烽�夋嫨鍏宠仈鍖婚櫌.."  onsearchchange={onsearchchange} searchdata={searchdata} option={option} onselected={selectedFn}>  </c-jzlookupv3> -->
 
-          <c-jzlookuplightning   data-parent-id="lookup1"  onsearchchange={onsearchchange1} objectname="Tender_information__c" fieldname="Hospital__c"  >   </c-jzlookuplightning>
-   
-        </div>
-       
+        <c-jzlookuplightning data-parent-id="lookup1" onsearchchange={onsearchchange1}
+          objectname="Tender_information__c" fieldname="Hospital__c"> </c-jzlookuplightning>
+
       </div>
 
-       <button style="margin-top:24px" class="slds-button slds-button_brand" onclick={SearchFn}>妫�绱�</button>
-
-      <button style="margin-top:24px" class="slds-button slds-button_brand" onclick={SaveFn}>淇濆瓨</button>
-  
-      <c-jz-table data-parent-id="table1" selecttitle={selecttitle} notselecttitle={notselecttitle} selectdata={selectdata} isselectedtable={isselectedtable} optionsdata={optionsdata} notselectdata={notselectdata} ondatachange={datachange} onselectedchange={selectedchange} onurlclick={urlClickFn}> </c-jz-table>
-      
     </div>
 
+    <button style="margin-top:24px" class="slds-button slds-button_brand" onclick={SearchFn}>妫�绱�</button>
+
+    <button style="margin-top:24px" class="slds-button slds-button_brand" onclick={SaveFn}>淇濆瓨</button>
+
+    <c-jz-table data-parent-id="table1" selecttitle={selecttitle} notselecttitle={notselecttitle}
+      selectdata={selectdata} isselectedtable={isselectedtable} optionsdata={optionsdata} notselectdata={notselectdata}
+      ondatachange={datachange} onselectedchange={selectedchange} onurlclick={urlClickFn}> </c-jz-table>
+
+  </div>
+
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/tEnquiry/tEnquiry.js b/force-app/main/default/lwc/tEnquiry/tEnquiry.js
index 5b368af..768845f 100644
--- a/force-app/main/default/lwc/tEnquiry/tEnquiry.js
+++ b/force-app/main/default/lwc/tEnquiry/tEnquiry.js
@@ -17,8 +17,8 @@
 
 import SearchAccountById from '@salesforce/apex/InspectCheckController.SearchAccountById';
 
-
-
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader'
 import GetInspectById from '@salesforce/apex/InspectCheckController.GetInspectById';
 export default class test02 extends LightningElement {
 
@@ -33,22 +33,56 @@
     TongzhiIcon = 'standard:account' //鎻愮ず妗嗙殑鍥炬爣
     IsLeftStyle = "" //鎻愮ず妗嗙殑鏍峰紡
     BgColorStyle = "" 
+    toastTime = null;
+    isSuccess = false;
+    message;
+    visible;
+    closeAction(){
+        this.visible = false;
+    }
+    showToast(msg,type) {
+        try {
+            if(type == 'success'){
+                this.isSuccess = true;
+            }else{
+                this.isSuccess = false;
+            }
+            this.message = msg;
+            this.visible = true;
+            let delay = 5000;
+            console.log(this.message);
+            console.log('1');
+            // setTimeout(() => {
+            //     this.visible = false;
+            // }, delay ); 
+        } catch (error) {
+            console.log(error);
+        }
+
+        
+    }
     Alert(content,error = false,left = false){
+        this.Tongzhishow = false
+        clearTimeout(this.toastTime)
         this.SaveShowText = content;
         this.Tongzhishow = true;
         
         if (error) {
-            this.TongzhiIcon = "standard:first_non_empty";
-            this.BgColorStyle = "background-color:#f88568";
+            this.TongzhiIcon = "utility:error";
+            this.BgColorStyle = "background-color:#ba0517 !important;padding: 9px 9px 9px 18px;";
         }else{
-            this.TongzhiIcon = "standard:account";
-            this.BgColorStyle = "background-color:#69e669";
+            this.TongzhiIcon = "utility:success";
+            this.BgColorStyle = "background-color:rgb(46, 132, 74)!important;padding: 9px 9px 9px 18px;";
+            toastTime = setTimeout(() => {
+               this.Tongzhishow = false
+            },3000)
         }
-        if (left) {
-            this.IsLeftStyle = "left: 0.25rem;"
-        }else{
-            this.IsLeftStyle = ""
-        }
+        // if (left) {
+        //     // this.IsLeftStyle = "left: 0.25rem;"
+            this.IsLeftStyle = "width: 100%;top: 14%;display: flex;justify-content: center;"
+        // }else{
+        //     this.IsLeftStyle = "color:#fff"
+        // }
     }
     CloseAlert()
     {
@@ -74,7 +108,9 @@
         return(false);
     }
     connectedCallback(){
-              
+        Promise.all([
+            loadStyle(this, lwcCSS)
+        ]);
        var paramId =  this.getQueryVariable('id');
        if (paramId == null || paramId == '') {
            return ;
@@ -145,7 +181,8 @@
                 if (isloading == 2) {
                     this.OnLoading(false);
                     if (flag) {
-                        this.Alert("淇濆瓨鎴愬姛",false,true);
+                        // this.Alert("淇濆瓨鎴愬姛",false);
+                        this.showToast('淇濆瓨鎴愬姛','success');
                     }
                 }
             })
@@ -165,7 +202,8 @@
                 if (isloading == 2) {
                     this.OnLoading(false);
                     if (flag) {
-                        this.Alert("淇濆瓨鎴愬姛",false,true);
+                        // this.Alert("淇濆瓨鎴愬姛",false);
+                        this.showToast('淇濆瓨鎴愬姛','success');
                     }
                 }
                
@@ -178,6 +216,11 @@
     //table 鍒楄〃鐨勬暟鎹�
     @track  optionsdata=[
         {
+            label:"鐘舵��1",
+            props:"StageName__c",
+            Type:"text",
+        },
+        {
             label:"璇环鍚嶇О",
             props:"Name",
             url:"Id",
@@ -187,12 +230,6 @@
             label:"璇环缂栫爜",
             props:"Opportunity_No__c",
             Type:"text",
-        },
-        {
-            label:"瀹㈡埛鍚�",
-            props:"Account_Name_F__c",
-            url:"Id",
-            Type:"url",
         },
         {
             label:"璇环闃舵",
@@ -205,10 +242,14 @@
             Type:"text",
         },
         {
-            label:"鐘舵��1",
-            props:"StageName__c",
-            Type:"text",
+            label:"瀹㈡埛鍚�",
+            props:"Account_Name_F__c",
+            url:"Id",
+            Type:"url",
         },
+        
+        
+        
        
     ]
 
@@ -302,7 +343,8 @@
             isloading ++;
             if (isloading == 2) {
                 this.OnLoading(false);
-                this.Alert("淇濆瓨鎴愬姛",false,true);
+                // this.Alert("淇濆瓨鎴愬姛",false);
+                this.showToast('淇濆瓨鎴愬姛','success');
             }
         })
         
@@ -314,7 +356,8 @@
             isloading ++;
             if (isloading == 2) {
                 this.OnLoading(false);
-                this.Alert("淇濆瓨鎴愬姛",false,true);
+                // this.Alert("淇濆瓨鎴愬姛",false);
+                this.showToast('淇濆瓨鎴愬姛','success');
             }
         })
     }
@@ -328,7 +371,8 @@
         var flag =  this.compareSelected();
         if (flag == false) {
             this.OnLoading(false);
-            this.Alert("鍖婚櫌涓嶅尮閰嶏紝淇濆瓨澶辫触锛�",true);
+            // this.Alert("鍖婚櫌涓嶅尮閰嶏紝淇濆瓨澶辫触锛�",true);
+            this.showToast('鍖婚櫌涓嶅尮閰嶏紝淇濆瓨澶辫触锛�','error');
             return;
         }
         debugger;
@@ -345,9 +389,12 @@
                 this.UpdateDatas(this.notselected);
                 window.location.hash = "Refresh"+"=="+this.ParamIdStr;
                 this.OnLoading(false);
+                // this.Alert('淇濆瓨鎴愬姛',false);
+                this.showToast('淇濆瓨鎴愬姛','success');
             }else{
                 this.OnLoading(false);
-                this.Alert(response,true,false);
+                // this.Alert(response,true);
+                this.showToast(response,'error');
             }
      
         });
diff --git a/force-app/main/default/pages/AssetMaintain.page b/force-app/main/default/pages/AssetMaintain.page
index 1f261c9..6929f0c 100644
--- a/force-app/main/default/pages/AssetMaintain.page
+++ b/force-app/main/default/pages/AssetMaintain.page
@@ -2,8 +2,25 @@
 <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
 <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/> 
 <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
     <style>
+         .datePicker {
+            left: 805px !important;
+            width: 350px !important;
+        }
+        .label{
+            font-size: .75rem !important;
+        }
+        .labelCol{
+            font-size: .75rem !important;
+        }
+        .dataCol{
+            font-size: .75rem !important;
+        }
+        .textStyle{
+            font-size: 15px;
+        }
          /*20230815 ljh start*/
          table.mytable tr{
             height:45px;
@@ -35,7 +52,7 @@
         div#out_Div_R {
             position: relative;
             overflow: hidden;
-            width: 1200px;
+            width: 455px !important;
             margin-left: 686px;
         }
 
@@ -46,6 +63,7 @@
         }
         div#in_Div_R {
             position: relative;
+            width: 470px !important;
             overflow: auto;
             height: 451px;
             margin-left: 686px;
@@ -601,18 +619,18 @@
                 <apex:param name="csvMaintaintype" value="" />
             </apex:actionFunction>
             <apex:pageBlockSection columns="2">
-                <apex:outputField value="{!amHeader.Name}"/>
-                <apex:outputField value="{!amHeader.MaintainType__c}"/>
-                <apex:outputField value="{!amHeader.Submit_Time__c}" rendered="{!amHeader.MaintainType__c=='瀹炵墿鎶ュ簾'}"/>
-                <apex:outputField value="{!amHeader.Date__c}" rendered="{!amHeader.MaintainType__c!='瀹炵墿鎶ュ簾'}"/>
-                <apex:outputField value="{!amHeader.Status__c}"/>
-                <apex:outputField value="{!amHeader.Submit_Person__c}" rendered="{! amHeader.MaintainType__c=='瀹炵墿鎶ュ簾'|| ISBLANK(amHeader.MaintainType__c) }"/>
+                <apex:outputField styleClass="textStyle" value="{!amHeader.Name}"/>
+                <apex:outputField styleClass="textStyle" value="{!amHeader.MaintainType__c}"/>
+                <apex:outputField styleClass="textStyle" value="{!amHeader.Submit_Time__c}" rendered="{!amHeader.MaintainType__c=='瀹炵墿鎶ュ簾'}"/>
+                <apex:outputField styleClass="textStyle" value="{!amHeader.Date__c}" rendered="{!amHeader.MaintainType__c!='瀹炵墿鎶ュ簾'}"/>
+                <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:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User1__c.Label}"/>
-                        <apex:inputField value="{!amHeader.CC_User1__c}"/>
+                        <apex:inputField id="SalesName1" value="{!amHeader.CC_User1__c}"/>
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email1__c.Label}"/>
@@ -620,7 +638,7 @@
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User2__c.Label}"/>
-                        <apex:inputField value="{!amHeader.CC_User2__c}"/>
+                        <apex:inputField id="SalesName2" value="{!amHeader.CC_User2__c}"/>
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email2__c.Label}"/>
@@ -628,7 +646,7 @@
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User3__c.Label}"/>
-                        <apex:inputField value="{!amHeader.CC_User3__c}"/>
+                        <apex:inputField id="SalesName3" value="{!amHeader.CC_User3__c}"/>
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email3__c.Label}"/>
@@ -636,12 +654,12 @@
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User4__c.Label}"/>
-                        <apex:inputField value="{!amHeader.CC_User4__c}"/>
+                        <apex:inputField id="SalesName4" value="{!amHeader.CC_User4__c}"/>
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem />
                     <apex:pageBlockSectionItem >
                         <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User5__c.Label}"/>
-                        <apex:inputField value="{!amHeader.CC_User5__c}"/>
+                        <apex:inputField id="SalesName5" value="{!amHeader.CC_User5__c}"/>
                     </apex:pageBlockSectionItem>
                     <apex:pageBlockSectionItem />
                 </apex:pageBlockSection>
@@ -682,7 +700,139 @@
                     <apex:pageBlockSectionItem />
                 </apex:pageBlockSection>
             </apex:pageBlockSection>
+            <script>
+                let SelectFieldParamList=[ 
 
+                   { 
+
+                       //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id107:SalesName1', 
+
+                       //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+                       ObjectType : 'AssetMaintainHeader__c', 
+
+                       //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+                       QueryFieldApiName : 'CC_User1__c', 
+
+                       //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+                       SelectObj : 'User', 
+
+                       //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+                       SelectFld : 'Name', 
+
+                   }, 
+
+                   { 
+
+                       //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+                       inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id112:SalesName2', 
+
+                       //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+                       ObjectType : 'AssetMaintainHeader__c', 
+
+                       //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+                       QueryFieldApiName : 'CC_User2__c', 
+
+                       //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+                       SelectObj : 'User', 
+
+                       //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+                       SelectFld : 'Name', 
+
+                   }, { 
+
+                   //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id117:SalesName3', 
+
+                   //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+                   ObjectType : 'AssetMaintainHeader__c', 
+
+                   //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+                   QueryFieldApiName : 'CC_User3__c', 
+
+                   //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+                   SelectObj : 'User', 
+
+                   //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+                   SelectFld : 'Name', 
+
+                   }, { 
+
+                   //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id122:SalesName4', 
+
+                   //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+                   ObjectType : 'AssetMaintainHeader__c', 
+
+                   //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+                   QueryFieldApiName : 'CC_User4__c', 
+
+                   //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+                   SelectObj : 'User', 
+
+                   //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+                   SelectFld : 'Name', 
+
+                   }, { 
+
+                   //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+                   inputFieldId : 'allPage:allForm:pageBlockButton1:j_id105:j_id106:j_id125:SalesName5', 
+
+                   //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+                   ObjectType : 'AssetMaintainHeader__c', 
+
+                   //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+                   QueryFieldApiName : 'CC_User5__c', 
+
+                   //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+                   SelectObj : 'User', 
+
+                   //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+                   SelectFld : 'Name', 
+
+                   }, 
+                   ] 
+
+                   //鍒濆鍖� 
+
+                   resetOpenPage(SelectFieldParamList); 
+                   function unblockUI(){ 
+
+                       j$("#sbArea").fadeOut(500, function(){ 
+
+                           j$("#sbArea").remove(); 
+
+                       }); 
+
+                       resetOpenPage(SelectFieldParamList); 
+
+                   }
+               </script>
             <table border="0">
                 <tr>
                     <!-- <td style="width: 2%"></td> -->
@@ -772,7 +922,7 @@
                             else{
                                 reportId = "{!notScrappedReportId}";
                             }
-                            var url = `/lightning/r/Report/${reportId}?fv0=${maintainType}`;
+                            var url = `/lightning/r/Report/${reportId}/view?fv0=${maintainType}`;
                             window.open(url);
                         }
                     </script>
@@ -798,7 +948,10 @@
 
                         <apex:inputText id="abandonCountId" style="width: 90%"/>
                     </td>
-                    <td class="setButtonStyle"><apex:commandButton style="width: 70%" action="{!changeEditable}" value="缂栬緫" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" disabled="{!!editButtonActive}" /></td>
+                    <td class="setButtonStyle">
+                        <apex:commandButton style="width: 70%" action="{!changeEditable}" value="缂栬緫" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();resetOpenPage(SelectFieldParamList);" disabled="{!!editButtonActive}" />
+                        
+                    </td>
                     <td class="setButtonStyle">
                         <apex:commandButton style="width: 58%" value="閫傜敤" reRender="allForm" onclick="applyJs(); return false;" disabled="{!!editmode}"  />
                         <script type="text/javascript">
@@ -943,7 +1096,7 @@
                 </table>
             </div>
             <div id="out_Div_R">
-                <table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:700px; height: 30px;">
+                <table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:455px; height: 30px;">
                     <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                         <apex:variable value="{!0}" var="cnt" />
                         <apex:repeat value="{!amdRightLabelList}" var="t">
@@ -1219,7 +1372,7 @@
                 j$('select[id$=mlktp]').each(function() {
                     this.style.display="none";
                 })
-
+                
             </script>
         </apex:pageBlock>
     </apex:form>
diff --git a/force-app/main/default/pages/AssetMaintainDetail.page b/force-app/main/default/pages/AssetMaintainDetail.page
index 4c3f15a..5f9d606 100644
--- a/force-app/main/default/pages/AssetMaintainDetail.page
+++ b/force-app/main/default/pages/AssetMaintainDetail.page
@@ -3,10 +3,80 @@
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
     <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning -->
+    <style>
+        #in_Div
+        {
+            height: 310px !important;
+        }
+        #in_Div_L
+        {
+            height: 295px !important;
+        }
+        .headerRow{
+            height: 40px;
+        }
+        .headStyle td input{
+            width: 150px;
+        }
+
+        .headStyle td input.btn{
+            width: 70px;
+        }
+
+        .headStyle td{
+            padding-left: 30px;
+            padding-bottom: 10px;
+        }
+
+        body .bPageBlock .detailList .dataCol{
+            width: 18%;
+        }
+
+        body .bPageBlock .detailList .labelCol{
+            width: 8%;
+        }
+
+        table.list .col_Asset__r_Id {width:100px;}
+        table.list .col_Asset__r_Internal_asset_location__c{width:100px;}
+        table.list .col_Asset__r_Salesdepartment__c{width:100px;}
+        table.list .col_Asset__r_SalesProvince__c{width:100px;}
+        table.list .col_Asset__r_Fixture_Model_No_F__c{width:120px;}
+        table.list .col_Asset__r_Internal_Asset_number_key__c{width:100px;}
+        table.list .col_Asset__r_Internal_Asset_number__c{width:100px;}
+        table.list .col_Asset__r_SerialNumberLink__c{width:100px;}
+
+        table.list .col_Asset__r_Product_category__c {width:120px;}
+        table.list .col_Asset__r_Equipment_Type__c {width:100px;}
+        table.list .col_Asset__r_Consumable_Guaranteen_end__c {width:100px;} 
+        table.list .col_Asset__r_Manage_type__c {width:100px;}
+        table.list .col_Asset__r_Loaner_accsessary__c {width:100px;}
+        table.list .col_Asset__r_EquipmentSet_Managment_Code__c {width:100px;}
+        table.list .col_Asset__r_AssetManageConfirm__c {width:100px;}
+        table.list .col_Asset__r_Fixture_QRCode__c {width:100px;}
+        table.list .col_Asset__r_WH_location__c {width:100px;}
+        table.list .col_MaintainReason__c {width:100px;}
+        table.list .col_MaintainCount__c {width:100px;}
+        table.list .col_AbandonReason__c {width:100px;}
+        table.list .col_AbandonCount__c  {width:100px;}
+        table.list .col_Is_OneToOne_Accessory__c {width:120px;}
+        table.list .col_Asset__r_Main_OneToOne__c {width:100px;}
+        table.list .col_DisconnectCount__c {width:100px;}
+        table.list .col_Asset__r_Quantity {width:100px;}
+        table.list .col_Asset__r_You_Xiao_Ku_Cun__c {width:100px;}
+        table.list .col_Asset__r_Abandoned_RealThing__c {width:100px;}
+        table.list .col_Asset__r_Ji_Zhong_Guan_Li_Ku_Cun__c {width:100px;}
+        table.list .col_Asset__r_In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun_Sum__c {width:140px;}
+        table.list .col_Asset__r_Status {width:100px;}
+        table.list .col_Asset__r_Fixture_Status__c {width:100px;}
+        table.list .col_Asset__r_Frozen_Quantity__c {width:100px;}
+
+
+    </style>
     <apex:form id="allForm">
         <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm" oncomplete="windowResize();unblockUI();"/>
         <apex:pageBlock id="searchBlock" title="缁存姢鏄庣粏鐢婚潰">
-            <apex:pageBlockSection columns="2">
+            <apex:pageBlockSection columns="4">
                 <apex:outputField value="{!parentObj.Name}"/>
                 <apex:outputField value="{!parentObj.MaintainType__c}"/>
                 <apex:outputField value="{!parentObj.Submit_Time__c}" rendered="{!parentObj.MaintainType__c=='瀹炵墿鎶ュ簾'}"/>
@@ -16,42 +86,29 @@
             </apex:pageBlockSection>
             <apex:pageMessages />
             <table>
-                <tr>
-                    <td>鍏抽敭瀛�</td>
-                    <td>
-                        <apex:inputText value="{!keyword}"/>
-                        <apex:commandButton value="妫�绱�" onclick="blockme();searchOpp(); return false;"/>
-                    </td>
-                    <td>澶囧搧閰嶅鏄庣粏鍨嬪彿</td>
-                    <td><apex:inputText value="{!model}"/></td>
-                    <td>鍥哄畾璧勪骇缂栧彿</td>
-                    <td><apex:inputField value="{!ass.Internal_Asset_number__c}"/></td>
-                    <td>鏈鸿韩缂栫爜</td>
-                    <td><apex:inputField value="{!ass.SerialNumber}"/></td>
-                    <td>璐ф灦鍙�</td>
-                    <td><apex:inputField value="{!ass.WH_location__c}"/></td>
+                <tr class='headStyle'>
+                    <td>鍏抽敭瀛楋細<apex:inputText value="{!keyword}"/></td>
+                    <td>澶囧搧閰嶅鏄庣粏鍨嬪彿锛�<apex:inputText value="{!model}"/></td>
+                    <td>鍥哄畾璧勪骇缂栧彿锛�<apex:inputField value="{!ass.Internal_Asset_number__c}"/></td>
+                    <td>鏈鸿韩缂栫爜锛�  <apex:inputField value="{!ass.SerialNumber}" style="width:152px"/></td>
+                    <td>璐ф灦鍙凤細<apex:inputField value="{!ass.WH_location__c}"/></td>
+                    <td><apex:commandButton value="妫�绱�" onclick="blockme();searchOpp(); return false;"/></td>
                 </tr>
-                <tr>
-                    <td>澶囧搧瀛樻斁鍦�</td>
-                    <td><apex:inputField value="{!ass.Internal_asset_location__c}"/></td>
-                    <td>涓讳綋/闄勫睘鍝�</td>
-                    <td>
-                        <apex:selectList value="{!mainOrAccessory}" size="1">
+                <tr class='headStyle'>
+                    <td>澶囧搧瀛樻斁鍦帮細<apex:inputField value="{!ass.Internal_asset_location__c}" style="width:150px"/></td>
+                    <td>涓讳綋/闄勫睘鍝侊細
+                        <apex:selectList value="{!mainOrAccessory}" size="1" style="width:150px">
                             <apex:selectOptions value="{!mainOrAccessoryOptions}"/>
                         </apex:selectList>
                     </td>
-                    <td>鏄惁鍥哄畾璧勪骇</td>
-                    <td>
-                        <apex:selectList value="{!isInternalAsset}" size="1">
+                    <td>鏄惁鍥哄畾璧勪骇锛�
+                        <apex:selectList value="{!isInternalAsset}" size="1" style="width:150px">
                             <apex:selectOptions value="{!isInternalAssetOptions}"/>
                         </apex:selectList>
                     </td>
-                    <td>浜у搧鍒嗙被(GI/SP)</td>
-                    <td><apex:inputField value="{!ass.Product_category__c}"/></td>
-                    <td>澶囧搧鍒嗙被</td>
-                    <td><apex:inputField value="{!ass.Equipment_Type__c}"/></td>
-                    <td>绠$悊绉嶇被</td>
-                    <td><apex:inputField value="{!ass.Manage_type__c}"/></td>
+                    <td>浜у搧鍒嗙被(GI/SP)锛�<apex:inputField value="{!ass.Product_category__c}" style="width:150px"/></td>
+                    <td>澶囧搧鍒嗙被锛�<apex:inputField value="{!ass.Equipment_Type__c}"/></td>
+                    <td>绠$悊绉嶇被锛�<apex:inputField value="{!ass.Manage_type__c}"/></td>
                 </tr>
             </table>
         </apex:pageBlock>
diff --git a/force-app/main/default/pages/AssetMaintainIframe.page b/force-app/main/default/pages/AssetMaintainIframe.page
index 77aefd1..85ab5a3 100644
--- a/force-app/main/default/pages/AssetMaintainIframe.page
+++ b/force-app/main/default/pages/AssetMaintainIframe.page
@@ -37,10 +37,10 @@
                     <apex:commandButton styleClass="you-button" style="width: 100%;" value="鏁版嵁缁存姢" onclick="loadPage('/apex/AssetMaintain'); return false"/> 
                 </div>
                 <div style="margin-top:10px;">
-                    <apex:commandButton style="width: 100%" value="鏁版嵁缁存姢鍗�" onclick="window.open('/lightning/o/AssetMaintainHeader__c/list?filterName=Recent')"/> 
+                    <apex:commandButton style="width: 100%" value="鏁版嵁缁存姢鍗�" onclick="window.open('/lightning/o/AssetMaintainHeader__c/list?filterName=Recent'); return false"/> 
                 </div>
                 <div style="margin-top:10px;">
-                    <apex:commandButton style="width: 100%" value="缁存姢浜у搧涓绘暟鎹�" onclick="window.open('/lightning/o/Maintenance_Product_Data__c/list?filterName=Recent')"/> 
+                    <apex:commandButton style="width: 100%" value="缁存姢浜у搧涓绘暟鎹�" onclick="window.open('/lightning/o/Maintenance_Product_Data__c/list?filterName=Recent'); return false"/> 
                 </div>
             </div>
 
diff --git a/force-app/main/default/pages/CheckAllOlympusAsset.page b/force-app/main/default/pages/CheckAllOlympusAsset.page
index 00d4217..f52b4a8 100644
--- a/force-app/main/default/pages/CheckAllOlympusAsset.page
+++ b/force-app/main/default/pages/CheckAllOlympusAsset.page
@@ -4,6 +4,7 @@
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
     <style>
+        
         .dateFormat  {
             display: none;
         }
@@ -37,12 +38,12 @@
         div#in_Div_L {
             position: relative;
             width: 745px;
-            height: 451px;
+            height: 470px !important;
         }
         div#in_Div_R {
             position: relative;
             overflow: auto;
-            height: 451px;
+            height: 485px !important;
             margin-left: 686px;
             margin-top: -451px;
         }
@@ -163,6 +164,22 @@
         // 鏀瑰彉table灏哄
         var heightAjustment = 120;
         var widthAjustment = 30;
+
+        function showCalendar(inputId, position) {
+        // 浣跨敤jQuery UI DatePicker鎴栧叾浠栨棩鏈熼�夋嫨鍣ㄥ簱锛屽皢鏃ュ巻寮瑰嚭鍒版寚瀹氱殑浣嶇疆
+        // 杩欓噷鍋囪鎮ㄤ娇鐢ㄤ簡jQuery UI DatePicker浣滀负绀轰緥
+        $("#" + inputId).datepicker({
+            // 鍦ㄨ繖閲岄厤缃瓺atePicker鐨勯�夐」
+            // 姣斿锛岃缃棩鏈熼�夋嫨鍣ㄧ殑浣嶇疆
+            beforeShow: function(input, inst) {
+                inst.dpDiv.addClass(position);
+            }
+        });
+
+        // 鎵嬪姩瑙﹀彂鏃ユ湡閫夋嫨鍣ㄧ殑鏄剧ず
+        $("#" + inputId).datepicker('show');
+    }
+
         function windowResize() {
             blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - j$(escapeVfId('allPage:allForm:dataBlock:pageBlockButton1')).height() - j$('table#msg').height() - heightAjustment;
             sbwidth = scrollbarWidth();
@@ -203,6 +220,7 @@
                 j$('div#in_Div_R').css('width', (R_width-blockWidth-240 + sbwidth) + 'px');
             }
         }
+      
         // 鍏ㄩ�夊姛鑳�
         function selectAllJs() {
             j$(escapeVfId('checker')).prop('disabled', true);
@@ -588,7 +606,7 @@
                             <td class="blankStyle"></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)" />
+                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false);showCalendar('consumable_Guaranteen_endStr','right');" />
                             </td>
                             <td class="blankStyle"></td>
                         </tr>
diff --git a/force-app/main/default/pages/ConsumApplyBR.page b/force-app/main/default/pages/ConsumApplyBR.page
index db69438..40b049d 100644
--- a/force-app/main/default/pages/ConsumApplyBR.page
+++ b/force-app/main/default/pages/ConsumApplyBR.page
@@ -74,7 +74,7 @@
                 version.ContentLocation = 's';
                 version.PathOnClient= "BRCode-{!Consum_Apply__c.Name_No__c}.jpg";
                 var versionResult = sforce.connection.create([version]);
-                record = sforce.connection.query("SELECT ContentDocumentId FROM ContentVersion WHERE Id =\'" + versionResult[0].id + "\'");
+                record = sforce.connection.query("SELECT Id,ContentDocumentId FROM ContentVersion WHERE Id =\'" + versionResult[0].id + "\'");
                 var records = record.getArray("records");
                 var link = new sforce.SObject("ContentDocumentLink");
                 link.ContentDocumentId = records[0].ContentDocumentId;
@@ -85,14 +85,18 @@
 
                 var es = new sforce.SObject("Consum_Apply__c");
                 es.Id = "{!Consum_Apply__c.Id}";
-                es.BRId__c = records[0].ContentDocumentId;
+                es.BRId__c = records[0].Id;
                 result = sforce.connection.update([es]);
             //鐢宠涔︽洿鏂板け璐ョ殑璇濆啀娆℃洿鏂�
             } else if ("{!Consum_Apply__c.BRId__c}" == '' || "{!Consum_Apply__c.BRId__c}" == null) {
                 var records = record.getArray("records");
+                var version = new sforce.SObject("ContentVersion");
+                version = sforce.connection.query("select Id,ContentDocumentId from ContentVersion where ContentDocumentId = \'" + records[0].Id + "\'");
+                version = version.getArray("records"); 
+                // 瀛樺湪qr鏃讹紝缁戝埌鐢宠鍗曚笂
                 var es = new sforce.SObject("Consum_Apply__c");
                 es.Id = "{!Consum_Apply__c.Id}";
-                es.BRId__c = records[0].Id;
+                es.BRId__c = version[0].Id;
                 result = sforce.connection.update([es]);
                 // TODO Name澶夈倧銈嬪彲鑳芥�с亗銈娿�乽psert銇仐銇俱仚
             } else {
diff --git a/force-app/main/default/pages/DiscountProductApplication.page b/force-app/main/default/pages/DiscountProductApplication.page
index 4216343..4f06cef 100644
--- a/force-app/main/default/pages/DiscountProductApplication.page
+++ b/force-app/main/default/pages/DiscountProductApplication.page
@@ -5,6 +5,7 @@
 <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
 <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
 <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/> 
 <style>
     /*淇℃伅鎻愮ず棰滆壊*/
 body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
@@ -53,9 +54,10 @@
             if (flag == true) {
                 // var accid = j$(escapeVfId('dpaPage:dpaForm:dpaBlock:rawAccountId_lkid')).value();
                 var accid = j$(escapeVfId('dpaPage:dpaForm:dpaBlock:rawAccountId')).value();
-                openPopup('/apex/searchAimsAccount?accName='+accid, 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
+                var protype = j$(escapeVfId('dpaPage:dpaForm:dpaBlock:protype')).value();
+                openPopup('/apex/searchAimsAccount?accName='+accid+'&protype='+protype, 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
             }else{
-                openPopup('/apex/searchAimsAccount?accId={!dpa.RawAccount__c }', 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
+                openPopup('/apex/searchAimsAccount?accId={!dpa.RawAccount__c }&protype='+protype, 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
             }
 
         }
@@ -140,12 +142,17 @@
             // j$(escapeVfId('dpaPage:dpaForm:dpaBlock:tempid')).value() = 'tempid';
 
         }
-
+        function ProtypeChangeJs() {
+            blockme();
+            ProtypeChange();
+        }
+        
         //add by rentx 2021-2-20
     </script>
 
     <apex:form id="dpaForm" >
         <apex:actionFunction name="search" action="{!searchAllProduct2}" oncomplete="unblockUI();" reRender="ConsumableorderdetailsSection,message" />
+        <apex:actionFunction name="ProtypeChange" action="{!ProtypeChange}" oncomplete="unblockUI();" reRender="ConsumableorderdetailsSection,message" />
         <apex:pageBlock title="鐗逛环浜у搧鐢宠淇℃伅" id="dpaBlock" >
             <apex:pageBlockButtons location="top"  >
                 <apex:commandButton value="淇濆瓨" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" onclick="blockme();" style="margin-left:30px;width:100px;float: left;" action="{!savesaveDiscountProduct}" onComplete="unblockUI();CheckStatusAfter();" reRender="ConsumableorderdetailsSection,message"/>
@@ -156,37 +163,38 @@
                     <td align="left">
                         <!-- //update by rentx 2021-2-22 start -->
                         <apex:outputField rendered="{!!isPage}" value="{!dpa.RawAccount__c}" style="width:300px"/>
-                        <apex:inputField id="rawAccountId" rendered="{!isPage}" required="true" value="{!dpa.RawAccount__c}" />
+                        <apex:inputField id="rawAccountId" rendered="{!isPage}" required="true" value="{!dpa.RawAccount__c}" style="width:150px"/>
                         <!-- //update by rentx 2021-2-22 end -->
                     </td>
 
                     <td/>
+                    <!-- // DB202309406949 gzw start -->
+                    <td align="right" >浜у搧绫诲瀷锛�</td>
+                    <td>
+                        <apex:inputField id="protype" value="{!dpa.Product_Type__c}" style="width:150px" onchange="ProtypeChangeJs();return false;" rendered="{!IF(dpa.ApplicationStatus__c='鑽夋涓�' || dpa.ApplicationStatus__c=null,true,false)}"/>
+                        <apex:outputField id="protypeout" value="{!dpa.Product_Type__c}" style="width:150px" rendered="{!IF(!(dpa.ApplicationStatus__c='鑽夋涓�' || dpa.ApplicationStatus__c=null),true,false)}"/>
+                    </td>
                     <td align="right">鍖婚櫌锛�
                     </td>
                     <td width="100px"><apex:inputText id="AimsAccount" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" style="width:150px" value="{!AimsAccount}" onclick="searchAimsAccount1()"  
-                        onfocus="if (j$(escapeVfId('dpaPage:dpaForm:dpaBlock:tempid')).value() != 'tempId' && j$(escapeVfId('dpaPage:dpaForm:dpaBlock:tempid')).value() != '') {searchFn()}" />
+                        onfocus="if (j$(escapeVfId('dpaPage:dpaForm:dpaBlock:tempid')).value() != 'tempId' && j$(escapeVfId('dpaPage:dpaForm:dpaBlock:tempid')).value() != '') {searchFn()}"/>
                     </td>
                     <td style="display:none"><apex:inputText style="display:none" id="AimsAccountId" value="{!AimsAccountId}"/></td>
                     <td style="display:none"><apex:inputText style="display:none"  value="{!dpa.ApplicationStatus__c }"/></td>
                     <apex:inputHidden id="tempid" value="{!tempVal}"/>
-
-                    <td>
-                        <!-- <apex:commandButton value="淇濆瓨" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" onclick="blockme();" style="margin-left:30px;width:180px" action="{!savesaveDiscountProduct}" onComplete="unblockUI();CheckStatusAfter();" reRender="ConsumableorderdetailsSection,message"/> -->
-                        <!-- <apex:commandButton value="淇濆瓨" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" onclick="blockme();saveAimsAccountId();" style="margin-left:30px;width:180px" action="{!savesaveDiscountProduct}" onComplete="unblockUI();CheckStatusAfter();" reRender="ConsumableorderdetailsSection,message"/> -->
-                    </td>
+                    
                     <!-- <td/> -->
                 </tr>
                 <tr style="height: 10px" />
                 <tr>
                     <td align="right" >浜у搧鍚嶇О锛�</td>
-                    <td align="left"><apex:inputText disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" value="{!text1}" style="width:300"/>
+                    <td align="left"><apex:inputText disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" value="{!text1}" style="width:150px"/>
                     </td>
                     <td/>
                     <td align="right" >浜у搧缂栫爜锛�</td>
                     <td align="left"><apex:inputText disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" value="{!text2}" style="width:150px"/>
                     </td>
-                    
-                    <td><apex:commandButton value="妫�绱�" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" onclick="blockme();" style="margin-left:30px;width:100px" action="{!searchAllProduct2}" oncomplete="unblockUI();" reRender="ConsumableorderdetailsSection,message"/>
+                    <td colspan="2"><apex:commandButton value="妫�绱�" disabled="{!IF(dpa.ApplicationStatus__c='鐢宠涓�'||dpa.ApplicationStatus__c='鎵瑰噯'||dpa.ApplicationStatus__c='椹冲洖',true,false)}" onclick="blockme();" style="margin-left:30px;width:100px" action="{!searchAllProduct2}" oncomplete="unblockUI();" reRender="ConsumableorderdetailsSection,message"/>
                     </td>
                 </tr>
             </table>
@@ -260,4 +268,32 @@
                 </table>
              </apex:pageBlock>
     </apex:form>
+    <script>
+        let SelectFieldParamList=[ 
+
+{ 
+
+    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+    inputFieldId : 'dpaPage:dpaForm:dpaBlock:rawAccountId', 
+
+    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+    ObjectType : 'DiscountProductApplication__c', 
+
+    //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+    QueryFieldApiName : 'RawAccount__c', 
+
+    //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+    SelectObj : 'Account', 
+
+    //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+    SelectFld : 'Name' 
+
+}];
+resetOpenPage(SelectFieldParamList); 
+    </script>
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/Enquiry.page b/force-app/main/default/pages/Enquiry.page
index ce09ae1..78c3e5c 100644
--- a/force-app/main/default/pages/Enquiry.page
+++ b/force-app/main/default/pages/Enquiry.page
@@ -1,6 +1,11 @@
 <apex:page showHeader="false" sidebar="false" id="test02" title="3.鍏宠仈宸叉湁璇环">
     <apex:includeLightning />
     <div style="width:100%;height:100%;" id="test02Container" />
+    <style>
+        .slds-theme_error{
+            --lwc-colorBackgroundToastError: #ba0517 !important;
+        }
+    </style>
     <script>
         $Lightning.use("c:test02App", function () {
             $Lightning.createComponent("c:tEnquiry",
diff --git a/force-app/main/default/pages/ImprovedForecastTime.page b/force-app/main/default/pages/ImprovedForecastTime.page
index 2845c61..a3f9787 100644
--- a/force-app/main/default/pages/ImprovedForecastTime.page
+++ b/force-app/main/default/pages/ImprovedForecastTime.page
@@ -1,12 +1,14 @@
-<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉" lightningStylesheets="true">
+<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉">
     <apex:includeLightning />
     <div style="width:100%;height:100%;" id="ImprovedForecastTimeApp" />
 
     <script>
-        $Lightning.use("c:ImprovedForecastTimeApp", function () {
+        $Lightning.use("c:ImprovedForecastTimeAura", function () {
             $Lightning.createComponent("c:ImprovedForecastTime",
-                {},
-                "ImprovedForecastTimeApp",
+                {
+                    "recordId": getParam('id')
+                },
+                "ImprovedForecastTimeAura",
                 function (cmp) {
                     console.log('Component created, do something cool here');
                 });
@@ -21,6 +23,14 @@
                 clearInterval(interval);
             }
         },1000);
+        function getParam(paramName) {
+        paramValue = "", isFound = !1;
+        if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
+            arrSource = decodeURI(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
+            while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
+                }
+        return paramValue == "" && (paramValue = null), paramValue;
+        }
     </script>
 
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/ImprovedForecastTimeAno.page b/force-app/main/default/pages/ImprovedForecastTimeAno.page
index f794c37..95ad951 100644
--- a/force-app/main/default/pages/ImprovedForecastTimeAno.page
+++ b/force-app/main/default/pages/ImprovedForecastTimeAno.page
@@ -1,36 +1,64 @@
-<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉">
+<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉" lightningStylesheets="true">
     <apex:includeLightning />
     <div style="width:100%;height:100%;" id="ImprovedForecastTimeApp" />
-
+    <style>
+        .slds-theme_error{
+            --lwc-colorBackgroundToastError: #ba0517 !important;
+        }
+    </style>
     <script>
-        $Lightning.use("c:ImprovedForecastTimeApp", function () {
-            $Lightning.createComponent("c:ImprovedForecastTime",
-                {},
-                "ImprovedForecastTimeApp",
-                function (cmp) {
-                    console.log('Component created, do something cool here');
-                });
-        });
+        
+        init();
+        function init(){
+            var id = getParam('id');
+            console.log(id);
+            $Lightning.use("c:ImprovedForecastTimeApp", function () {
+                $Lightning.createComponent("c:lexImprovedForecastTimeNew",
+                    {
+                        'recordId': id
+                    },
+                    "ImprovedForecastTimeApp",
+                    function (cmp) {
+                        var errorMessageElement = document.getElementById('auraErrorMessage');
 
-        var interval = setInterval(()=>{
-            var hrefStr = window.location.href;
-            if (hrefStr.indexOf("Refresh") != -1) {
-                // var query = window.location.search.substring(1);
-                // var vars = query.split("&");
-                // var oppId = '';
-                // for (var i = 0; i < vars.length; i++) {
-                //     var pair = vars[i].split("=");
-                //     if (pair[0] == 'id') {
-                //         oppId = pair[1];
-                //     }
-                // }
-                // if (oppId != '') {
-                //     window.open('/'+oppId, '_self');
-                // }
-                top.window.close();
-                clearInterval(interval);
-            }
-        },1000);
+                    // 妫�鏌ユ槸鍚︽壘鍒颁簡鍏冪礌
+                    if (errorMessageElement) {
+                        // 闅愯棌鍏冪礌
+                        errorMessageElement.style.display = 'none';
+                    }
+                
+                    });
+            });
+        }
+       
+
+        // var interval = setInterval(()=>{
+        //     var hrefStr = window.location.href;
+        //     if (hrefStr.indexOf("Refresh") != -1) {
+        //         // var query = window.location.search.substring(1);
+        //         // var vars = query.split("&");
+        //         // var oppId = '';
+        //         // for (var i = 0; i < vars.length; i++) {
+        //         //     var pair = vars[i].split("=");
+        //         //     if (pair[0] == 'id') {
+        //         //         oppId = pair[1];
+        //         //     }
+        //         // }
+        //         // if (oppId != '') {
+        //         //     window.open('/'+oppId, '_self');
+        //         // }
+        //         top.window.close();
+        //         clearInterval(interval);
+        //     }
+        // },1000);
+        function getParam(paramName) {
+        paramValue = "", isFound = !1;
+        if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
+            arrSource = decodeURI(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
+            while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
+                }
+        return paramValue == "" && (paramValue = null), paramValue;
+        }
     </script>
 
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/InventoryReport.page b/force-app/main/default/pages/InventoryReport.page
index 0fd3cd5..97b36c8 100644
--- a/force-app/main/default/pages/InventoryReport.page
+++ b/force-app/main/default/pages/InventoryReport.page
@@ -3,6 +3,7 @@
 <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
 <apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/>
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/> 
     <style>
         .dateFormat  {
             display: none;
@@ -116,24 +117,12 @@
             width: 9%;
             padding: 5px;
         }
-        .labelStyle1{
-            width: 7%;
-        }
         .tdStyle-left {
             /*20220419 ljh HWAG-CAV5WX update */
             /*width: 16%;*/
             width: 11%;
             padding: 5px;
             text-align: left;
-        }
-        .tdStyle-left1{
-            width: 7.5%;
-            padding: 5px;
-            text-align: left;
-        }
-        .tdStyle-right1{
-            width: 9%;
-            padding: 5px;
         }
         .tdStyle-right {
             /*20220419 ljh HWAG-CAV5WX update */
@@ -206,7 +195,13 @@
         .requiredInput {
             position: relative;
             height: 100%;
+            display:inline-block;/*20230912 ljh add*/
         }
+        /* 20230912 ljh start */
+        .InventoryResult .requiredInput{
+            display:block;
+        }
+        /* 20230912 ljh end */
         .requiredBlock  {
             background-color: #c00;
             position: absolute;
@@ -215,14 +210,16 @@
             top: 1px;
             bottom: 1px;
         }
-                
-        body .pbBody table.list tr.headerRow td,body .pbBody table.list tr.headerRow th {
-            background: #f2f3f3;
-            border-width: 0 0 1px 1px;
-            border-color: #e0e3e5;
-            font-size: .9em;
-            font-weight: bold;
+        .my-left{
+            width: 49%;
+            padding: 5px;
+            text-align: left;
         }
+        /*20230921 ljh add start*/
+        body td.actionColumn:before { 
+            content: normal; 
+        }
+        /*20230921 ljh add end*/
     </style>
     <style type="text/css" media="print">
         .hiddenPrint{display:none !important;}
@@ -295,7 +292,7 @@
             window.open("{!$Label.Environment_Url}lightning/r/Report/{!diushiReportId}/view?fv1={!ihId}");
             // 20230907 ljh end
         }  
-        <!--20210525 you 1650  start-->
+        // <!--20210525 you 1650  start-->
         // 璋冩嫧鍑哄�熻褰�
         function transfer_chujie_report() {
             // 20230907 ljh start
@@ -310,7 +307,7 @@
             window.open("{!$Label.Environment_Url}lightning/r/Report/{!transferdiushiReportId}/view?fv1={!ihId}");
             // 20230907 ljh end
         }
-        <!--20210525 you 1650  end-->
+        // <!--20210525 you 1650  end-->
         // 鑰楁潗鍑哄�熻褰�
         function consum_chujie_report() {
             // 20230907 ljh start
@@ -333,19 +330,10 @@
             <apex:param value="" name="saveType"/>
         </apex:actionFunction>
         <apex:pageBlock id="searchBlock">
-            <!-- <apex:outputPanel layout="block" style="width: 13%; float: left;">
-                <apex:pageBlock mode="maindetail">
-                    <table style='width:140px; height: 80px'>
-                        <tr><td class="checkButtonStyle"><apex:commandButton value="鐩樼偣" rendered="{!!inventoryBlueFlag}" onclick="location.href='/apex/InventoryResultRecord'; return false"/></td></tr>
-                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="鐩樼偣" rendered="{!inventoryBlueFlag}"/></td></tr>
-                        <tr><td class="checkButtonStyle"><apex:commandButton value="澶囧搧鐩樼偣鎶ュ憡" rendered="{!!rentBlueFlag}" onclick="location.href='{!$Page.InventoryReport}'; return false" /></td></tr>
-                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="澶囧搧鐩樼偣鎶ュ憡" rendered="{!rentBlueFlag}"/></td></tr>
-                        <tr><td class="checkButtonStyle"><apex:commandButton value="鑰楁潗鐩樼偣鎶ュ憡" rendered="{!!consumBlueFlag}" onclick="location.href='{!$Page.InventoryReport}?isConsum=true'; return false" /></td></tr>
-                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="鑰楁潗鐩樼偣鎶ュ憡" rendered="{!consumBlueFlag}"/></td></tr>
-                    </table>
-                </apex:pageBlock>
-            </apex:outputPanel> -->
-            <apex:outputPanel id="RightArea" layout="block" style="margin: 0 20%;">
+            <!-- 20230912 ljh update -->
+            <!-- <apex:outputPanel id="RightArea" layout="block" style="margin: 0 20%;"> -->
+            <apex:outputPanel id="RightArea" layout="block" style="margin: 0 5%;" >
+            <!-- 20230912 ljh update end -->
                 <apex:outputPanel id="message" style="width: auto" >
                     <apex:pageMessages />
                 </apex:outputPanel>
@@ -359,63 +347,101 @@
                             rendered="{!canDoFlg}" />
                 </div>
                 <p style="margin:10px auto; width:100%; text-align: center; font-weight:bold; font-size:22px;">OCSM鍖荤枟澶囧搧绠$悊涓績{!IF(isConsum,'鑰楁潗','澶囧搧')}鐩樼偣鎶ュ憡涔�</p>
-                <table class="inventoryReportTable" style="width: 50%;">
+                <table class="inventoryReportTable" style="width: 100%;">
+                    <colgroup>
+                        <col width="49%"/>
+                        <col width="49%"/>
+                    </colgroup>
                     <tr>
-                        <td class="labelStyle">鐩樼偣閮ㄩ棬/鍒嗗叕鍙革細</td>
-                        <td class="labelStyle">{!inventoryDepartment}</td>
+                        <!-- 20230912 ljh update -->
+                        <td class="labelStyle">鐩樼偣閮ㄩ棬/鍒嗗叕鍙革細{!inventoryDepartment}</td>
+                        <!-- <td class="labelStyle">{!inventoryDepartment}</td> -->
                     </tr>
                     <tr>
-                        <td class="labelStyle">鐩樼偣鎶ュ憡涔︾紪鍙凤細</td>
-                        <td class="labelStyle" style="color: blue">{!ihObj.Name}</td>
+                        <!-- 20230912 ljh update -->
+                        <td class="labelStyle">鐩樼偣鎶ュ憡涔︾紪鍙凤細<span  style="color: blue">{!ihObj.Name}</span></td>
+                        <!-- <td class="labelStyle" style="color: blue">{!ihObj.Name}</td> -->
                     </tr>
                     <tr>
-                        <td class="labelStyle">鎻愪氦鎶ュ憡鏃ユ湡锛�</td>
-                        <td class="labelStyle">
+                        <!-- 20230912 ljh update -->
+                        <td class="labelStyle">鎻愪氦鎶ュ憡鏃ユ湡锛�<span class="labelStyle">
+                            <apex:outputText id="ivSubmitDate" value="{0,date,yyyy'/'MM'/'dd}">
+                                <apex:param value="{!ihObj.Inventory_Submit_Date__c}" />
+                            </apex:outputText>
+                            </span></td>
+                        <!-- <td class="labelStyle">
                         <apex:outputText id="ivSubmitDate" value="{0,date,yyyy'/'MM'/'dd}">
                             <apex:param value="{!ihObj.Inventory_Submit_Date__c}" />
                         </apex:outputText>
-                    </td>
+                        </td> -->
                     </tr>
                 </table>
                 <hr class="line" />
-                <table class="inventoryReportTable">
+                <table class="inventoryReportTable" width="100%">
                     <tr>
-                        <td class="labelStyle1">鐩樼偣鍦扮偣锛�</td>
-                        <td class="labelStyle">
+                        <!-- 20230912 ljh update -->
+                        <td class="my-left"><label>鐩樼偣鍦扮偣锛�</label> 
                             <apex:outputText id="ivLocation" value="{!ihObj.Internal_asset_location__c}" />
                         </td>
-                        <td class="labelStyle">寮�濮嬬洏鐐规椂闂达細</td>
-                        <td class="labelStyle">
+                        <!-- <td class="labelStyle">
+                            <apex:outputText id="ivLocation" value="{!ihObj.Internal_asset_location__c}" />
+                        </td> -->
+                        <td class="my-left"><label>寮�濮嬬洏鐐规椂闂达細</label>
                             <apex:outputText id="ivDate" value="{0,date,yyyy'/'MM'/'dd}">
                                 <apex:param value="{!ihObj.Inventory_Start_Date__c}" />
                             </apex:outputText>
                         </td>
+                        <!-- <td class="labelStyle">
+                            <apex:outputText id="ivDate" value="{0,date,yyyy'/'MM'/'dd}">
+                                <apex:param value="{!ihObj.Inventory_Start_Date__c}" />
+                            </apex:outputText>
+                        </td> -->
                     </tr>
                     <tr>
-                        <td class="labelStyle1">鐩樼偣鏃堕棿From锛�</td>
-                        <td class="labelStyle">
+                        <!-- 20230912 ljh update -->
+                        <td class="my-left" width="50%" ><label>鐩樼偣鏃堕棿From锛�</label>
                             <apex:inputField id="ivDateFrom" value="{!ihObj.Inventory_Date_From__c}"
-                                    required="{!DESC_RW1['Inventory_Date_From__c'] == 'wm'}"/>
+                                        required="{!DESC_RW1['Inventory_Date_From__c'] == 'wm'}" />
                         </td>
-                        <td class="labelStyle">鐩樼偣鏃堕棿To锛�</td>
-                        <td class="labelStyle">
+                        <!-- <td class="labelStyle">
+                            <apex:inputField id="ivDateFrom" value="{!ihObj.Inventory_Date_From__c}"
+                                    required="{!DESC_RW1['Inventory_Date_From__c'] == 'wm'}" />
+                        </td> -->
+                        <!-- 20230912 ljh update -->
+                        <td class="my-left" width="50%" ><label>鐩樼偣鏃堕棿To锛�</label>
+                            <apex:inputField id="ivDateTo" value="{!ihObj.Inventory_Date_To__c}"
+                                        required="{!DESC_RW1['Inventory_Date_To__c'] == 'wm'}" />
+                        </td>
+                        <!-- <td class="labelStyle">
                             <apex:inputField id="ivDateTo" value="{!ihObj.Inventory_Date_To__c}"
                                     required="{!DESC_RW1['Inventory_Date_To__c'] == 'wm'}" />
-                        </td>
+                        </td> -->
                     </tr>
                     <tr>
-                        <td class="labelStyle1">鐩樼偣浜哄憳锛�</td>
-                        <td class="labelStyle" colspan="3">
+                        
+                        <td colspan="2" aligh="left" style="padding: 5px;width:100%;"><label>鐩樼偣浜哄憳锛�</label><apex:inputField id="ivPIC" style="width: 90%;" value="{!ihObj.Inventory_Persons__c}"
+                            required="{!DESC_RW1['Inventory_Persons__c'] == 'wm'}" /></td>
+                        <!-- <td class="labelStyle" colspan="3">
                             <apex:inputField id="ivPIC" style="width: 100%;" value="{!ihObj.Inventory_Persons__c}"
                                     required="{!DESC_RW1['Inventory_Persons__c'] == 'wm'}" />
-                        </td>
+                        </td> -->
                     </tr>
                 </table>
                 <hr class="line" />
                 <table class="inventoryReportTable" width="100%" >
                     <tr>
-                        <td class="tdStyle-left1">鐩樼偣鎶ュ憡鎻愪氦浜猴細</td>
-                        <td class="tdStyle-left">
+                        <!-- 20230912 ljh update -->
+                        <td class="my-left"><label>鐩樼偣鎶ュ憡鎻愪氦浜猴細</label>
+                                <apex:inputField id="ivsubmitPIC" value="{!ihObj.InventorySubmit_PIC__c}"
+                                    required="{!DESC_RW1['InventorySubmit_PIC__c'] == 'wm'}" >
+    <script>
+    if( document.getElementById('allPage:allForm:searchBlock:ivsubmitPIC_mlktp')){
+        document.getElementById('allPage:allForm:searchBlock:ivsubmitPIC_mlktp').style.display="none" ;
+    }
+    </script>
+                                </apex:inputField>
+                        </td>
+                        <!-- <td class="tdStyle-left">
                             <apex:inputField id="ivsubmitPIC" value="{!ihObj.InventorySubmit_PIC__c}"
                                 required="{!DESC_RW1['InventorySubmit_PIC__c'] == 'wm'}" >
 <script>
@@ -424,14 +450,15 @@
 }
 </script>
                             </apex:inputField>
-                        </td>
-                        <td class="tdStyle-right1">鑱屼綅锛�</td>
-                        <td class="tdStyle-left">
+                        </td> -->
+                        <td class="my-left"><label>鑱屼綅锛�</label><apex:outputText id="ivsubmitPICPost" value="{!ihObj.InventorySubmit_PIC__r.Post__c}" /></td>
+                        <!-- <td class="tdStyle-left">
                             <apex:outputText id="ivsubmitPICPost" value="{!ihObj.InventorySubmit_PIC__r.Post__c}" />
-                        </td>
+                        </td> -->
                     </tr>
                     <tr>
-                        <td class="tdStyle-left1">鐩樼偣鎶ュ憡纭浜猴細</td>
+                        <!-- 20230912 ljh update -->
+                        <!-- <td class="tdStyle-left">鐩樼偣鎶ュ憡纭浜猴細</td>
                         <td class="tdStyle-left">
                             <apex:inputField id="ivcheckPIC" value="{!ihObj.InventoryCheck_PIC__c}"
                                 required="{!DESC_RW1['InventoryCheck_PIC__c'] == 'wm'}" >
@@ -442,9 +469,21 @@
 </script>
                             </apex:inputField>
                         </td>
-                        <td class="tdStyle-right1">鑱屼綅锛�</td>
+                        <td class="tdStyle-right">鑱屼綅锛�</td>
                         <td class="tdStyle-left">
                             <apex:outputText id="ivcheckPICPost" value="{!ihObj.InventoryCheck_PIC__r.Post__c}" />
+                        </td> -->
+                        <td class="my-left"><label>鐩樼偣鎶ュ憡纭浜猴細</label>
+                            <apex:inputField id="ivcheckPIC" value="{!ihObj.InventoryCheck_PIC__c}"
+                                required="{!DESC_RW1['InventoryCheck_PIC__c'] == 'wm'}" >
+<script>
+if( document.getElementById('allPage:allForm:searchBlock:ivcheckPIC_mlktp')){
+    document.getElementById('allPage:allForm:searchBlock:ivcheckPIC_mlktp').style.display="none" ;
+}
+</script>
+                            </apex:inputField>
+                        </td>
+                        <td class="my-left"><label>鑱屼綅锛�</label><apex:outputText id="ivcheckPICPost" value="{!ihObj.InventoryCheck_PIC__r.Post__c}" />
                         </td>
                     </tr>
                 </table>
@@ -484,7 +523,7 @@
                         <apex:commandButton styleClass="hiddenPrint" value="鑰楁潗娑堣�楄褰�"  onclick="consum_xiaohao_report(); return false;" />
                     </apex:outputPanel>
                 </div>
-                <apex:outputPanel id="InventoryResult">
+                <apex:outputPanel id="InventoryResult" styleClass="InventoryResult">
                     <table style="{!IF(isConsum,'display: none;','')}" class="inventoryReportTable" border="1px">
                         <tr>
                             <th class="labelStyle">鍥哄畾璧勪骇</th>
@@ -610,4 +649,63 @@
     <apex:outputPanel styleClass="hiddenPrint" id="process">
         <apex:relatedList list="ProcessSteps" ></apex:relatedList>
     </apex:outputPanel>
+    <script>
+    let SelectFieldParamList=[ 
+
+{ 
+
+    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+    inputFieldId : 'allPage:allForm:searchBlock:ivsubmitPIC', 
+
+    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+    ObjectType : 'Inventory_Header__c', 
+
+    //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+    QueryFieldApiName : 'InventorySubmit_PIC__c', 
+
+    //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+    SelectObj : 'User', 
+
+    //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+    SelectFld : 'Name', 
+
+}, 
+
+{ 
+
+    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+    inputFieldId : 'allPage:allForm:searchBlock:ivcheckPIC', 
+
+    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+    ObjectType : 'Inventory_Header__c', 
+
+    //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+    QueryFieldApiName : 'InventoryCheck_PIC__c', 
+
+    //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+    SelectObj : 'User', 
+
+    //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+    SelectFld : 'Name', 
+
+}, 
+
+
+
+] 
+
+//鍒濆鍖� 
+
+resetOpenPage(SelectFieldParamList); 
+    </script>
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/LostEditPage1.page b/force-app/main/default/pages/LostEditPage1.page
index 5f23335..f94e058 100644
--- a/force-app/main/default/pages/LostEditPage1.page
+++ b/force-app/main/default/pages/LostEditPage1.page
@@ -9,7 +9,7 @@
             var ReportId = getParam('id');
             if(!ReportId){
                 alert('鎶ュ憡娌℃湁ID锛岃閲嶈瘯锛�');
-                window.open('/006/o','_self');
+                window.open('/006/o');
                 return;
             }
             sforce.connection.sessionId = '{!GETSESSIONID()}';
@@ -40,7 +40,7 @@
             if(getParam('retURL') != null){
                 str += '&retURL='+getParam('retURL');
             }
-            window.open(str,'_self');
+            window.open(str);
         }
         function getParam(paramName) {
             paramValue = "", isFound = !1;
@@ -54,7 +54,7 @@
         //澶卞崟鎶ュ憡鐨処D
         var ReportId = getParam('id');
         var str = '/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId=' + ReportId;
-        window.open(str,'_self');
+        window.open(str);
     
         }
     </script>
diff --git a/force-app/main/default/pages/LostViewPage1.page b/force-app/main/default/pages/LostViewPage1.page
index bd14ee6..6f1a11e 100644
--- a/force-app/main/default/pages/LostViewPage1.page
+++ b/force-app/main/default/pages/LostViewPage1.page
@@ -9,7 +9,7 @@
         console.log('1');
         var ReportId = getParam('id');
         if(!ReportId){
-            window.open('/006/o','_self');
+            window.open('/006/o');
             return;
         }
         sforce.connection.sessionId = '{!GETSESSIONID()}';
@@ -38,7 +38,7 @@
          if(getParam('retURL') != null){
             str += '&retURL='+getParam('retURL');
         }
-          window.open(str,'_self');
+          window.open(str);
     }
     function getParam(paramName) {
         paramValue = "", isFound = !1;
@@ -52,7 +52,7 @@
         //澶卞崟鎶ュ憡鐨処D
         var ReportId = getParam('id');
         var str = '/apex/PCLLostReportPageLwc?pageStatus=View&reportId=' + ReportId;
-        window.open(str,'_self');
+        window.open(str);
         
         
        }
diff --git a/force-app/main/default/pages/MaintenanceProductData.page b/force-app/main/default/pages/MaintenanceProductData.page
index 12b55ae..9a4f350 100644
--- a/force-app/main/default/pages/MaintenanceProductData.page
+++ b/force-app/main/default/pages/MaintenanceProductData.page
@@ -3,6 +3,7 @@
 <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
+<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/> 
 <style type="text/css">
 /*淇℃伅鎻愮ず棰滆壊*/
 body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
@@ -992,7 +993,8 @@
                     <td style="width: 30px;"></td>
                     <!-- <td colspan="{!IF(RecordTypeName = 'GuranteePrice'|| RecordTypeName ='GuranteeMain', 12,12)}"></td> -->
                     <!-- <td align="right"></td> -->
-                    <td colspan="2" align="right"><apex:commandButton value="浜у搧鎼滅储" style="width: 100px;" onclick="searchProductJs();return false;" reRender="mpdDetailsSection" /></td>
+                    <td colspan="2" align="right"><apex:commandButton value="浜у搧鎼滅储" style="width: 100px;" onclick="searchProductJs();" reRender="mpdDetailsSection" oncomplete="refreshinput();"/></td>
+                    
                     <td colspan="2" align="left" style="padding-left:20px; "><input type="button" value="娓呯┖" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td>
                     <td colspan="{!IF(RecordTypeName = 'GuranteePrice'|| RecordTypeName ='GuranteeMain', 2,4)}"></td>
                     
@@ -1083,10 +1085,16 @@
                         </span>
                     </td>
                     <td><input type="checkbox" id="GuranteeMain8" /></td>
-                    <td></td>
-                    <td></td>
-                    <td></td>
-                    <td></td>
+                    <!-- <apex:repeat value="{!title}" var="t">
+                        <td></td>
+                    </apex:repeat> -->
+                    <!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'GuranteeMain',true , false)}">
+                        
+                        <td></td>
+                        <td></td>
+                        <td></td>
+                    </apex:outputPanel> -->
+                    
                     <!-- <td></td>
                     <td>
                         <input  name="Intra_Trade_Service_RMB" id="GuranteeMain5" size="20" type="number" value="" disabled="true" />
@@ -1263,7 +1271,7 @@
 
         <apex:outputPanel id="allPanel">
             <apex:pageBlock id="allBlock" >
-                <apex:pageblocksection title="{!IF(editAble,'浜у搧涓绘暟鎹淮鎶�','浜у搧涓绘暟鎹淮鎶�(钃濊壊涓烘柊鍊�)')}" id="edmpdDetails" rendered="{!IF(mpdDetailsRecordsCount >0,true,false)}" html-style="width: 100%;overflow:auto;">
+                <apex:pageblocksection title="{!IF(editAble,'浜у搧涓绘暟鎹淮鎶�','浜у搧涓绘暟鎹淮鎶�(钃濊壊涓烘柊鍊�)')}" id="edmpdDetails" rendered="{!IF(mpdDetailsRecordsCount >0,true,false)}" html-style="width: 100%;max-height:210px;;overflow:auto;">
                 <apex:outputLabel style="width: 100%;">
                 <input type="hidden" id="allPage:allForm:allBlock:edmpdDetails:mpdDetailsRecordsCount" value="{!mpdDetailsRecordsCount}" />
                     <table class="list" border="0" cellpadding="0" cellspacing="0">
@@ -1341,7 +1349,7 @@
                                 </apex:repeat>
                                 <apex:variable var="type" value="" rendered="{!IF(editAble&&!(RecordTypeName='GuranteeMain'&&mpd.Status__c='鏈嶅姟濉啓'),true,false)}"> 
                                 <td class="dataCell" >
-                                    <apex:commandButton onclick="deleteJs('{!aa.mpded.id}');return false;" value="鍒犻櫎" style="width:60px" rerender=""/>
+                                    <apex:commandButton onclick="deleteJs('{!aa.mpded.id}');" value="鍒犻櫎" style="width:60px" rerender=""/>
                                 </td>
                                 </apex:variable>
                             </tr>
@@ -1416,9 +1424,91 @@
                             </apex:repeat>
                         </tr>
                         </apex:repeat>
+                        
                     </table>
                     </div>
                     </apex:variable>
+                    <input type="hidden" id="ProductCnt" value="{!noOfRecords}" />
+    <script type="text/javascript">
+    function refreshinput1(){
+    // 澶嶆潅缁勪欢 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';
+            console.log('xxx');
+            console.log('123');
+            var cnt = j$(escapeVfId('ProductCnt')).val();
+            console.log('count=' + cnt);
+            for (var i = 0; i < cnt; i++) {
+                inputFieldId = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:13:variable:theValue';
+                inputFieldId_lktp = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:13:variable:theValue_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:mpdDetailsSection:save:maintenanceProductDatadetailsTable:' + i + ':theRepeat:13:variable:theValue_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 refreshinput2(){
+    // 澶嶆潅缁勪欢 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';
+            console.log('xxx');
+            console.log('123');
+            var cnt = j$(escapeVfId('ProductCnt')).val();
+            console.log('count=' + cnt);
+            for (var i = 0; i < cnt; i++) {
+                inputFieldId = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:14:variable:theValue';
+                inputFieldId_lktp = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:14:variable:theValue_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:mpdDetailsSection:save:maintenanceProductDatadetailsTable:' + i + ':theRepeat:14:variable:theValue_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 refreshinput3(){
+    // 澶嶆潅缁勪欢 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);
+            for (var i = 0; i < cnt; i++) {
+                inputFieldId = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:4:variable:theValue';
+                inputFieldId_lktp = 'allPage:allForm:allBlock:mpdDetailsSection:save:maintenanceProductDatadetailsTable:'+ i +':theRepeat:4:variable:theValue_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:mpdDetailsSection:save:maintenanceProductDatadetailsTable:' + i + ':theRepeat:4:variable:theValue_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();
+    </script>
                 </apex:pageBlock>
             </apex:pageBlock>
         </apex:outputPanel>
@@ -1436,5 +1526,85 @@
         </apex:pageBlockTable> 
     </apex:pageBlock>
     <apex:relatedList list="ProcessSteps" rendered="{!!editAble}" ></apex:relatedList>
+    <script type="text/javascript">
+            //鏌ヨ鍙傛暟鍒楄〃 
+
+            let SelectFieldParamList=[ 
+
+    { 
+
+        //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+        inputFieldId : 'allPage:allForm:searchAndMoreUpdate0:RepairInfo14', 
+
+        //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+        ObjectType : 'Maintenance_Product_Data_Details__c', 
+
+        //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+        QueryFieldApiName : 'Service_Category6__c', 
+
+        //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+        SelectObj : 'Service_Category6__c', 
+
+        //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+        SelectFld : 'Name', 
+
+    }, 
+
+    { 
+
+        //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+        inputFieldId : 'allPage:allForm:searchAndMoreUpdate0:RepairInfo15', 
+
+        //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+        ObjectType : 'Maintenance_Product_Data_Details__c', 
+
+        //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+        QueryFieldApiName : 'Service_Category7__c', 
+
+        //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+        SelectObj : 'Service_Category7__c', 
+
+        //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+        SelectFld : 'Name', 
+
+    }, { 
+
+    //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙� 
+
+    inputFieldId : 'allPage:allForm:searchAndMoreUpdate0:EquipmentInfo5', 
+
+    //鏌ユ壘瀛楁鎵�鍦ㄥ璞� 
+
+    ObjectType : 'Maintenance_Product_Data_Details__c', 
+
+    //鏌ユ壘瀛楁鐨刟pi鍚嶇О 
+
+    QueryFieldApiName : 'Default_Fixture_Arrival_Product__c', 
+
+    //鏌ユ壘瀛楁鐨勬煡鎵惧璞� 
+
+    SelectObj : 'Product2', 
+
+    //鎼滅储鏃朵娇鐢ㄧ殑瀛楁 
+
+    SelectFld : 'Name', 
+
+    }, 
     
+    ] 
+
+    //鍒濆鍖� 
+    
+    resetOpenPage(SelectFieldParamList); 
+    </script>
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/MergeAgencyActivity.page b/force-app/main/default/pages/MergeAgencyActivity.page
index bfcc279..afe7827 100644
--- a/force-app/main/default/pages/MergeAgencyActivity.page
+++ b/force-app/main/default/pages/MergeAgencyActivity.page
@@ -23,36 +23,40 @@
 <apex:outputPanel id="message">
     <apex:pageMessages />
 </apex:outputPanel>
-<table>
-    <tr>
-        <td colspan="2">
-            <font>缁忛攢鍟嗘洿鍚�</font>
-        </td>
-    </tr>
-    <tr>
-        <td>鏃х粡閿�鍟嗙鐞嗙紪鐮� 锛� </td>
-        <td><apex:inputText id="oldAgencyCode" value="{!oldAgencyCode}"/></td>
-    </tr>
-    <tr>
-        <td>鏂扮粡閿�鍟嗙鐞嗙紪鐮� 锛� </td>
-        <td><apex:inputText id="newAgencyCode" value="{!newAgencyCode}"/></td>
-    </tr>
-    <tr>
-        <td>鍏佽鏂扮粡閿�鍟嗕笅瀛樺湪鏁版嵁 锛� </td>
-        <td><apex:inputCheckbox id="forceFlg" value="{!forceFlg}"/></td>
-    </tr>
-    <tr>
-        <td><input type="button" value="纭畾" onclick="startJobJs();return false;" /></td>
-    </tr>
-    <tr>
-        <td colspan="2">
-            <apex:outputPanel layout="none" rendered="{!startFlg}">
-            <!-- <font>缁忛攢鍟嗘洿鍚�</font> -->
-                <font>宸茬粡寮�濮婤atch</font><a href="/apexpages/setup/listAsyncApexJobs.apexp">鐐规</a><font>鏌ョ湅鍏蜂綋淇℃伅</font>
-            </apex:outputPanel>
-        </td>
-    </tr>
-</table>
+<div style="padding-left: 36%;padding-top: 30px;">
+    <table style="height: 200px">
+        <tr>
+            <td colspan="2">
+                <font>缁忛攢鍟嗘洿鍚�</font>
+            </td>
+        </tr>
+        <tr>
+            <td>鏃х粡閿�鍟嗙鐞嗙紪鐮� 锛� </td>
+            <td><apex:inputText id="oldAgencyCode" value="{!oldAgencyCode}"/></td>
+        </tr>
+        <tr>
+            <td>鏂扮粡閿�鍟嗙鐞嗙紪鐮� 锛� </td>
+            <td><apex:inputText id="newAgencyCode" value="{!newAgencyCode}"/></td>
+        </tr>
+        <tr style="height: 38.61px;">
+            <td>鍏佽鏂扮粡閿�鍟嗕笅瀛樺湪鏁版嵁 锛� </td>
+            <td><apex:inputCheckbox id="forceFlg" value="{!forceFlg}"/></td>
+        </tr>
+        <tr>
+            <td></td>
+            <td><input type="button" value="纭畾" onclick="startJobJs();return false;" style="float: right;width: 65%;display: inline-block;height: 30px;border-radius: .25rem;color: rgba(1, 118, 211, 1);background-color: white;border-width: 1px;border-color: rgb(201, 201, 201);border-style: double;" /></td>
+        </tr>
+        <tr>
+            <td colspan="2">
+                <apex:outputPanel layout="none" rendered="{!startFlg}">
+                <!-- <font>缁忛攢鍟嗘洿鍚�</font> -->
+                    <font>宸茬粡寮�濮婤atch</font><a href="/apexpages/setup/listAsyncApexJobs.apexp">鐐规</a><font>鏌ョ湅鍏蜂綋淇℃伅</font>
+                </apex:outputPanel>
+            </td>
+        </tr>
+    </table>
+</div>
+
 </apex:form>
 
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/OFSInsReportLayoutgzw.page b/force-app/main/default/pages/OFSInsReportLayoutgzw.page
new file mode 100644
index 0000000..089519f
--- /dev/null
+++ b/force-app/main/default/pages/OFSInsReportLayoutgzw.page
@@ -0,0 +1,789 @@
+<apex:page id="Page" showHeader="false" sidebar="false" controller="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}" lightningStylesheets="true">
+<!-- <apex:page id="Page" showHeader="false" sidebar="false" standardcontroller="Inspection_Item__c" extensions="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}"> -->
+<html>
+<head>
+    <meta name="viewport" content="width=1150,user-scalable=yes" />     <!-- TODO 1150銇偝銉炽儐銉炽儎銇箙 -->
+    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
+    <style type="text/css">
+        table#AssetTable select {
+            width: 98%;
+        }
+        table#AssetTableHeader .headerCell {
+            box-sizing: border-box;
+            padding: 2px 1px;
+        }
+        table#AssetTable .dataCell {
+            box-sizing: border-box;
+            padding: 1px 1px;
+        }
+        .bPageBlock .dataCol .requiredInput {
+            display: inline-table;
+        }
+        .bPageBlock .detailList .labelCol {
+            width: 1%;
+        }
+        .dateFormat  {
+            display: none;
+        }
+        
+    </style>
+    <script type="text/javascript">
+    	// function openLookup(){
+    	// 	var baseURL = '';
+	    // 	var ObjectType = 'Inspection_Item__c';
+	    // 	var QueryFieldApiName = 'Product_Manual__c';
+	    // 	var ObjectType = 'Inspection_Item__c';
+	    // 	var inputFieldId = '';
+	    // 	var SelectObj = 'Product2';
+	    // 	var SelectFld = 'Name';
+	    //     var cnt = j$(escapeVfId('ProductCnt')).val();
+	    //     for (var i = 0; i < cnt; i++) {
+	    //     	inputFieldId = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert';
+	    //     	baseURL = 'apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
+		//         // var obj = document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_lkwgt');
+		//         // obj.setAttribute('href', baseURL);
+		//         openPopup(baseURL, "lookup", 350, 480, "width=700"+",height=480,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no", true);
+	    // 	}
+    	// }
+
+        var tmpaid = "";
+        var tmpan = "";
+        var tmpahid = "";
+        var tmpahn = "";
+        var tmpadid = "";
+        var tmpadn = "";
+        var tmpaaid = "";
+        var tmpaan = "";
+        var tmpinsid = "";
+        var tmpinsn = "";
+        var tmprstr = "";
+        sforce.connection.sessionId = '{!$Api.Session_ID}';
+        function toggleIrNameDisabled(checker) {
+            if (checker.checked) {
+                j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", false);
+            } else {
+                j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", true);
+            }
+        }
+        function changeAllCheckResult(val) {
+            var cnt = j$(escapeVfId('ProductCnt')).val();
+            for (var i = 0; i < cnt; i++) {
+                if (val == ' ') {
+                    document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = '';
+                } else {
+                    document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = val;
+                }
+            }
+        }
+
+        function clearAndSearch() {
+            document.getElementById("Page:Form:Block:UnCheckSection:text1").value = "";
+            document.getElementById("Page:Form:Block:UnCheckSection:cond1").value = "equals";
+            document.getElementById("Page:Form:Block:UnCheckSection:val1").value = "";
+            blockme();
+            searchfunc();
+        }
+
+        function searchJs() {
+            blockme();
+            searchfunc();
+        }
+
+        function sortTableJs(key) {
+            blockme();
+            sortTablefunc(key);
+        }
+
+        function exchangeAssetJs() {
+            blockme();
+            exchangeAssetfunc();
+        }
+
+        function saveByRepairJs(aid, an, ahid, ahn, adid, adn, aaid, aan, rstr) {
+            tmpaid = aid;
+            tmpan = an;
+            tmpahid = ahid;
+            tmpahn = ahn;
+            tmpadid = adid;
+            tmpadn = adn;
+            tmpaaid = aaid;
+            tmpaan = aan;
+            tmprstr = rstr;
+    // 鐐规鍫卞憡鏇稿鏇淬仹銇嶃仾銇忋仸銈傘�佷慨鐞嗐倰浣溿倢銈嬶紵
+    if (tmpinsid == "") {
+        blockme();
+        saveByRepair();
+    } else {
+        openRepair();
+    }
+}
+
+function openRepair() {
+    // TODO 浠婂緦鎺$暘銉嗐兗銉栥儷銈掍娇銇凬ame銈掑彇寰椼�佺偣妞滃牨鍛婃浉銇竴鏅傜殑銇倐銇仹銇�
+    window.open('/a0J/e?retURL=%2F' + tmpaid + '&CF00N10000002Dx66_lkid=' + tmpahid + '&CF00N10000002Dx66=' + encodeURIComponent(tmpahn) + '&CF00N10000002Dx5t_lkid=' + tmpadid + '&CF00N10000002Dx5t=' + encodeURIComponent(tmpadn) + '&CF00N10000002Dx5n_lkid=' + tmpaaid + '&CF00N10000002Dx5n=' + encodeURIComponent(tmpaan) + '&CF00N10000002Dx1X_lkid=' + tmpaid + '&CF00N10000002Dx1X=' + encodeURIComponent(tmpan) + '&00N10000002FH86=' + encodeURIComponent(tmprstr) + '&CF00N10000006PRCp=' + encodeURIComponent(tmpinsn) + '&CF00N10000006PRCp_lkid=' + tmpinsid, '_blank');
+}
+//add by rentx 20210809 鍏ㄩ�夊姛鑳� start
+function checkAll(checker) {
+    var cnt = j$(escapeVfId('ProductCnt')).val();
+    for (var i = 0; i < cnt; i++) {
+        if (j$(escapeVfId('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1')).size() == 0) {
+            break;
+        }
+        document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1').checked = checker.checked;
+    }
+}
+function checkAll2(checker) {
+    var cnt = j$(escapeVfId('ProductCnt2')).val();
+    var tempi = parseInt(cnt / 900 )+1;
+    for (var j = 0; j < tempi; j++) {
+        for (var i = 0; i < 900; i++) {
+            if (j$(escapeVfId('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2')).size() == 0) {
+                break;
+            }
+            document.getElementById('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2').checked = checker.checked;
+        }
+    }
+    
+}
+//add by rentx 20210809 鍏ㄩ�夊姛鑳� end
+
+
+AWSService.sfSessionId = '{!GETSESSIONID()}';
+var staticResource = JSON.parse('{!staticResource}');
+var aws_data = {};
+var txid = null;
+function Encrypt(callback){
+    blockme();
+    //callback();return;
+    //<input type="hidden" value="{!ir.Id}" id="IrId"/>
+    let e_id = document.getElementById("IrId");
+    let url = staticResource.newUrl;
+
+    aws_data = {
+        "phone":j$("[field-api='phone__c']").val(),
+        "responsiblePerson":j$("[field-api='Responsible_Person__c']").val(),
+    };
+
+    if(e_id && e_id.value){
+        url = staticResource.updateUrl;
+        aws_data.dataId = document.getElementById("Page:Form:Block:AWS_Data_Id__c").value;
+    }
+
+    
+
+    AWSService.post(url, JSON.stringify([aws_data]), function(data){
+        
+        if (!(data && data.object && data.object.length)) {
+            console.log('AWSService.post failed');
+            return;
+        }
+        let aws_data1 = data.object[0];
+        txid = data.txId;
+
+        document.getElementById("Page:Form:Block:AWS_Data_Id__c").value = aws_data1.dataId;
+        j$("[field-api='phone__c']").val(aws_data1.phone);
+        j$("[field-api='Responsible_Person__c']").val(aws_data1.responsiblePerson);
+        
+        if (callback) {
+            callback();
+        }
+    }, staticResource.token);
+}
+
+function saveBtnJs(){
+    Encrypt(saveBtn);
+}
+function submitJs(){
+    Encrypt(submit);
+}
+function showPDFJs(){
+    Encrypt(showPDF);
+}
+
+function afterSaveBtnJs(){
+    Trans();
+}
+
+function afterSubmitJs(){
+    Trans();
+}
+
+function afterShowPDFJs(){
+    Trans(function(){
+        if (!HasError()) {
+            window.location.href = '/apex/InsReportPDFOuter?id=' + document.getElementById("IrId").value;
+        }
+        
+    });
+}
+
+function HasError(){
+    
+    // if (IsAddmessage) {
+    //     return true;
+    // }
+    let e = document.getElementById("Page:Form:MessageP");
+    if (!e) {
+        return false;
+    }
+
+    let divs = j$(e).find("div.message");
+    for (let i = 0; i < divs.length; i++) {
+        for (let j = 0; j < divs[i].classList.length; j++) {
+            for(let clsi in divs[i].classList){let cls=divs[i].classList[clsi];
+                if (typeof cls == 'string'  && cls.indexOf('error')>-1) {
+                    return true;
+                }
+            }
+            
+        }
+        
+    }
+
+
+    return false;
+}
+
+function Decrypt(data){
+    
+    j$("[field-api='phone__c']").val(data.phone);
+    j$("[field-api='Responsible_Person__c']").val(data.responsiblePerson);
+    
+    
+}
+
+function Trans(callback){
+    let payload = {
+        "txId":txid,
+        "sfRecordId":document.getElementById("IrId").value,
+        "isSuccess":(txid && !HasError()) ? 1 : 0
+    };
+    AWSService.post(staticResource.transactionUrl, JSON.stringify(payload), function(result){
+        Decrypt(aws_data);
+        if(callback)callback();
+        unblockUI();
+    }, staticResource.token);
+}
+
+function Query(){
+    let ele = document.getElementById("Page:Form:Block:AWS_Data_Id__c");
+    if (ele && ele.value) {
+        blockme();
+        AWSService.query(staticResource.queryUrl, ele.value, function(data){
+            if (data && data.object) {
+                Decrypt(data.object);
+            }
+            unblockUI();
+        }, staticResource.token);
+    }
+}
+
+j$(function(){
+    Query();
+})
+
+</script>
+<title>{!ir.Name}</title>
+</head>
+<body>
+    <!-- HWAG-B4Q3G5 20180918Start -->
+    <apex:form id="Form" style="margin:0 5px;" onkeydown="if(event.keyCode==13){return false;}">>
+    <!-- HWAG-B4Q3G5 20180918End -->
+    <script type="text/javascript">
+    // 淇濆瓨寰屻�佹柊瑕忋伄鍫卞憡鏇窱D銈掑彇寰�
+    tmpinsid = '{!ir.Id}';
+    tmpinsn = '{!JSENCODE(ir.Name)}';
+    //var IsAddmessage = {IsAddmessage};
+    var isPDF = {!isPDF};
+    
+</script>
+<apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="Form,Block,UnCheckSection" onComplete="unblockUI();"></apex:actionFunction>
+
+<apex:actionFunction name="exchangeAssetfunc" action="{!exchangeAsset}" rerender="Form" onComplete="unblockUI();"></apex:actionFunction>
+
+<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="Form" onComplete="unblockUI();">
+<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
+</apex:actionFunction>
+
+<apex:actionFunction name="getAssetFromHp" action="{!getAssetFromHp}" rerender="Form" onComplete="unblockUI();" />
+
+<apex:actionFunction name="saveByRepair" action="{!saveBtn}" rerender="Form" onComplete="unblockUI();openRepair();"/>
+
+<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="Form" onComplete="afterSaveBtnJs();"/>
+<apex:actionFunction name="submit" action="{!submit}" rerender="Form" onComplete="afterSubmitJs();"/>
+<apex:actionFunction name="showPDF" action="{!showPDF}" rerender="Form" onComplete="afterShowPDFJs();"/>
+
+<apex:outputPanel id="MessageP">
+<apex:pageMessages />
+</apex:outputPanel>
+
+
+<div><apex:pageBlock mode="maindetail" Id="Block" rendered="{!initFlag}">
+    <div style="position: relative;top:0;width:100%;">
+        <table>
+            <tr>
+                <td><apex:outputLabel value="{!$ObjectType.Inspection_Report__c.Label}:" style="font-size:18px;font-weight:bold;padding-right: 5px;"/></td>
+                <td>锛�<apex:inputCheckBox value="{!ir.Name_Manual__c}" id="Name_Manual" onchange="toggleIrNameDisabled(this);return false;"/>
+                    <apex:outputLabel value="{!$ObjectType.Inspection_Report__c.fields.Name_Manual__c.Label}" for="Name_Manual"/>锛�
+                    <apex:inputField value="{!ir.Name}" id="Ir_Name" html-disabled="disabled" style="border-width:0px;font-size:18px;font-weight:bold;padding-right:20px;-webkit-text-fill-color:black;"/>
+                </td>
+                <td style="text-align: center;padding-right: 100px;"><input class="btn" type="Button" style="width:80px;" value="淇濆瓨" action="" onclick="saveBtnJs();" rerender="Form" onComplete="unblockUI();"/></td>
+                <td style="text-align: center;padding-right: 100px;"><input class="btn" type="Button" value="鎻愪氦" action="" onclick="submitJs();" style="width:80px" rerender="Form" id="submitButton" onComplete="unblockUI();"/></td>
+                <td style="text-align: center;padding-right: 100px;"><apex:commandButton style="width:80px;" value="鍏抽棴绐楀彛" onclick="location.href='/apex/OFSWindowClose';return false;" id="closeButton"/></td>
+                <td style="text-align: center;"><input class="btn" type="Button" style="width:80px;" value="PDF" action="" onclick="showPDFJs();" rerender="Form" onComplete="unblockUI();"/></td>
+            </tr>
+        </table>
+        <apex:pageBlockSection title="{!sectionList[0].title}" columns="{!sectionList[0].column}" showHeader="{!sectionList[0].showHeader}" rendered="{!sectionList.size>0}">
+        <apex:repeat value="{!sectionList[0].sectionItemList}" var="sectionItem" id="SectionItemList">
+        <apex:outputField value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
+        <apex:inputField style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&sectionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
+        <apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}">
+        <apex:outputLabel value="{!sectionItem.customizeLable}"/>
+        <apex:outputPanel layout="none">
+        <apex:repeat value="{!sectionItem.apiList}" var="api">
+        <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
+        <apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
+        <apex:outputField value="{!ir[api]}"/>
+    </apex:outputPanel>
+    <apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
+    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
+    <apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
+    <apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
+    <apex:outputField value="{!ir[api]}"/>
+</apex:outputPanel>
+</apex:outputPanel>
+</apex:repeat>
+</apex:outputPanel>
+</apex:pageblockSectionItem>
+<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
+<apex:outputPanel layout="none">
+<apex:repeat value="{!sectionItem.apiList}" var="api">
+<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
+<apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
+<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
+<apex:outputField value="{!ir[api]}"/>
+</apex:outputPanel>
+</apex:repeat>
+</apex:outputPanel>
+</apex:pageblockSectionItem>
+<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
+</apex:repeat>
+</apex:pageBlockSection>
+</div>
+<div style="position: relative;top:0;height:700px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
+    <input type="hidden" value="{!ir.Id}" id="IrId"/>
+    <apex:inputHidden value="{!ir.AWS_Data_Id__c}" id="AWS_Data_Id__c"/>
+    
+    
+
+
+    <apex:repeat value="{!sectionList}" var="section" id="SectionList">
+    <apex:pageBlockSection title="{!section.title}" columns="{!section.column}" showHeader="{!section.showHeader}" rendered="{!!section.isTop}">
+    <apex:repeat value="{!section.sectionItemList}" var="sectionItem" id="SectionItemList">
+    <apex:outputField value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
+    <apex:inputField html-field-api="{!sectionItem.api}" style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&sectionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
+    <apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}">
+    <apex:outputLabel value="{!sectionItem.customizeLable}"/>
+    <apex:outputPanel layout="none">
+    <apex:repeat value="{!sectionItem.apiList}" var="api">
+    <!-- 淇濆瓨寰屻�佺梾闄€伅寮峰埗outputField -->
+    <apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
+    <apex:outputField value="{!ir[api]}"/>
+</apex:outputPanel>
+<apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
+<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
+<apex:inputField html-field-api="{!api}" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
+<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
+<apex:outputField value="{!ir[api]}"/>
+</apex:outputPanel>
+</apex:outputPanel>
+</apex:repeat>
+</apex:outputPanel>
+</apex:pageblockSectionItem>
+<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
+<apex:outputPanel layout="none">
+<apex:repeat value="{!sectionItem.apiList}" var="api">
+<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
+<apex:inputField html-field-api="api" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
+<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
+<apex:outputField value="{!ir[api]}"/>
+</apex:outputPanel>
+</apex:repeat>
+</apex:outputPanel>
+</apex:pageblockSectionItem>
+<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
+</apex:repeat>
+</apex:pageBlockSection>
+</apex:repeat>
+
+<script type="text/javascript">
+    // 鐥呴櫌銇乏鍋淬�屽埛鏂般�嶃儨銈裤兂杩藉姞
+    var labels = document.getElementsByTagName("label");
+    for (var i = 0; i < labels.length; i++) {
+        var lbl = labels[i];
+        if (lbl.innerText == "鍖婚櫌" || lbl.innerText == "鐥呴櫌") {
+            var html = lbl.parentNode.innerHTML;
+            html = "<input type='button' value='鍒锋柊' class='btn' onclick='blockme();getAssetFromHp();' />&nbsp;&nbsp;&nbsp;&nbsp;" + html;
+            lbl.parentNode.innerHTML = html;
+            break;
+        }
+    }
+</script>
+<apex:pageBlockSection title="宸查�変繚鏈夎澶囧瓧娈靛巻鍙�" columns="1" id="CheckSection">
+<input type="hidden" id="ProductCnt" value="{!productCount}" />
+
+<apex:outputPanel >
+<table width="100%">
+    <tr>
+        <td>&nbsp;</td>
+        <td width="100px">
+            <span>鍏�</span>
+            <select style="vertical-align:text-bottom" id="allCheckResult" size="1" onchange="changeAllCheckResult(this.value);">
+                <option value=" ">--鏃�--</option>
+                <!-- 榛樿鍏∣K -->
+                <option value="OK" selected = "selected" >OK</option>
+                <!-- 榛樿鍏∣K -->
+                <option value="NG">NG</option>
+                <!-- add by rentx 20210630 start -->
+                <option value="鍖婚櫌鏀惧純">鍖婚櫌鏀惧純</option>
+                <!-- add by rentx 20210630 end -->
+            </select>
+        </td>
+        <td width="500px">&nbsp;</td>
+    </tr>
+</table>
+<!-- TODO minus scroll with -->
+<table id="AssetTableHeader" class="list" style="border-bottom-width: 0px; font-size:13px;" border="0" cellspacing="0" cellpadding="0">
+    <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
+        <!-- add by rentx 20210809  -->
+        <th class="headerCell" style="width:14px"> <apex:inputCheckbox id="checkAll1" onclick="checkAll(this)" /> </th>
+        <!-- <th class="headerCell" style="width:14px" /> -->
+        <!-- add by rentx 202120809  -->
+        <th class="headerCell" style="width:24px"/>
+        <th class="headerCell" style="width:60px">{!$ObjectType.Asset.fields.Asset_situation__c.label}</th>
+        <th class="headerCell">{!$ObjectType.Asset.fields.Name.label}</th>
+        <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.SerialNumber__c.Label}</th>
+        <!-- TODO 闋呯洰銇綔鎴� -->
+        <th class="headerCell" style="width:80px">涓婃鐐规鏃�</th>
+        <th class="headerCell" style="width:100px">涓婃淇悊瀹屾瘯鏃�</th>
+        <th class="headerCell" style="width:80px">
+         {!$ObjectType.Inspection_Item__c.Fields.ItemStatus__c.Label}
+     </th>
+     <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification1__c.Label}</th>
+     <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification2__c.Label}</th>
+     <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification3__c.Label}</th>
+     <th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Diagnosis__c.Label}</th>
+     <!-- add by rentx 20210630  -->
+     <th class="headerCell" style="width:85px">{!$ObjectType.Inspection_Item__c.Fields.Abandonment_Reasons__c.Label}</th>
+     <!-- add by rentx 20210630 -->
+     <th class="headerCell" style="width:35px">{!$ObjectType.Asset.Fields.Create_repair__c.Label}</th>
+     <!--                                 <td class="headerScroll"></td> -->
+ </tr>
+</table>
+
+<div style="height:320px; width:100%; overflow:auto;">
+    <table style="border-collapse:collapse; width:100%;" id="AssetTable">
+        <apex:variable value="{!1}" var="cnt" />
+        <apex:repeat value="{!checkedInfoList}" var="cInfo" id="CheckedInfoList" >
+        <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
+            <td style="width:14px">
+                <apex:inputCheckbox value="{!cInfo.rec_checkBox_c}" id="AssetRowCheckbox1" rendered="{!Not(cInfo.IsManual)}"/>
+                <apex:outputText value="{!cInfo.IsManual}" id="IsManual" style="display:none;" />
+                <input type="hidden" value="{!cInfo.rec.Id}" id="CheckAssetId"/>
+            </td>
+            <td style="font-weight:bold; text-align:right; width:24px;">{!cnt}</td>
+            <td class="dataCell" style="width:60px">
+                <apex:outputField value="{!cInfo.rec.Asset_situation__c}"/>
+            </td>
+            <td class="dataCell">
+                <!-- HWAG-BDCA9J 娣诲姞浜� onclick blurProduct 鍐呭 start-->
+                <apex:outputField value="{!cInfo.rec.Name}" rendered="{!Not(cInfo.IsManual)}"/>
+                <apex:inputField value="{!cInfo.ah.Product_Manual__c}" id="Assert" style="width:90%;" rendered="{!cInfo.IsManual}"
+                onclick="if(!blurProduct(this))return false;"/>
+                <!-- HWAG-BDCA9J 娣诲姞浜� onclick  blurProduct 鍐呭 end-->
+            </td>
+            <td class="dataCell" style="width:100px">
+                <apex:outputField value="{!cInfo.ah.SerialNumber__c}" rendered="{!Not(cInfo.IsManual)}"/>
+                <apex:inputField value="{!cInfo.ah.SerialNo_Manual__c}" id="SerialNo" style="width:90%;" rendered="{!cInfo.IsManual}" />
+            </td>
+            <td class="dataCell" style="width:80px">
+                <apex:outputField value="{!cInfo.rec.Final_Examination_Date__c}" rendered="{!Not(cInfo.IsManual)}"/>
+            </td>
+            <td class="dataCell" style="width:100px">
+                <apex:outputField value="{!cInfo.rec.After_repair_last_internal_check_day__c}" rendered="{!Not(cInfo.IsManual)}"/>
+            </td>
+            <td class="dataCell" style="width:80px">
+                <apex:inputField value="{!cInfo.ah.ItemStatus__c}" id="AssetRowCheckboxIsNormal" style="width:98%"/>
+            </td>
+            <td class="dataCell" style="width:100px">
+                <apex:inputField value="{!cInfo.ah.Fault_Classification1__c}" />
+             </td>
+             <td class="dataCell" style="width:100px">
+                 <apex:inputField value="{!cInfo.ah.Fault_Classification2__c}" id="cat2" />
+             </td>
+             <td class="dataCell" style="width:100px">
+                 <apex:inputField value="{!cInfo.ah.Fault_Classification3__c}" id="cat3" />
+             </td>
+             <td class="dataCell" style="width:100px">
+                <apex:inputField value="{!cInfo.ah.Diagnosis__c}" style="width:93%"/>
+            </td>
+            <!-- add by rentx 20210630 -->
+            <td class="dataCell" style="width:85px">
+                <apex:inputField value="{!cInfo.ah.Abandonment_Reasons__c}"  style="width:93%"   />
+            </td>
+            <!-- add by rentx 20210630 -->  
+            <td class="dataCell" style="width:35px">
+                <apex:outputPanel layout="none" rendered="{!Not(cInfo.IsManual)}">
+                    <a href="#" onclick="saveByRepairJs('{!cInfo.rec.Id}', '{!JSENCODE(cInfo.rec.Name)}', '{!cInfo.rec.Hospital__r.Id}', '{!JSENCODE(cInfo.rec.Hospital__r.Name)}', '{!cInfo.rec.Department_Class__r.Id}', '{!JSENCODE(cInfo.rec.Department_Class__r.Name)}', '{!cInfo.rec.Account.Id}', '{!JSENCODE(cInfo.rec.Account.Name)}', '鍙慨鐞�');">鈻�</a>
+                </apex:outputPanel>
+            </td>
+        </tr>
+<apex:variable value="{!cnt + 1}" var="cnt" />
+</apex:repeat>
+</table>
+</div>
+</apex:outputPanel>
+
+</apex:pageBlockSection>
+
+<apex:outputPanel id="ButtonPanel">
+<table style="width:100%;">
+    <tr>
+        <td>
+            <apex:commandButton value="琛岃拷鍔�" action="{!addNewRows}" disabled="{!Not($ObjectType.Inspection_Item__c.createable)}"
+            style="margin-left:10px;float:left;" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" />
+            <apex:commandButton value="鍒锋柊閫変腑鐨勪繚鏈夎澶�" onclick="exchangeAssetJs();return false;" rerender="dummy"/>
+            <!-- <apex:commandButton value="鍒锋柊閫変腑鐨勪繚鏈夎澶�" action="{!exchangeAsset}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
+            <!--                                 <apex:commandButton value="鍒锋柊鍖婚櫌涓嬬殑鍏ㄩ儴淇濇湁璁惧" action="{!getAssetFromHp}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
+        </td>
+    </tr>
+</table>
+</apex:outputPanel>
+<table>
+    <tr>
+        <td><div id="ErrorName" style="color: red;font-weight: bold;">{!alertMessage}</div>
+        </td>
+    </tr>
+</table>
+<!-- HWAG-B4Q3G5 20180918Start -->
+<apex:pageBlockSection title="鏈�変繚鏈夎澶囧瓧娈靛巻鍙�" columns="1" id="UnCheckSection" onkeydown="if(event.keyCode==13){searchJs(); return false;}">
+<!-- HWAG-B4Q3G5 20180918End -->
+<input type="hidden" id="ProductCnt2" value="{!productCount2}" />
+<apex:outputPanel >
+<div align="center">
+    <apex:outputPanel id="countorder">绗瑊!countorder}椤�</apex:outputPanel>
+    <apex:commandButton value="涓婁竴椤�" action="{!UpPage}" onclick="blockme();" disabled="{!IF(countorder=1,true,false)}" oncomplete="unblockUI();" reRender="Form"/>
+    <apex:commandButton value="涓嬩竴椤�" action="{!DownPage}" onclick="blockme();" disabled="{!IF(countorder >=nowAssetcount ,true,false)}" oncomplete="unblockUI();" rerender="Form"/>
+    <apex:outputPanel id="NowOrdercount">鍏眥!nowAssetcount}椤�</apex:outputPanel>
+</div>
+
+<table>
+    <tr>
+        <td style="width:85px" align="right">閫夋嫨鏉′欢</td>
+        <td style="width:85px" align="right"><apex:selectList value="{!text1}" id="text1" size="1" style="width:80px"><apex:selectOptions value="{!textOpts}"/></apex:selectList></td>
+        <td style="width:85px" align="center"><apex:selectList value="{!cond1}" id="cond1" size="1" style="width:80px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList></td>
+        <td style="width:95px" align="left"><apex:inputText value="{!val1}" id="val1" style="width:100px"/></td>
+        <td align="left">
+            &nbsp;&nbsp;&nbsp;&nbsp;
+            <apex:commandButton value="妫�绱�" onclick="searchJs();return false;" style="width:130px" rerender="dummy"/>
+            &nbsp;&nbsp;
+            <apex:commandButton value="娓呴櫎鏉′欢" onclick="clearAndSearch();" style="width:130px" rerender="dummy"/>
+            &nbsp;&nbsp;
+            <span style="vertical-align: text-bottom;">浣跨敤涓�<apex:inputCheckBox value="{!activeOn}" /></span>
+        </td>
+    </tr>
+</table>
+<table style="border-collapse:collapse;" id="AssetTable2">
+    <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
+        <!-- add by rentx 20210809 start 鍏ㄩ�夊姛鑳�  -->
+        <!-- <th class="headerCell" style="width:25px"></th> -->
+        <th class="headerCell" style="padding: 2px 5px; width:25px"><apex:inputCheckbox id="checkAll1" onclick="checkAll2(this)" /> </th>
+        <!-- add by rentx 20210809 end 鍏ㄩ�夊姛鑳�  -->
+        <th class="headerCell" style="width:70px">
+            <a href="#" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_situation__c.label}</a>{!sortOrder[0]}
+        </th>
+        <th class="headerCell">
+            <a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Name.label}</a>{!sortOrder[1]}
+        </th>
+        <th class="headerCell" style="width:70px">
+            <a href="#" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.SerialNumber.label}</a>{!sortOrder[2]}
+        </th>
+        <th class="headerCell" style="width:70px">
+            <a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.CurrentContract__c.label}</a>{!sortOrder[3]}
+        </th>
+        <th class="headerCell" style="width:70px">
+            <a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Department_Name__c.label}</a>{!sortOrder[4]}
+        </th>
+        <th class="headerCell" style="width:70px">
+            <a href="#" onclick="sortTableJs('5');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Status.label}</a>{!sortOrder[5]}
+        </th>
+        <th class="headerCell" style="width:90px">
+            <a href="#" onclick="sortTableJs('6');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Installation_Site__c.label}</a>{!sortOrder[6]}
+        </th>
+        <th class="headerCell" style="width:90px">
+            <a href="#" onclick="sortTableJs('7');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Room_Number__c.label}</a>{!sortOrder[7]}
+        </th>
+        <th class="headerCell" style="width:90px">
+            <a href="#" onclick="sortTableJs('8');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.InstallDate.label}</a>{!sortOrder[8]}
+        </th>
+        <th class="headerCell" style="width:90px">
+            <a href="#" onclick="sortTableJs('9');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a>{!sortOrder[9]}
+        </th>
+        <th class="headerCell" style="width:90px">
+            <a href="#" onclick="sortTableJs('10');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Accumulation_Repair_Amount__c.label}</a>{!sortOrder[10]}
+        </th>
+    </tr>
+    <apex:variable value="{!1}" var="cnt" />
+    <apex:variable value="{!0}" var="cntOut" />
+    <apex:repeat value="{!IF(ThousandFLG>0,unCheckedInfoListForThousend,1)}" var="Thoinfo" id="unCheckedInfoListForThousend">
+    <apex:repeat value="{!IF(ThousandFLG>0,Thoinfo,unCheckedInfoList)}" var="ucInfo" id="UnCheckedInfoList" >
+
+    <tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
+        <td style="padding: 2px 5px; width:25px">
+            <apex:inputCheckbox value="{!ucInfo.rec_checkBox_c}" id="AssetRowCheckbox2"/>
+            <input type="hidden" value="{!ucInfo.rec.Id}" id="UncheckAssetId"/>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.Asset_situation__c}"/>
+        </td>
+        <td style="padding: 2px 5px;">
+            <a href="#" onclick="window.open('/{!ucInfo.rec.Id}', '_blank');">{!ucInfo.rec.Name}</a>
+            <!--                                     <apex:outputField value="{!ucInfo.rec.name}" id="assetName"/> -->
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.SerialNumber}"/>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <!--                                     <apex:outputField value="{!ucInfo.rec.CurrentContract__c}"/> -->
+            <a href="#" onclick="window.open('/{!ucInfo.rec.CurrentContract__c}', '_blank');">{!ucInfo.rec.CurrentContract__r.Management_Code__c}</a>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.Department_Name__c}"/>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.Status}"/>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.Installation_Site__c}"/>
+        </td>
+        <td style="padding: 2px 5px; width:70px">
+            <apex:outputField value="{!ucInfo.rec.Room_Number__c}"/>
+        </td>
+        <td style="padding: 2px 5px; width:90px;text-align:center">
+            <apex:outputField value="{!ucInfo.rec.InstallDate}"/>
+        </td>
+        <td style="padding: 2px 5px; width:90px">
+            <apex:outputField value="{!ucInfo.rec.Asset_Owner__c}"/>
+        </td>
+        <td style="padding: 2px 5px; width:90px;text-align:center">
+            <apex:outputField value="{!ucInfo.rec.Accumulation_Repair_Amount__c}"/>
+        </td>
+    </tr>
+    <apex:variable value="{!cnt + 1}" var="cnt" />
+</apex:repeat>
+<apex:variable value="{!cntOut + 1}" var="cntOut" />
+</apex:repeat>
+</table>
+</apex:outputPanel>
+</apex:pageBlockSection>
+<!-- fxk 2021/8/4 鏂板姞 Start-->
+<apex:pageBlockSection title="鎵撳嵃鏃舵礂娑堜俊鎭�" columns="1" id="UnCheckSection1" >
+<apex:outputPanel >
+<table class="edittable" border="0" style="border-collapse: collapse; width:600px; table-layout:fixed;">
+    <tr>
+        <td>{!$ObjectType.Inspection_Report__c.fields.CleaningFluid__c.Label}:</td>
+        <td><apex:inputField value="{!ir.CleaningFluid__c}" style="width: 90%"/></td>
+        <!-- 鏂瑰紡  add by rentx 20210927 start-->
+        <td>{!$ObjectType.Inspection_Report__c.fields.Mode__c.Label}:</td>
+        <td><apex:inputField value="{!ir.Mode__c}" style="width: 90%"/></td> 
+        <!-- 鏂瑰紡 add by rentx 20210927 end -->
+        <td>{!$ObjectType.Inspection_Report__c.fields.SterilizationMethod__c.Label}:</td>
+        <td><apex:inputField value="{!ir.SterilizationMethod__c}" style="width: 90%"/></td> 
+        <td>{!$ObjectType.Inspection_Report__c.fields.Remarks__c.Label}:</td>
+        <td><apex:inputText value="{!ir.Remarks__c}" style="width: 90%"/></td> 
+    </tr>
+    <tr>
+        <td>{!$ObjectType.Inspection_Report__c.fields.Disinfectant__c.Label}:</td>
+        <td><apex:inputField value="{!ir.Disinfectant__c}" style="width: 90%"/></td>
+        <td>{!$ObjectType.Inspection_Report__c.fields.UsedMachine__c.Label}:</td>
+        <td><apex:inputField value="{!ir.UsedMachine__c}" style="width: 90%"/></td>
+        <td>{!$ObjectType.Inspection_Report__c.fields.Used_ET__c.Label}:</td>
+        <td><apex:inputText value="{!ir.Used_ET__c}" style="width: 90%"/></td> 
+    </tr>
+</table>
+</apex:outputPanel>
+</apex:pageBlockSection>
+<!-- fxk 2021/8/4 鏂板姞 End-->
+</div>
+</apex:pageBlock></div>
+<script type="text/javascript">
+    // 宸茬瀛椼伄鍫村悎銆佸鏇翠笉鑳姐伀銇欍倠
+    var status = '{!ir.Status__c}';
+    if (status == "鐢宠涓�" || status == "鎵瑰噯") {
+        var inputs = document.getElementsByTagName("input");
+        for (var i = 0; i < inputs.length; i++) {
+            var obj = inputs[i];
+            
+            if (obj.id == "Page:Form:Block:closeButton") continue;
+            //if (obj.id == "Page:Form:Block:submitButton") continue;
+            //if (status == "宸茬瀛�" && obj.id == "Page:Form:Block:submitButton") continue;
+            
+            if (obj.type == "button") {
+                setButtonDisable(obj, true);
+            } else {
+                obj.disabled = true;
+            }
+        }
+        var selects = document.getElementsByTagName("select");
+        console.log(selects);
+        for (var i = 0; i < selects.length; i++) {
+            selects[i].disabled = true;
+        }
+    } else {
+        //var smb = j$(escapeVfId("Page:Form:Block:submitButton"))[0];
+        //setButtonDisable(smb, true);
+    }
+    // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 start
+    function blurProduct(obj) {
+        var irID = "{!ir.Id}";
+        var productCount2 = "{!productCount2}";
+        if(!irID && productCount2  == 0){
+            alert('璇峰厛杈撳叆鍖婚櫌骞剁偣鍑诲埛鏂版寜閽皟鍑轰繚鏈夎澶囷紝鍚﹀垯鐐规缁撴灉鏃犳硶涓庤澶囧叧鑱斻��');
+            obj.blur();
+            return false;
+        }
+        return true;
+    }
+    // HWAG-BDCA9J 鎻愰啋鏈繚瀛樺拰鍒锋柊鍓嶄笉鑳介�夋嫨浜у搧 end
+
+    // 澶嶆潅缁勪欢 start
+    	var baseURL = '';
+    	var ObjectType = 'Inspection_Item__c';
+    	var QueryFieldApiName = 'Product_Manual__c';
+    	var ObjectType = 'Inspection_Item__c';
+    	var inputFieldId = '';
+    	var inputFieldId_lktp = '';
+    	var SelectObj = 'Product2';
+    	var SelectFld = 'Name';
+        var cnt = j$(escapeVfId('ProductCnt')).val();
+        for (var i = 0; i < cnt; i++) {
+        	inputFieldId = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert';
+        	inputFieldId_lktp = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_lktp';
+        	baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
+	        var obj = document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_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
+    // }
+</script>
+</apex:form>
+</body>
+</html>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/OFSInsReportLayoutgzw.page-meta.xml b/force-app/main/default/pages/OFSInsReportLayoutgzw.page-meta.xml
new file mode 100644
index 0000000..f9ead2a
--- /dev/null
+++ b/force-app/main/default/pages/OFSInsReportLayoutgzw.page-meta.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>41.0</apiVersion>
+    <availableInTouch>false</availableInTouch>
+    <confirmationTokenRequired>false</confirmationTokenRequired>
+    <label>OFSInsReportLayoutgzw</label>
+</ApexPage>
diff --git a/force-app/main/default/pages/PCLLostReportPageLwc.page b/force-app/main/default/pages/PCLLostReportPageLwc.page
index 2e3b4c2..a572932 100644
--- a/force-app/main/default/pages/PCLLostReportPageLwc.page
+++ b/force-app/main/default/pages/PCLLostReportPageLwc.page
@@ -1,7 +1,19 @@
 <apex:page lightningStylesheets="true">
     <apex:includeLightning />
 
-    <div id="vfContainer"></div>
+    <div id="vfContainer" style="-webkit-overflow-scrolling: touch;overflow-y: scroll;"></div>
+    <style>
+        label {
+        color: black !important;
+        }
+        .aura-error-message {
+            display: none;
+        }
+        .slds-theme_error{
+            --slds-g-color-error-base-40: #ba0517 !important;
+            --lwc-colorBackgroundToastError: #ba0517 !important;
+        }
+    </style>
     <script>
         init();
         function init(){
@@ -20,6 +32,13 @@
                 },
                 "vfContainer",
                 function(cmp) {
+                    var errorMessageElement = document.getElementById('auraErrorMessage');
+
+                    // 妫�鏌ユ槸鍚︽壘鍒颁簡鍏冪礌
+                    if (errorMessageElement) {
+                        // 闅愯棌鍏冪礌
+                        errorMessageElement.style.display = 'none';
+                    }
                 }
             );
             });
diff --git a/force-app/main/default/pages/searchAimsAccount.page b/force-app/main/default/pages/searchAimsAccount.page
index 00a4939..85718ab 100644
--- a/force-app/main/default/pages/searchAimsAccount.page
+++ b/force-app/main/default/pages/searchAimsAccount.page
@@ -5,6 +5,8 @@
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
 <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+<!-- <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/> -->
+<!-- <apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/> -->
     <script>
     function setProductOne(name,id) {
        
@@ -21,7 +23,7 @@
         </apex:outputPanel>
         <apex:form id="mainForm">
             <apex:pageBlock id="idSearchSetProduct" title="鐗逛环鍖婚櫌閫夋嫨">
-                <table width="750" border="0">
+                <table width="750" border="0" style="background-color:#DCDCDC">
                     <colgroup>
                         <col width="12" />
                         <col width="20" />
@@ -32,7 +34,7 @@
                     </colgroup>
                     <tr>
                         <td>&nbsp;</td>
-                        <th style="width:7%">{!$Label.Search_Condition}</th>
+                        <th style="width:100px;">{!$Label.Search_Condition}</th>
                         <td>&nbsp;</td>
                         <th>鍖婚櫌鍚嶇О</th>
                         <td>&nbsp;</td>
@@ -43,25 +45,24 @@
                         <td>&nbsp;</td>
                         <td>&nbsp;</td>
                         <td><apex:inputText id="searchName" value="{!SearchName}" style="width:200px" required="false"/></td>
-                        <td>&nbsp;</td>
-                        <td><apex:commandButton value="{!$Label.Search}" action="{!serContact}" style="width:100px" /></td>
+                        <td><apex:commandButton value="{!$Label.Search}" action="{!serContact}" style="width:100px;margin-left: 20px;" /></td>
                         <td></td>
                     </tr>
                     <tr>
-                        <td colspan="15">&nbsp;</td>
+                        <td style="solid #888;" colspan="15">&nbsp;</td>
                     </tr>
                 </table>
-                <table width="750" border="0">
+                <table width="750" border="0" style="background-color:#DCDCDC">
                     <tr>
                         <td width="12">&nbsp;</td>
                         <th valign="top">{!$Label.Search_Result}</th>
                         <td width="20">&nbsp;</td>
                         <td>
-                            <table border="0">
+                            <table border="0" style="border-left: 0px;border-right: 0px;">
                                 <tr>
                                     <td>
-                                    <div id="iframelike" style="width:750">
-                                    <apex:pageBlockTable id="idRezultVisitor" value="{!at}" var="c" border="0" columns="3" columnsWidth="200px,100px,350px">
+                                    <div id="iframelike" style="width:665px">
+                                    <apex:pageBlockTable style="border-left: 0px;border-right: 0px;" id="idRezultVisitor" value="{!at}" var="c" border="1" columns="3" columnsWidth="200px,100px,350px">
                                         <apex:column >
                                             <apex:facet name="header">鍖婚櫌鍚嶇О</apex:facet>
                                             <apex:outputLink id="contactName" value="{!c.Name}" onclick="setProductOne('{!c.Name}','{!c.Id}');return false;">{!c.Name}</apex:outputLink>
diff --git a/force-app/main/default/pages/taskManage.page b/force-app/main/default/pages/taskManage.page
index 71696ac..903f3dc 100644
--- a/force-app/main/default/pages/taskManage.page
+++ b/force-app/main/default/pages/taskManage.page
@@ -14,4 +14,18 @@
  });
  });
  </script>
+ <style>
+    .slds-theme--error {
+        --slds-g-color-error-base-40: #ba0517 !important;
+    }
+    .slds-theme--success {
+        --slds-g-color-success-base-50: #2E844A !important;
+    }
+    .slds-theme--warning {
+        --slds-g-color-warning-base-60: #DD7A01 !important;
+    }
+    .slds-theme--info {
+        --slds-g-color-neutral-base-50: #747474 !important;
+    }
+ </style>
 </apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/staticresources/blockUIcss.css b/force-app/main/default/staticresources/blockUIcss.css
index 5f6c572..149e83e 100644
--- a/force-app/main/default/staticresources/blockUIcss.css
+++ b/force-app/main/default/staticresources/blockUIcss.css
@@ -26,4 +26,19 @@
 	top:0px;
 	z-index:100;
 	background-color:#000000;
+}
+
+.spinner {
+	border: 4px solid rgba(0, 0, 0, 0.1);
+	border-top: 4px solid #3498db;
+	border-radius: 50%;
+	width: 40px;
+	height: 40px;
+	animation: spin 2s linear infinite;
+	margin: 0 auto;
+}
+
+@keyframes spin {
+	0% { transform: rotate(0deg); }
+	100% { transform: rotate(360deg); }
 }
\ No newline at end of file
diff --git a/force-app/main/default/triggers/AttachmentTrigger.trigger b/force-app/main/default/triggers/AttachmentTrigger.trigger
index 22f8390..ffcb790 100644
--- a/force-app/main/default/triggers/AttachmentTrigger.trigger
+++ b/force-app/main/default/triggers/AttachmentTrigger.trigger
@@ -576,7 +576,7 @@
                     oFOrder.LatestUploadUser__c = null;
                     oFOrder.LatestUploadTime__c = null;
                 }
-            }銆�
+            }
 
             update oFOrderList;
 
diff --git a/force-app/main/default/triggers/ContentDocumentLink.trigger b/force-app/main/default/triggers/ContentDocumentLink.trigger
index c185284..2d1bd06 100644
--- a/force-app/main/default/triggers/ContentDocumentLink.trigger
+++ b/force-app/main/default/triggers/ContentDocumentLink.trigger
@@ -1,4 +1,31 @@
-trigger ContentDocumentLink on ContentDocumentLink (before insert,after insert,after delete, before update, after update) {
+trigger ContentDocumentLink on ContentDocumentLink (before insert,after insert,before delete) {
+    if(StaticParameter.ContentDocumentLink == false){
+        return;
+    }
+    if((!Test.isRunningTest())&&UserInfo.getUserId()==System.Label.ByPassTrigger){
+        return;
+    }
+//     if (Trigger.isAfter && Trigger.isInsert) {
+//         Set<Id> Ids = new Set<id>();
+//         Map<Id,ContentDocumentLink> mapcvwithid = new Map<Id,ContentDocumentLink>();
+//         for(ContentDocumentLink c:Trigger.new){
+//         ids.add(c.ContentDocumentId);
+//         mapcvwithid.put(c.ContentDocumentId,c);
+//         }
+//     if(ids.size() >  0){
+//         for(ContentDocument ContentDocumentObj : [select id,FileType from ContentDocument where id in: ids]){
+//             if(mapcvwithid.get(ContentDocumentObj.Id).LinkedEntityId != null && ContentDocumentObj.FileType != null){
+//                 String ObjectName = mapcvwithid.get(ContentDocumentObj.Id).LinkedEntityId.getSObjectType().getDescribe().getName();
+//                 String filetype = ContentDocumentObj.FileType.toLowerCase();
+//                 String CsName = ObjectName+'-'+filetype;
+                
+//                     ContentDocumentLink ContentDocumentLinkObj = mapcvwithid.get(ContentDocumentObj.Id);
+//                     ContentDocumentLinkObj.addError('Testing error');
+//                     return;
+//             }
+//         }
+//     }
+// }
     List<String> rentalIds = new List<String>();
     List<String> attIds = new List<String>();
     List<String> rentalApplyIds = new List<String>();
@@ -44,7 +71,23 @@
             }
         }
     }
-
+    if (Trigger.isBefore && Trigger.isDelete) {
+        for (ContentDocumentLink link : Trigger.old) {
+            if (String.valueOf(link.LinkedEntityId).startsWith('001')) {
+                accIds.add(link.LinkedEntityId);
+            }
+            // LHJ CHAN-BCLD4P 20190618 Start
+            if(String.valueOf(link.LinkedEntityId).startsWith(System.Label.OppSpecialApply)){
+                specIds.add(link.LinkedEntityId);
+            }
+            // LHJ CHAN-BCLD4P 20190618 End
+            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
+            if (String.valueOf(link.LinkedEntityId).startsWith('a5C') || String.valueOf(link.LinkedEntityId).startsWith('a5A')) {
+                accAppIds.add(link.LinkedEntityId);
+            }
+            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 end
+        }
+    }
     //CHAN-BCNCRB ---XHL----End-----
     if (Trigger.isAfter && Trigger.isInsert) {
         List<Id> idList = new List<Id>();
@@ -109,23 +152,6 @@
         }
     }
 
-    if (Trigger.isAfter && Trigger.isDelete) {
-        for (ContentDocumentLink link : Trigger.old) {
-            if (String.valueOf(link.LinkedEntityId).startsWith('001')) {
-                accIds.add(link.LinkedEntityId);
-            }
-            // LHJ CHAN-BCLD4P 20190618 Start
-            if(String.valueOf(link.LinkedEntityId).startsWith(System.Label.OppSpecialApply)){
-                specIds.add(link.LinkedEntityId);
-            }
-            // LHJ CHAN-BCLD4P 20190618 End
-            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
-            if (String.valueOf(link.LinkedEntityId).startsWith('a5C') || String.valueOf(link.LinkedEntityId).startsWith('a5A')) {
-                accAppIds.add(link.LinkedEntityId);
-            }
-            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 end
-        }
-    }
 
     
     //2023-2-10  sx澶囧搧 澶囧搧妫�娴嬪垎鏋愭姤鍛� start
@@ -209,10 +235,20 @@
             if(accList.size() > 0){
                 // Account acc = new Account(Id = accid);
                 //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 start
-                for(Account acc : accList){                    
-                    if(Trigger.isDelete && (Trigger.isAfter)){
+                for(Account acc : accList){  
+                    if(Trigger.isUpdate && Trigger.isAfter){
+                        for(ContentDocumentLink link : Trigger.New){
+
+                            if(attMap.containsKey(link.LinkedEntityId) &&acc.Is_Active__c != '鑽夋涓�'){
+                                System.debug('lt123---鑽夋涓�---');
+                                link.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽缂栬緫銆�');
+                
+                                return;
+                            }
+                        }
+                    }                  
+                    if(Trigger.isDelete && (Trigger.isBefore)){
                         for(ContentDocumentLink link : Trigger.old){
-                            // if(attMap.containsKey(att.ParentID) && acc.Is_Active__c != '鑽夋涓�'){
                             if(acc.Is_Active__c != '鑽夋涓�'){
                                 link.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽鍒犻櫎銆�');
                 
@@ -232,7 +268,10 @@
         //     acc.Is_upload_file__c = attMap.containsKey(accid);
         //     updAccList.add(acc);
         // }
-        if (updAccList.size() > 0) update updAccList;
+        if (updAccList.size() > 0){
+            StaticParameter.ContentDocumentTrigger = false;
+            update updAccList;
+        }
     }
 
     //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
@@ -268,6 +307,7 @@
             
         }
         try {
+            System.debug('瀹㈡埛鍙樻洿鐢宠');
             if (updAccAppList.size() > 0) update updAccAppList; 
         } catch (Exception e) {
             linkList[0].addError(e.getMessage());
@@ -328,18 +368,19 @@
                     ofc.Last_upload_user__c = UserInfo.getUserId();
                     ofc.Last_upload_time__c = System.now();
                     System.debug(ofc+'23333');
+                    update OpporList;
                 }else{
                     OpporFileUndeleteMap.put(ofc.id,ofc.id);
                     System.debug(ofc+'23333444444');
                 }
             }
-            update OpporList;
+            
         }
     }
     System.debug(Trigger.isDelete+'Trigger.isDelete');
     System.debug(Trigger.isBefore+'Trigger.isBefore');
    
-    if(Trigger.isDelete && Trigger.isAfter){
+    if(Trigger.isDelete && Trigger.isBefore){
         for(ContentDocumentLink link : Trigger.old){
             if(OpporFileUndeleteMap.containsKey(link.LinkedEntityId)){
                 link.addError('澶囪揣宸插鎵癸紝涓嶅彲鍒犻櫎闄勪欢');
@@ -365,68 +406,75 @@
             }
         }
     }
-
-    // List<Attachment> atcList = [select id,ParentId,createddate,createdbyid from Attachment where ParentId in:DeleteReIds];
-    List<ContentDocumentLink> linkList = [select ContentDocumentId from ContentDocumentLink where LinkedEntityId in:DeleteReIds];
-    List<Id> idList = new List<Id>();
-    for (ContentDocumentLink link : linkList) {
-        idList.add(link.ContentDocumentId);
-    }
-    List<ContentDocument> docList = [select Id,ArchivedDate,ArchivedById from ContentDocument where Id =: idList];
-    System.debug(DeleteReIds+'222222222222');
-    if(docList.size()>0){
-        for(String ids : DeleteReIds){
-            for(ContentDocument doc : docList){
-                if(OppordeleteReTimeMap.containsKey(ids)){
-                    if(doc.ArchivedDate > OppordeleteReTimeMap.get(ids)){
-                        OppordeleteReTimeMap.put(ids,doc.ArchivedDate);
-                        OppordeleteReUserMap.put(ids,doc.ArchivedById);
+    if(DeleteReIds.size() > 0){
+        // List<Attachment> atcList = [select id,ParentId,createddate,createdbyid from Attachment where ParentId in:DeleteReIds];
+        List<ContentDocumentLink> linkList = [select LinkedEntityId,ContentDocumentId from ContentDocumentLink where LinkedEntityId in:DeleteReIds];
+        List<Id> idList = new List<Id>();
+        for (ContentDocumentLink link : linkList) {
+            if(link.LinkedEntityId.getSObjectType().getDescribe().getName() != 'User'){
+                idList.add(link.ContentDocumentId);
+            }
+        }
+        List<ContentDocument> docList = [select Id,CreatedDate,CreatedById from ContentDocument where Id =: idList];
+        System.debug(DeleteReIds+'222222222222');
+        System.debug(docList + 'doclist');
+        if(docList.size()>0){
+            for(String ids : DeleteReIds){
+                for(ContentDocument doc : docList){
+                    if(OppordeleteReTimeMap.containsKey(ids)){
+                        if(doc.CreatedDate > OppordeleteReTimeMap.get(ids)){
+                            OppordeleteReTimeMap.put(ids,doc.CreatedDate);
+                            OppordeleteReUserMap.put(ids,doc.CreatedById);
+                        }else{
+                            continue;
+                        }
                     }else{
-                        continue;
+                        OppordeleteReTimeMap.put(ids,doc.CreatedDate);
+                        OppordeleteReUserMap.put(ids,doc.CreatedById);
                     }
-                }else{
-                    OppordeleteReTimeMap.put(ids,doc.ArchivedDate);
-                    OppordeleteReUserMap.put(ids,doc.ArchivedById);
                 }
             }
-        }
 
-
-        List<Opportunity_File__c> reDateList = [select id,Last_upload_time__c,
-                                                                Is_Locked__c,
-                                                                Last_upload_user__c
-                                                            from Opportunity_File__c 
-                                                            where id 
-                                                            in:DeleteReIds ];
-        if(reDateList.size()>0){
-            for(Opportunity_File__c ofc : reDateList){
-                ofc.Last_upload_time__c = OppordeleteReTimeMap.get(ofc.id);
-                ofc.Last_upload_user__c = OppordeleteReUserMap.get(ofc.id);
-                System.debug(ofc+'233333333');
-            }
-            if(Trigger.isInsert && Trigger.isAfter){
-                update reDateList;
-            }
-            
-        }
-    }else{
-        List<Opportunity_File__c> reDateList = [select id,Last_upload_time__c,
-                                                                Is_Locked__c,
-                                                                Last_upload_user__c
-                                                            from Opportunity_File__c 
-                                                            where id 
-                                                            in:DeleteReIds ];
-        if(reDateList.size()>0){
-            for(Opportunity_File__c ofc : reDateList){
-                if (!ofc.Is_Locked__c) {
-                    ofc.Last_upload_time__c = null;
-                    ofc.Last_upload_user__c = null;
+            System.debug(OppordeleteReTimeMap + 'OppordeleteReTimeMap');
+            System.debug(OppordeleteReUserMap + 'OppordeleteReUserMap');
+            List<Opportunity_File__c> reDateList = [select id,Last_upload_time__c,
+                                                                    Is_Locked__c,
+                                                                    Last_upload_user__c
+                                                                from Opportunity_File__c 
+                                                                where id 
+                                                                in:DeleteReIds ];
+            if(reDateList.size()>0){
+                for(Opportunity_File__c ofc : reDateList){
+                    ofc.Last_upload_time__c = OppordeleteReTimeMap.get(ofc.id);
+                    ofc.Last_upload_user__c = OppordeleteReUserMap.get(ofc.id);
+                    System.debug(ofc+'233333333');
+                }
+                if(Trigger.isInsert && Trigger.isAfter){
                     update reDateList;
                 }
                 
             }
+        }else{
+            List<Opportunity_File__c> reDateList = [select id,Last_upload_time__c,
+                                                                    Is_Locked__c,
+                                                                    Last_upload_user__c
+                                                                from Opportunity_File__c 
+                                                                where id 
+                                                                in:DeleteReIds ];
+            if(reDateList.size()>0){
+                for(Opportunity_File__c ofc : reDateList){
+                    if (!ofc.Is_Locked__c) {
+                        ofc.Last_upload_time__c = null;
+                        ofc.Last_upload_user__c = null;
+                        update reDateList;
+                    }
+                    
+                }
+            }
         }
     }
+
+    
 
     //CHAN-BCNCRB ---XHL----Start-----
     if (opportunity_FileIds.size() > 0) {
@@ -502,7 +550,7 @@
         if (oFOrderList.size() > 0 ) {
 
             for (OpportunityFileOrder__c oFOrder :oFOrderList) {
-
+                System.debug(oFOrderIdMap.get(oFOrder.Id));
                 if (oFOrderIdMap.get(oFOrder.Id)) {
                     oFOrder.LatestUploadUser__c = UserInfo.getUserId();
                     oFOrder.LatestUploadTime__c = System.now();
diff --git a/force-app/main/default/triggers/ContentDocumentTrigger.trigger b/force-app/main/default/triggers/ContentDocumentTrigger.trigger
index 807b2a5..dba11fa 100644
--- a/force-app/main/default/triggers/ContentDocumentTrigger.trigger
+++ b/force-app/main/default/triggers/ContentDocumentTrigger.trigger
@@ -1,14 +1,24 @@
-trigger ContentDocumentTrigger on ContentDocument (before delete) {
+trigger ContentDocumentTrigger on ContentDocument (before delete,before update) {
+    if(StaticParameter.ContentDocumentTrigger == false){
+        return;
+    }
     if((!Test.isRunningTest())&&UserInfo.getUserId()==System.Label.ByPassTrigger){
         return;
     }
+    
+    // LHJ CHAN-BCLD4P 20190618 Start
+    List<String> specIds = new List<String>();
+    // LHJ CHAN-BCLD4P 20190618 End
     System.debug('enter ContentDocumentTrigger');
     List<String> rentaldelIds = new List<String>();
     List<String> attdelIds = new List<String>();
     // LHJ CHAN-BCLD4P 20190618 Start
     List<String> specDelIds = new List<String>();
     // LHJ CHAN-BCLD4P 20190618 End
-
+    List<String> accIds = new List<String>();
+    //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
+    List<String> accAppIds = new List<String>();
+    //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 end
     List<String> OpporFileIds = new List<String>();
     Map<String,String> OpporFileUndeleteMap = new Map<String,String>();
     List<String> DeleteReIds = new List<String>();
@@ -28,8 +38,45 @@
     String invoiceStart = System.Label.invoiceStart;
     List<String> rentaldelIdsZhj = new List<String>();
     List<String> attdelIdsZhj = new List<String>();
+    if (Trigger.isBefore && Trigger.isUpdate) {
+        List<Id> idList = new List<Id>();
+        for(ContentDocument doc: Trigger.old){
+            idList.add(doc.Id);
+        }
+        List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
+        for (ContentDocumentLink link : linkList) {
+            if (String.valueOf(link.LinkedEntityId).startsWith('a5C') || String.valueOf(link.LinkedEntityId).startsWith('a5A')) {
+                accAppIds.add(link.LinkedEntityId);
+            }
+
+            if (String.valueOf(link.LinkedEntityId).startsWith('001')) {
+                accIds.add(link.LinkedEntityId);
+            }
+        }
+    }
 
     if (Trigger.isBefore && Trigger.isDelete) {
+        List<Id> idList = new List<Id>();
+        for(ContentDocument doc: Trigger.old){
+            idList.add(doc.Id);
+        }
+        List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
+        System.debug('Link鐨勬潯鏁帮細' + linkList.size());
+        for (ContentDocumentLink link : linkList) {
+            if (String.valueOf(link.LinkedEntityId).startsWith('001')) {
+                accIds.add(link.LinkedEntityId);
+            }
+            // LHJ CHAN-BCLD4P 20190618 Start
+            if(String.valueOf(link.LinkedEntityId).startsWith(System.Label.OppSpecialApply)){
+                specIds.add(link.LinkedEntityId);
+            }
+            // LHJ CHAN-BCLD4P 20190618 End
+            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
+            if (String.valueOf(link.LinkedEntityId).startsWith('a5C') || String.valueOf(link.LinkedEntityId).startsWith('a5A')) {
+                accAppIds.add(link.LinkedEntityId);
+            }
+            //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 end
+        }
         for (ContentDocument cd : Trigger.old) {
             System.debug('cd.Id = ' + cd.Id);
             List<ContentDocumentLink> cdlList = [SELECT id, LinkedEntityId FROM ContentDocumentLink WHERE ContentDocumentId = :cd.Id];
@@ -69,51 +116,69 @@
         for (ContentDocument doc : Trigger.old) {
             idList.add(doc.Id);
         }
-        List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList limit 1];
+        List<ContentDocumentLink> linkList = [select ContentDocumentId,LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
         List<ContentVersion> version = [select Id from ContentVersion where ContentDocumentId in: idList];
+        System.debug('Version鐨勬潯鏁帮細' + version.size());
+        Id cid;
+        ContentDocumentLink link;
+        for(ContentDocumentLink lin: linkList){
+            System.debug('...' + lin.LinkedEntityId.getSObjectType().getDescribe().getName());
+            if(lin.LinkedEntityId.getSObjectType().getDescribe().getName() != 'User'){
+                cid = lin.LinkedEntityId;
+                link = lin;
+            }
+        }
+        if(cid == null){
+            return;
+        }
         for (ContentDocument doc : Trigger.old) {
             //if (att.Name.toUpperCase() == '鍚堝悓涔�.PDF' && String.valueOf(att.ParentId).startsWith('a0t')) {
             // 娣讳粯銇椼仧濂戠磩鏇搞伄銉曘偂銈ゃ儷鍚嶃伅鎸囧畾銇с亶銇亜
-            if (String.valueOf(link[0].LinkedEntityId).startsWith('a2K')) {
-                rentaldelIds.add(link[0].LinkedEntityId);
+            if (String.valueOf(cid).startsWith('a2K')) {
+                rentaldelIds.add(cid);
                 attdelIds.add(version[0].Id);
             }
-            if(String.valueOf(link[0].LinkedEntityId).startsWith(System.Label.Oppor_sepKey)){
-                OpporFileIds.add(link[0].LinkedEntityId);
+            if(String.valueOf(cid).startsWith(System.Label.Oppor_sepKey)){
+                OpporFileIds.add(cid);
             }
             // LHJ CHAN-BCLD4P 20190618 Start
-            if(String.valueOf(link[0].LinkedEntityId).startsWith(System.Label.OppSpecialApply)){
-                specDelIds.add(link[0].LinkedEntityId);
+            if(String.valueOf(cid).startsWith(System.Label.OppSpecialApply)){
+                specDelIds.add(cid);
             }
             // LHJ CHAN-BCLD4P 20190618 End
-            if(String.valueOf(link[0].LinkedEntityId).startsWith('a3Z')){
-                oFOrderIds.add(link[0].LinkedEntityId);
-                oFOrderIdMap.put(link[0].LinkedEntityId,false);
+            if(String.valueOf(cid).startsWith('a3Z')){
+                oFOrderIds.add(cid);
+                oFOrderIdMap.put(cid,false);
             }
             //2023-2-10  sx澶囧搧 澶囧搧妫�娴嬪垎鏋愭姤鍛� start
-            Id cid = link[0].LinkedEntityId;
             String parentLabel = cid.getSObjectType().getDescribe().getName();
+            System.debug('...' + cid.getSObjectType().getDescribe().getName());
             if(parentLabel.equals('Rental_Apply_Fault__c')){
-                rentaldeleteApplyFaultIds.add(link[0].LinkedEntityId);
-                conDeleteList.add(link[0]);
+                rentaldeleteApplyFaultIds.add(cid);
+                conDeleteList.add(link);
                 if(deleteImages.containskey(version[0].Id)){
-                    deleteImages.get(link[0].LinkedEntityId).add(version[0].Id);
+                    deleteImages.get(cid).add(version[0].Id);
                 }else{
                     List<Id> temp = new List<Id>();
                     temp.add(version[0].Id);
-                    deleteImages.put(link[0].LinkedEntityId,temp);
+                    deleteImages.put(cid,temp);
                 }
             }
             //2023-2-10  sx澶囧搧 澶囧搧妫�娴嬪垎鏋愭姤鍛� end
         }
         //2023-2-10  sx澶囧搧 澶囧搧妫�娴嬪垎鏋愭姤鍛� start
         List<Rental_Apply_Fault__c> rafList = [SELECT Id, Name FROM Rental_Apply_Fault__c WHERE Id IN: rentaldeleteApplyFaultIds AND (status__c = '宸插彂閫�' OR status__c = '宸插弽棣�')];
+        List<Id> docList = new List<Id>();
         for (Rental_Apply_Fault__c raf : rafList) {
             for (ContentDocumentLink link1 : conDeleteList) {
                 if (link1.LinkedEntityId == raf.Id) {
-                    // ContentDocument doc = [select Id from ContentDocument where Id =: link.ContentDocumentId];
-                    link1.addError('闈炶崏妗堜腑鐨勬娴嬪垎鏋愭姤鍛婁笉鍏佽鍒犻櫎宸蹭笂浼犵殑鏁呴殰鍥剧墖');
+                    docList.add(link1.ContentDocumentId);
                 }
+            }
+        }
+        for(ContentDocument doc: Trigger.old){
+            if(docList.contains(doc.Id)){
+                doc.addError('闈炶崏妗堜腑鐨勬娴嬪垎鏋愭姤鍛婁笉鍏佽鍒犻櫎宸蹭笂浼犵殑鏁呴殰鍥剧墖');
             }
         }
         //2023-2-10  sx澶囧搧 澶囧搧妫�娴嬪垎鏋愭姤鍛� end
@@ -130,13 +195,19 @@
         system.debug('renList====='+renList);
         for(Rental_Apply_Fault__c ren : renList){
             if(deleteImages.containskey(ren.Id)){
-
+                System.debug('att1' + ren.AttachmentId1__c);
+                System.debug('att2' + ren.AttachmentId2__c);
+                System.debug('ver' + deleteImages.get(ren.Id));
                 if(deleteImages.get(ren.Id).contains(ren.AttachmentId1__c)){
                     ren.AttachmentId1__c = '';
                 }
                 if(deleteImages.get(ren.Id).contains(ren.AttachmentId2__c)){
                     ren.AttachmentId2__c = '';
                 }
+                // if(!(deleteImages.get(ren.Id).contains(ren.AttachmentId2__c)) && !(deleteImages.get(ren.Id).contains(ren.AttachmentId1__c))){
+                //     ren.AttachmentId2__c = '';
+                //     ren.AttachmentId1__c = '';
+                // }
             }
         }
         system.debug('renList====='+renList);
@@ -189,30 +260,101 @@
             idList.add(doc.Id);
         }
         List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
+        Id enId;
+        for(ContentDocumentLink lin: link){
+            if(lin.LinkedEntityId.getSObjectType().getDescribe().getName() != 'User'){
+                enId = lin.LinkedEntityId;
+            }
+        }
         for(ContentDocument doc : Trigger.old){
-            if(OpporFileUndeleteMap.containsKey(link[0].LinkedEntityId)){
+            if(OpporFileUndeleteMap.containsKey(enId)){
                 doc.addError('澶囪揣宸插鎵癸紝涓嶅彲鍒犻櫎闄勪欢');
                 return;
             }else{
+                DeleteReIds.add(enId);
             }
         }
     }
-    if(Trigger.isDelete && Trigger.isAfter){
-        List<Id> idList = new List<Id>();
-        for(ContentDocument doc : Trigger.old){
-            idList.add(doc.Id);
+    // if(Trigger.isDelete && Trigger.isAfter){
+    //     List<Id> idList = new List<Id>();
+    //     for(ContentDocument doc : Trigger.old){
+    //         idList.add(doc.Id);
+    //     }
+    //     List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
+    //     ContentDocumentLink link;
+    //     for(ContentDocumentLink lin: linkList){
+    //         if(lin.LinkedEntityId.getSObjectType().getDescribe().getName() != 'User'){
+    //             link = lin;
+    //         }
+    //     }
+    //     for(ContentDocument doc : Trigger.old){
+    //         // List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: doc.Id];
+    //         if(OpporFileUndeleteMap.containsKey(link.LinkedEntityId)){
+    //             doc.addError('澶囪揣宸插鎵癸紝涓嶅彲鍒犻櫎闄勪欢');
+    //             return;
+    //         }else{
+    //             DeleteReIds.add(link.LinkedEntityId);
+    //         }
+    //     }
+    // }
+     //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 start
+     if (accAppIds.size() > 0) {
+        Map<String, String> attMap = new Map<String, String>();
+        // List<Attachment> attList = [select Id, ParentId from Attachment where ParentId = :accAppIds order by ParentId];
+        List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where LinkedEntityId =: accAppIds order by LinkedEntityId];
+        for (ContentDocumentLink link : linkList) {
+            attMap.put(link.LinkedEntityId, link.LinkedEntityId);
         }
-        List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
-        for(ContentDocument doc : Trigger.old){
-            // List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: doc.Id];
-            if(OpporFileUndeleteMap.containsKey(link[0].LinkedEntityId)){
-                link[0].addError('澶囪揣宸插鎵癸紝涓嶅彲鍒犻櫎闄勪欢');
-                return;
-            }else{
-                DeleteReIds.add(link[0].LinkedEntityId);
+        List<Account_Delay_Apply__c> updAccAppList = new List<Account_Delay_Apply__c>();
+        
+        //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 start
+        List<Account_Delay_Apply__c> adaList = [select id,Name,
+                                                         Is_Active__c
+                                               from Account_Delay_Apply__c 
+                                               where id in:accAppIds ];
+        //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 end
+
+        for (String accappid : accAppIds) {
+            if(adaList.size() > 0){
+                // Account_Delay_Apply__c accapp = new Account_Delay_Apply__c(Id = accappid);
+                //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 start
+                
+                for(Account_Delay_Apply__c accapp : adaList){                    
+                    if(Trigger.isUpdate && Trigger.isBefore){
+                        for(ContentDocument doc : Trigger.New){
+                            if(accapp.Is_Active__c != '鑽夋涓�'){
+                                doc.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽缂栬緫銆�');
+                
+                                return;
+                            }
+                        }
+                    }
+                    if(Trigger.isDelete && Trigger.isBefore){
+                        for(ContentDocument doc : Trigger.old){
+                            // if(attMap.containsKey(att.ParentID) && accapp.Is_Active__c != '鑽夋涓�'){
+                            if(accapp.Is_Active__c != '鑽夋涓�'){
+                                doc.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽鍒犻櫎銆�');
+                
+                                return;
+                            }
+                        }
+                    }
+                }
+                
             }
+            
+            //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 end
+            
         }
+        try {
+            if (updAccAppList.size() > 0) update updAccAppList; 
+        } catch (Exception e) {
+            linkList[0].addError(e.getMessage());
+        }
+        
     }
+    //20221014 yc 鍖婚櫌瀹℃壒浼樺寲 end
+
     
 
     // List<Attachment> atcList = [select id,ParentId,createddate,createdbyid from Attachment where ParentId in:DeleteReIds];
@@ -222,21 +364,28 @@
         for (ContentDocumentLink link : linkList) {
             idList.add(link.ContentDocumentId);
         }
-        List<ContentDocument> docList = [select Id,ArchivedDate,ArchivedById from ContentDocument where Id =: idList];
+        List<ContentDocument> docList = [select Id,CreatedDate,CreatedById from ContentDocument where Id =: idList];
         System.debug(DeleteReIds+'222222222222');
+        List<Id> oldList = new List<Id>();
+        for(ContentDocument doc : Trigger.old){
+            oldList.add(doc.Id);
+        }
         if(docList.size()>0){
             for(String ids : DeleteReIds){
                 for(ContentDocument doc : docList){
+                    if(oldList.contains(doc.Id)){
+                        continue;
+                    }
                     if(OppordeleteReTimeMap.containsKey(ids)){
-                        if(doc.ArchivedDate > OppordeleteReTimeMap.get(ids)){
-                            OppordeleteReTimeMap.put(ids,doc.ArchivedDate);
-                            OppordeleteReUserMap.put(ids,doc.ArchivedById);
+                        if(doc.CreatedDate > OppordeleteReTimeMap.get(ids)){
+                            OppordeleteReTimeMap.put(ids,doc.CreatedDate);
+                            OppordeleteReUserMap.put(ids,doc.CreatedById);
                         }else{
                             continue;
                         }
                     }else{
-                        OppordeleteReTimeMap.put(ids,doc.ArchivedDate);
-                        OppordeleteReUserMap.put(ids,doc.ArchivedById);
+                        OppordeleteReTimeMap.put(ids,doc.CreatedDate);
+                        OppordeleteReUserMap.put(ids,doc.CreatedById);
                     }
                 }
             }
@@ -296,5 +445,61 @@
 
         }                                            
     }
+    if (accIds.size() > 0) {
+        Map<String, String> attMap = new Map<String, String>();
+        // List<Attachment> attList = [select Id, ParentId from Attachment where ParentId = :accIds order by ParentId];
+        List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where LinkedEntityId =: accIds order by LinkedEntityId];
+        for (ContentDocumentLink link : linkList) {
+            attMap.put(link.LinkedEntityId, link.LinkedEntityId);
+        }
+        List<Account> updAccList = new List<Account>();
 
+        //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 start
+        List<Account> accList = [select id,Name,
+                                                         Is_Active__c
+                                               from Account
+                                               where id in:accIds ];
+        //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 end
+
+        for (String accid : accIds) {
+            if(accList.size() > 0){
+                // Account acc = new Account(Id = accid);
+                //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 start
+                for(Account acc : accList){  
+                    if(Trigger.isUpdate && Trigger.isBefore){
+                        for(ContentDocument link: Trigger.Old){
+                            System.debug(link + 'old');
+                        }
+                        for(ContentDocument link : Trigger.New){
+                            System.debug(link + 'new');
+                            if(attMap.containsKey(acc.Id) &&acc.Is_Active__c != '鑽夋涓�'){
+                                System.debug('lt123---鑽夋涓�---');
+                                link.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽缂栬緫銆�');
+                
+                                return;
+                            }
+                        }
+                    }                  
+                    if(Trigger.isDelete && (Trigger.isBefore)){
+                        for(ContentDocument link : Trigger.old){
+                            if(acc.Is_Active__c != '鑽夋涓�'){
+                                link.addError('闈炶崏妗堜腑锛岄檮浠朵笉鍏佽鍒犻櫎銆�');
+                                return;
+                            }
+                        }
+                    }
+                    acc.Is_upload_file__c = attMap.containsKey(accid);
+                    updAccList.add(acc);
+                }
+            }
+            //20221207 lt 鍖婚櫌瀹℃壒浼樺寲 end
+        }
+        // for (String accid : accIds) {
+    //     //     Account acc = new Account(Id = accid);
+    //     //     acc.Is_upload_file__c = attMap.containsKey(accid);
+    //     //     updAccList.add(acc);
+    //     // }
+    //     if (updAccList.size() > 0) update updAccList;
+
+}
 }
\ No newline at end of file
diff --git a/force-app/main/default/triggers/ContentVersionTrigger.trigger b/force-app/main/default/triggers/ContentVersionTrigger.trigger
index afa6410..326e3b0 100644
--- a/force-app/main/default/triggers/ContentVersionTrigger.trigger
+++ b/force-app/main/default/triggers/ContentVersionTrigger.trigger
@@ -1,3 +1,7 @@
-trigger ContentVersionTrigger on ContentVersion (before update,after update) {
-    
+trigger ContentVersionTrigger on ContentVersion (after insert) {
+    // if(Trigger.isInsert){
+    //     for(ContentVersion version: Trigger.old){
+    //         version.addError('test');
+    //     }
+    // }
 }
\ No newline at end of file
diff --git a/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger b/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger
new file mode 100644
index 0000000..206436b
--- /dev/null
+++ b/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger
@@ -0,0 +1,4 @@
+trigger RentalApplyFaultTrigger on Rental_Apply_Fault__c (before insert, before update,after insert,after update,after delete) {
+	RentalApplyFaultHandler handler = new RentalApplyFaultHandler();
+	handler.run();
+}
\ No newline at end of file
diff --git a/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger-meta.xml b/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger-meta.xml
new file mode 100644
index 0000000..b01a1f0
--- /dev/null
+++ b/force-app/main/default/triggers/RentalApplyFaultTrigger.trigger-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexTrigger>

--
Gitblit v1.9.1