19626
2023-09-09 e14d6d0619330cad423f06493e3aa2371faa2a8f
Sit期间修改
47个文件已添加
110个文件已修改
8117 ■■■■ 已修改文件
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.app 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.app-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.auradoc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.css 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.svg 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraController.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraHelper.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraRenderer.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.cmp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.cmp-meta.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAuraController.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAuraHelper.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.auradoc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.cmp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.cmp-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.css 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.design 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.svg 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraController.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraHelper.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraRenderer.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.auradoc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.cmp 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.cmp-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.css 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.design 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.svg 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraController.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraHelper.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraRenderer.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.auradoc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.cmp 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.cmp-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.css 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.design 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.svg 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraController.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraHelper.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraRenderer.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/Add_Report.cls 924 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AssetMaintainController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AssetModifyBelongsController.cls 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AttachmentReQisHandler.cls 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/CheckAllOlympusAssetController.cls 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ConsumTrialPDFController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/GuaranteePeriodAlterationController.cls 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/InsReportPDFOuterController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/InventoryResultRecordController.cls 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MaintenanceProductDataController.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MaintenanceProductDataController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MonthlyReportController.cls 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM401Controller.cls 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM609FiledDownloadBatch.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NotetoPdfHandler.cls 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OPDNoReportApplicationController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonController.cls 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityWebService.cls 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ReportController.cls 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/Xin_SearchVisitorPlace.cls 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/eSignAgencyConfirmPageController.cls 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/eSignAgencyPageController.cls 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/eSignHospitalConfirmController.cls 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/eSignHospitalPageController.cls 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexCaseController.cls 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexCaseController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLightingButtonConstant.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLookupController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexPCLLostReportLwcController.cls 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexRentalApplyController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammaController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammeController.cls 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProgrammeController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.js 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyPI/lexCopyPI.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDepartmentCreateGI/lexDepartmentCreateGI.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDepartmentCreateGS/lexDepartmentCreateGS.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDepartmentCreateGYN/lexDepartmentCreateGYN.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDepartmentCreateOTH/lexDepartmentCreateOTH.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDReport/lexOPDReport.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDReportConsum/lexOPDReportConsum.js 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.html 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.js-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.html 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.html 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AccountCaseTab.page 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetGuaranteePeriodAlteration.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetMaintain.page 233 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetMaintainIframe.page 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetModifyBelongs.page 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetModifyBelongs.page-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CheckAllOlympusAsset.page 232 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CheckAllOlympusAssetNew.page 1088 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CheckAllOlympusAssetNew.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/DiscountProductApplication.page 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/InventoryIframe.page 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/InventoryReport.page 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/InventoryResultRecordNew.page 1879 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/InventoryResultRecordNew.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MaintenanceProductData.page 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MaintenanceProductData.page-meta.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/PCLLostReportPageLwc.page 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/PCLLostReportPageLwc.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/QLMAttachmentPreview1.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/SolApproval.page 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/SpecialPrice.page 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/SubAuthorizedCreate.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TenderAttachment.page 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/triggers/ContentDocumentLink.trigger 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/triggers/ContentDocumentTrigger.trigger 330 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.app
New file
@@ -0,0 +1,3 @@
<aura:application access="public" extends="ltng:outApp">
    <aura:dependency resource="c:PCLLostReportPageLwcAura"/>
</aura:application>
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.app-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>55.0</apiVersion>
    <description>A Lightning Application Bundle</description>
</AuraDefinitionBundle>
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.auradoc
New file
@@ -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>
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.css
New file
@@ -0,0 +1,2 @@
.THIS {
}
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAura.svg
New file
@@ -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>
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraController.js
New file
@@ -0,0 +1,5 @@
({
    myAction : function(component, event, helper) {
    }
})
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraHelper.js
New file
@@ -0,0 +1,5 @@
({
    helperMethod : function() {
    }
})
force-app/main/default/aura/PCLLostReportPageLwcAura/PCLLostReportPageLwcAuraRenderer.js
New file
@@ -0,0 +1,5 @@
({
// Your renderer method overrides go here
})
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.cmp
@@ -5,4 +5,4 @@
        <!-- <c:lexCustomDeleteLWC recordId="{!v.recordId}" /> -->
        <c:lexCBLBPNewLwc recordId="{!v.recordId}"/>
    </div>
</aura:component>
</aura:component>
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.cmp-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
</AuraDefinitionBundle>
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAura.css
@@ -1,2 +1,2 @@
.THIS {
}
}
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAuraController.js
@@ -4,4 +4,4 @@
        $A.get("e.force:closeQuickAction").fire();
        console.log('val',val);
    }
})
})
force-app/main/default/aura/lexCBLBPNewLwcAura/lexCBLBPNewLwcAuraHelper.js
@@ -2,4 +2,4 @@
    helperMethod : function() {
    }
})
})
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.auradoc
New file
@@ -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>
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.cmp
New file
@@ -0,0 +1,4 @@
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,lightning:actionOverride,lightning:isUrlAddressable"
access="global">
        <c:lexInitCreateSolution/>
</aura:component>
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.cmp-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.css
New file
@@ -0,0 +1,2 @@
.THIS {
}
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.design
New file
@@ -0,0 +1,3 @@
<design:component >
</design:component>
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAura.svg
New file
@@ -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>
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraController.js
New file
@@ -0,0 +1,5 @@
({
    myAction : function(component, event, helper) {
    }
})
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraHelper.js
New file
@@ -0,0 +1,5 @@
({
    helperMethod : function() {
    }
})
force-app/main/default/aura/lexInitCreateSolutionAura/lexInitCreateSolutionAuraRenderer.js
New file
@@ -0,0 +1,5 @@
({
// Your renderer method overrides go here
})
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.auradoc
New file
@@ -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>
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.cmp
New file
@@ -0,0 +1,12 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-09-07 15:58:56
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-07 15:59:58
-->
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,lightning:actionOverride,lightning:isUrlAddressable"
access="global">
<c:lexLastbuyProductNew/>
</aura:component>
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.cmp-meta.xml
New file
@@ -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>
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.css
New file
@@ -0,0 +1,2 @@
.THIS {
}
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.design
New file
@@ -0,0 +1,3 @@
<design:component >
</design:component>
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAura.svg
New file
@@ -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>
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraController.js
New file
@@ -0,0 +1,5 @@
({
    myAction : function(component, event, helper) {
    }
})
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraHelper.js
New file
@@ -0,0 +1,5 @@
({
    helperMethod : function() {
    }
})
force-app/main/default/aura/lexLastbuyProductNewAura/lexLastbuyProductNewAuraRenderer.js
New file
@@ -0,0 +1,5 @@
({
// Your renderer method overrides go here
})
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.auradoc
New file
@@ -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>
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.cmp
New file
@@ -0,0 +1,12 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-09-07 16:24:59
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-07 16:26:56
-->
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,lightning:actionOverride,lightning:isUrlAddressable"
access="global">
    <iframe src="{!$Page.Solution_ProgrammeDelete}" width="100%" height="500px"/>
</aura:component>
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.cmp-meta.xml
New file
@@ -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>
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.css
New file
@@ -0,0 +1,2 @@
.THIS {
}
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.design
New file
@@ -0,0 +1,3 @@
<design:component >
</design:component>
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAura.svg
New file
@@ -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>
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraController.js
New file
@@ -0,0 +1,5 @@
({
    myAction : function(component, event, helper) {
    }
})
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraHelper.js
New file
@@ -0,0 +1,5 @@
({
    helperMethod : function() {
    }
})
force-app/main/default/aura/lexSolutionProgrammeDeleteAura/lexSolutionProgrammeDeleteAuraRenderer.js
New file
@@ -0,0 +1,5 @@
({
// Your renderer method overrides go here
})
force-app/main/default/classes/Add_Report.cls
@@ -1,409 +1,411 @@
global class Add_Report {
    // TODO reportのidで検索じゃなく、event_id__cで検索
    WebService static String addReportPr(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4,String visitor5, String description, String reportDate){
        String rt = selectRecordType(recordType);
        List<Account> aList = selectAccount(aId);
  // TODO reportのidで検索じゃなく、event_id__cで検索
  WebService static String addReportPr(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4,String visitor5, String description, String reportDate){
    String rt = selectRecordType(recordType);
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
            if (rList.size() > 0) {
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
      if (rList.size() > 0) {
        return rList.get(0).id;
      }
    }
        Report__c r = new Report__c();
    Report__c r = new Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Department__c = a.Id;
            r.Department_Class_Ref__c = a.Department_Class__r.Id;
            r.Hospital_Reference__c = a.Hospital__r.Id;
        } else {
            r.Manual_Name__c = aId;
        }
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Department__c = a.Id;
      r.Department_Class_Ref__c = a.Department_Class__r.Id;
      r.Hospital_Reference__c = a.Hospital__r.Id;
    } else {
      r.Manual_Name__c = aId;
    }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.RecordTypeId = rt;
        r.Event_Id__c = eventId;
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
        if(visitor1 != null && visitor1 != ''){
            r.Practitioner1__c = visitor1;
        }
        if(visitor2 != null && visitor2 != ''){
            r.Practitioner2__c = visitor2;
        }
        if(visitor3 != null && visitor3 != ''){
            r.Practitioner3__c = visitor3;
        }
        if(visitor4 != null && visitor4 != ''){
            r.Practitioner4__c = visitor4;
        }
        if(visitor5 != null && visitor5 != ''){
            r.Practitioner5__c = visitor5;
        }
        r.Comment__c = description;
        upsert r;
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.RecordTypeId = rt;
    r.Event_Id__c = eventId;
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
    if(visitor1 != null && visitor1 != ''){
      r.Practitioner1__c = visitor1;
    }
    if(visitor2 != null && visitor2 != ''){
      r.Practitioner2__c = visitor2;
    }
    if(visitor3 != null && visitor3 != ''){
      r.Practitioner3__c = visitor3;
    }
    if(visitor4 != null && visitor4 != ''){
      r.Practitioner4__c = visitor4;
    }
    if(visitor5 != null && visitor5 != ''){
      r.Practitioner5__c = visitor5;
    }
    r.Comment__c = description;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
    WebService static String addReportOP(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate){
        return addReportOPWithEvaluationPDF(repOwnerId, reportId, dailyReportId, eventId, recordType, aId, visitor1, visitor2, visitor3, visitor4, visitor5, opp1, opp2, opp3, opp4, opp5, reportDate, '', '', '', '');
    }
    WebService static String addReportOP2(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate, String sTime, String eTime){
        return addReportOPWithEvaluationPDF(repOwnerId, reportId, dailyReportId, eventId, recordType, aId, visitor1, visitor2, visitor3, visitor4, visitor5, opp1, opp2, opp3, opp4, opp5, reportDate, '', '', sTime, eTime);
    }
    @AuraEnabled
    WebService static String addReportOPWithEvaluationPDF(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate, String evaluationPDFNumber, String pro1, String sTime, String eTime) {
        String rt = selectRecordType(recordType);
        List<Account> aList = selectAccount(aId);
  WebService static String addReportOP(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate){
    return addReportOPWithEvaluationPDF(repOwnerId, reportId, dailyReportId, eventId, recordType, aId, visitor1, visitor2, visitor3, visitor4, visitor5, opp1, opp2, opp3, opp4, opp5, reportDate, '', '', '', '');
  }
  WebService static String addReportOP2(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate, String sTime, String eTime){
    return addReportOPWithEvaluationPDF(repOwnerId, reportId, dailyReportId, eventId, recordType, aId, visitor1, visitor2, visitor3, visitor4, visitor5, opp1, opp2, opp3, opp4, opp5, reportDate, '', '', sTime, eTime);
  }
  @AuraEnabled
  WebService static String addReportOPWithEvaluationPDF(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String opp1, String opp2, String opp3, String opp4, String opp5, String reportDate, String evaluationPDFNumber, String pro1, String sTime, String eTime) {
    String rt = selectRecordType(recordType);
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Opportunity1__c, Opportunity2__c, Opportunity3__c, Opportunity4__c, Opportunity5__c from Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      //康康p课题需要修改字段类型 后续跟进(Opportunity5__c变为文本类型字段)
    //   List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Opportunity1__c, Opportunity2__c, Opportunity3__c, Opportunity4__c, Opportunity5__c from Report__c where id =:reportId];
    //   if(rList.size() > 0){
    //     return rList.get(0).id;
    //   }
    }
        Report__c r = new Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Department__c = a.Id;
            r.Department_Class_Ref__c = a.Department_Class__r.Id;
            r.Hospital_Reference__c = a.Hospital__r.Id;
        } else {
            r.Manual_Name__c = aId;
        }
    Report__c r = new Report__c();
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Department__c = a.Id;
      r.Department_Class_Ref__c = a.Department_Class__r.Id;
      r.Hospital_Reference__c = a.Hospital__r.Id;
    } else {
      r.Manual_Name__c = aId;
    }
        if (String.isBlank(dailyReportId) == false) r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.RecordTypeId = rt;
        if (String.isBlank(eventId) == false) r.Event_Id__c = eventId;
        r.Evaluation_PDF_number__c = evaluationPDFNumber;
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
        if(visitor1 != null && visitor1 != ''){
            r.Practitioner1__c = visitor1;
        }
        if(visitor2 != null && visitor2 != ''){
            r.Practitioner2__c = visitor2;
        }
        if(visitor3 != null && visitor3 != ''){
            r.Practitioner3__c = visitor3;
        }
        if(visitor4 != null && visitor4 != ''){
            r.Practitioner4__c = visitor4;
        }
        if(visitor5 != null && visitor5 != ''){
            r.Practitioner5__c = visitor5;
        }
    if (String.isBlank(dailyReportId) == false) r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.RecordTypeId = rt;
    if (String.isBlank(eventId) == false) r.Event_Id__c = eventId;
    r.Evaluation_PDF_number__c = evaluationPDFNumber;
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
    if(visitor1 != null && visitor1 != ''){
      r.Practitioner1__c = visitor1;
    }
    if(visitor2 != null && visitor2 != ''){
      r.Practitioner2__c = visitor2;
    }
    if(visitor3 != null && visitor3 != ''){
      r.Practitioner3__c = visitor3;
    }
    if(visitor4 != null && visitor4 != ''){
      r.Practitioner4__c = visitor4;
    }
    if(visitor5 != null && visitor5 != ''){
      r.Practitioner5__c = visitor5;
    }
        List<String> oppIdList = new List<String>();
        if(opp1 != null && opp1 != ''){
            oppIdList.add(opp1);
        }
        if(opp2 != null && opp2 != ''){
            oppIdList.add(opp2);
        }
        if(opp3 != null && opp3 != ''){
            oppIdList.add(opp3);
        }
        if(opp4 != null && opp4 != ''){
            oppIdList.add(opp4);
        }
        if(opp5 != null && opp5 != ''){
            oppIdList.add(opp5);
        }
    List<String> oppIdList = new List<String>();
    if(opp1 != null && opp1 != ''){
      oppIdList.add(opp1);
    }
    if(opp2 != null && opp2 != ''){
      oppIdList.add(opp2);
    }
    if(opp3 != null && opp3 != ''){
      oppIdList.add(opp3);
    }
    if(opp4 != null && opp4 != ''){
      oppIdList.add(opp4);
    }
    if(opp5 != null && opp5 != ''){
      oppIdList.add(opp5);
    }
        if(oppIdList.size() > 0){
            if(opp1 != null && opp1 != ''){
                r.Opportunity1__c = opp1;
            }
            if(opp2 != null && opp2 != ''){
                r.Opportunity2__c = opp2;
            }
            if(opp3 != null && opp3 != ''){
                r.Opportunity3__c = opp3;
            }
            if(opp4 != null && opp4 != ''){
                r.Opportunity4__c = opp4;
            }
            if(opp5 != null && opp5 != ''){
                r.Opportunity5__c = opp5;
            }
            r.Opportunity_Situation__c = '引合発生';
        }
        else{
            r.Opportunity_Situation__c = '引合無';
        }
        if (String.isBlank(pro1) == false) {
            r.Product1__c = pro1;
        }
    if(oppIdList.size() > 0){
      if(opp1 != null && opp1 != ''){
        r.Opportunity1__c = opp1;
      }
      if(opp2 != null && opp2 != ''){
        r.Opportunity2__c = opp2;
      }
      if(opp3 != null && opp3 != ''){
        r.Opportunity3__c = opp3;
      }
    //康康p课题需要修改字段类型 后续跟进
      if(opp4 != null && opp4 != ''){
        r.Opportunity4__c = opp4;
      }
    //   if(opp5 != null && opp5 != ''){
    //     r.Opportunity5__c = opp5;
    //   }
      r.Opportunity_Situation__c = '引合発生';
    }
    else{
      r.Opportunity_Situation__c = '引合無';
    }
    if (String.isBlank(pro1) == false) {
      r.Product1__c = pro1;
    }
        if (sTime != null && sTime != '') {
            r.Operation_From__c = datetime.parse(sTime);
        }
        if (eTime != null && eTime != '') {
            r.Operation_To__c = datetime.parse(eTime);
        }
        upsert r;
    if (sTime != null && sTime != '') {
      r.Operation_From__c = datetime.parse(sTime);
    }
    if (eTime != null && eTime != '') {
      r.Operation_To__c = datetime.parse(eTime);
    }
    upsert r;
        if (String.isBlank(eventId) == false) updateEvent(r.id,eventId,recordType);
    if (String.isBlank(eventId) == false) updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
    WebService static String addReportNT(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String sTime, String eTime, String mainPlace){
        String rt = selectRecordType(recordType);
        List<Account> aList = selectAccount(aId);
  WebService static String addReportNT(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String visitor2, String visitor3, String visitor4, String visitor5, String sTime, String eTime, String mainPlace){
    String rt = selectRecordType(recordType);
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, From__c, To__c, Location__c from Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, From__c, To__c, Location__c from Report__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
        Report__c r = new Report__c();
    Report__c r = new Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Department__c = a.Id;
            r.Department_Class_Ref__c = a.Department_Class__r.Id;
            r.Hospital_Reference__c = a.Hospital__r.Id;
        } else {
            r.Manual_Name__c = aId;
        }
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Department__c = a.Id;
      r.Department_Class_Ref__c = a.Department_Class__r.Id;
      r.Hospital_Reference__c = a.Hospital__r.Id;
    } else {
      r.Manual_Name__c = aId;
    }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.RecordTypeId = rt;
        r.Event_Id__c = eventId;
        if(visitor1 != null && visitor1 != ''){
            r.Practitioner1__c = visitor1;
        }
        if(visitor2 != null && visitor2 != ''){
            r.Practitioner2__c = visitor2;
        }
        if(visitor3 != null && visitor3 != ''){
            r.Practitioner3__c = visitor3;
        }
        if(visitor4 != null && visitor4 != ''){
            r.Practitioner4__c = visitor4;
        }
        if(visitor5 != null && visitor5 != ''){
            r.Practitioner5__c = visitor5;
        }
        if(sTime != null && sTime != ''){
            //sTime = sTime.substring(0,16);
            r.From__c = datetime.parse(sTime);
        }
        if(eTime != null && eTime != ''){
            //eTime = eTime.substring(0,16);
            r.To__c = datetime.parse(eTime);
        }
        r.Location__c = mainPlace;
        upsert r;
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.RecordTypeId = rt;
    r.Event_Id__c = eventId;
    if(visitor1 != null && visitor1 != ''){
      r.Practitioner1__c = visitor1;
    }
    if(visitor2 != null && visitor2 != ''){
      r.Practitioner2__c = visitor2;
    }
    if(visitor3 != null && visitor3 != ''){
      r.Practitioner3__c = visitor3;
    }
    if(visitor4 != null && visitor4 != ''){
      r.Practitioner4__c = visitor4;
    }
    if(visitor5 != null && visitor5 != ''){
      r.Practitioner5__c = visitor5;
    }
    if(sTime != null && sTime != ''){
      //sTime = sTime.substring(0,16);
      r.From__c = datetime.parse(sTime);
    }
    if(eTime != null && eTime != ''){
      //eTime = eTime.substring(0,16);
      r.To__c = datetime.parse(eTime);
    }
    r.Location__c = mainPlace;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
    WebService static String addReportOn(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String v1Str, String startHour, String startMin, String endHour, String endMin, String description){
        List<Account> aList = selectAccount(aId);
  WebService static String addReportOn(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String v1Str, String startHour, String startMin, String endHour, String endMin, String description){
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<On_Call__c> oList = [select id, Daily_Report__c, Event_Id__c, segment__c from On_Call__c where id =:reportId];
            if(oList.size() > 0){
                return oList.get(0).id;
            }
        }
        On_Call__c o = new On_Call__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            o.segment__c = a.Id;
            // 病院ID(18桁)差込み
            o.Hospital__c = a.Hospital__r.Id;
        }
    if(reportId != null && reportId != ''){
      List<On_Call__c> oList = [select id, Daily_Report__c, Event_Id__c, segment__c from On_Call__c where id =:reportId];
      if(oList.size() > 0){
        return oList.get(0).id;
      }
    }
    On_Call__c o = new On_Call__c();
    if(aList.size() != 0){
      Account a = aList.get(0);
      o.segment__c = a.Id;
      // 病院ID(18桁)差込み
      o.Hospital__c = a.Hospital__r.Id;
    }
        o.Daily_Report__c = dailyReportId;
        o.OwnerId = repOwnerId;
        o.Event_Id__c = eventId;
        o.Responsible_Person_HP__c = v1Str;
        if(String.isBlank(description) == false){
            if(description.length() > 255){
                o.Customer_Problem_c__c = description.substring(0, 255);
            } else {
                o.Customer_Problem_c__c = description;
            }
    o.Daily_Report__c = dailyReportId;
    o.OwnerId = repOwnerId;
    o.Event_Id__c = eventId;
    o.Responsible_Person_HP__c = v1Str;
    if(String.isBlank(description) == false){
      if(description.length() > 255){
        o.Customer_Problem_c__c = description.substring(0, 255);
      } else {
        o.Customer_Problem_c__c = description;
      }
        }
        Date rDate = date.parse(reportDate);
        o.From_c__c = Datetime.newInstance(rDate.year(), rDate.month(), rDate.day(), Integer.valueOf(startHour), Integer.valueOf(StartMin), 0);
        o.To_c__c = Datetime.newInstance(rDate.year(), rDate.month(), rDate.day(), Integer.valueOf(endHour), Integer.valueOf(endMin), 0);
    }
    Date rDate = date.parse(reportDate);
    o.From_c__c = Datetime.newInstance(rDate.year(), rDate.month(), rDate.day(), Integer.valueOf(startHour), Integer.valueOf(StartMin), 0);
    o.To_c__c = Datetime.newInstance(rDate.year(), rDate.month(), rDate.day(), Integer.valueOf(endHour), Integer.valueOf(endMin), 0);
        upsert o;
        updateEvent(o.id,eventId,recordType);
        return o.id;
    }
    WebService static String addReportAc(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
        List<Account> aList = selectAccount(aId);
    upsert o;
    updateEvent(o.id,eventId,recordType);
    return o.id;
  }
  WebService static String addReportAc(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Visit_Report__c> rList = [select id, Daily_Report__c, Event_Id__c, Hospital_Reference__c, Department_Class__c, Department__c, Date__c from Visit_Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<Visit_Report__c> rList = [select id, Daily_Report__c, Event_Id__c, Hospital_Reference__c, Department_Class__c, Department__c, Date__c from Visit_Report__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
        Visit_Report__c r = new Visit_Report__c();
    Visit_Report__c r = new Visit_Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Reference__c = a.Hospital__r.Id;
            r.Department_Class__c = a.Department_Class__r.Id;
            r.Department__c = a.Id;
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Reference__c = a.Hospital__r.Id;
      r.Department_Class__c = a.Department_Class__r.Id;
      r.Department__c = a.Id;
//        } else {
//            r.Manual_Name__c = aId;
        }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.Event_Id__c = eventId;
        r.Evaluate_And_Problem__c = description;
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
    }
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.Event_Id__c = eventId;
    r.Evaluate_And_Problem__c = description;
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
        upsert r;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    WebService static String addClaim(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
        List<Account> aList = selectAccount(aId);
    return r.id;
  }
  WebService static String addClaim(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<QIS_Report__c> rList = [select id, Daily_Report__c, Event_Id__c, Hospital_Department__c, Date__c from QIS_Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<QIS_Report__c> rList = [select id, Daily_Report__c, Event_Id__c, Hospital_Department__c, Date__c from QIS_Report__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
        QIS_Report__c r = new QIS_Report__c();
    QIS_Report__c r = new QIS_Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Department__c = a.Id;
            r.Department_Class__c = a.Department_Class__r.Id;
            r.Hospital__c = a.Hospital__r.Id;
        }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.Event_Id__c = eventId;
        //r.Department_Class_Ref__c = a.Department_Class__r.Id;
        //r.Hospital_Reference__c = a.Hospital__r.Id;
        r.problem_detail__c = description;
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
        r.Generation_Source__c = '日报';
        r.Name = '*';
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Department__c = a.Id;
      r.Department_Class__c = a.Department_Class__r.Id;
      r.Hospital__c = a.Hospital__r.Id;
    }
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.Event_Id__c = eventId;
    //r.Department_Class_Ref__c = a.Department_Class__r.Id;
    //r.Hospital_Reference__c = a.Hospital__r.Id;
    r.problem_detail__c = description;
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
    r.Generation_Source__c = '日报';
    r.Name = '*';
        upsert r;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
    // MarketCondition or Competitor
    WebService static String addReportEx(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String reportDate, String description){
        String rt = selectRecordType(recordType);
        List<Account> aList = selectAccount(aId);
  // MarketCondition or Competitor
  WebService static String addReportEx(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String visitor1, String reportDate, String description){
    String rt = selectRecordType(recordType);
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
        Report__c r = new Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Department__c = a.Id;
            r.Department_Class_Ref__c = a.Department_Class__r.Id;
            r.Hospital_Reference__c = a.Hospital__r.Id;
        }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.RecordTypeId = rt;
        r.Event_Id__c = eventId;
        if (String.isBlank(visitor1) == false) {
            r.Person_In_Charge__c = visitor1;
        }
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
        r.Comment__c = description;
    if(reportId != null && reportId != ''){
      List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
    Report__c r = new Report__c();
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Department__c = a.Id;
      r.Department_Class_Ref__c = a.Department_Class__r.Id;
      r.Hospital_Reference__c = a.Hospital__r.Id;
    }
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.RecordTypeId = rt;
    r.Event_Id__c = eventId;
    if (String.isBlank(visitor1) == false) {
      r.Person_In_Charge__c = visitor1;
    }
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
    r.Comment__c = description;
        upsert r;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
    WebService static String addReportIm(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
        String rt = selectRecordType(recordType);
        List<Account> aList = selectAccount(aId);
  WebService static String addReportIm(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
    String rt = selectRecordType(recordType);
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<Report__c> rList = [select id, Daily_Report__c, RecordTypeId, Event_Id__c, Hospital_Department__c, Department_Class_Ref__c, Hospital_Reference__c, Date__c, Practitioner1__c, Practitioner2__c, Practitioner3__c, Practitioner4__c, Practitioner5__c, Comment__c from Report__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
        Report__c r = new Report__c();
    Report__c r = new Report__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital_Reference__c = a.Hospital__r.Id;
        }
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital_Reference__c = a.Hospital__r.Id;
    }
        r.Daily_Report__c = dailyReportId;
        r.OwnerId = repOwnerId;
        r.RecordTypeId = rt;
        r.Event_Id__c = eventId;
        if(reportDate != null && reportDate != ''){
            r.Date__c = date.parse(reportDate);
        }
        r.Comment__c = description;
    r.Daily_Report__c = dailyReportId;
    r.OwnerId = repOwnerId;
    r.RecordTypeId = rt;
    r.Event_Id__c = eventId;
    if(reportDate != null && reportDate != ''){
      r.Date__c = date.parse(reportDate);
    }
    r.Comment__c = description;
        upsert r;
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    return r.id;
  }
//    // Maintenance_Contract
//    WebService static String addMC(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description){
@@ -439,127 +441,127 @@
//        return r.id;
//    }
    // Rental_Apply
    WebService static String addRA(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description,String followOpps){
        List<Account> aList = selectAccount(aId);
  // Rental_Apply
  WebService static String addRA(String repOwnerId, String reportId, String dailyReportId, String eventId, String recordType, String aId, String reportDate, String description,String followOpps){
    List<Account> aList = selectAccount(aId);
        if(reportId != null && reportId != ''){
            List<Rental_Apply__c> rList = [select id, Daily_Report__c, Event_Id__c from Rental_Apply__c where id =:reportId];
            if(rList.size() > 0){
                return rList.get(0).id;
            }
        }
    if(reportId != null && reportId != ''){
      List<Rental_Apply__c> rList = [select id, Daily_Report__c, Event_Id__c from Rental_Apply__c where id =:reportId];
      if(rList.size() > 0){
        return rList.get(0).id;
      }
    }
        Rental_Apply__c r = new Rental_Apply__c();
    Rental_Apply__c r = new Rental_Apply__c();
        if(aList.size() != 0){
            Account a = aList.get(0);
            r.Hospital__c = a.Hospital__r.Id;
            r.Strategic_dept__c = a.Department_Class__r.Id;
            r.Account__c = a.Id;
        }
        r.Daily_Report__c = dailyReportId;
        r.Event_Id__c = eventId;
        r.Demo_purpose_text__c = description;
        r.Request_return_day__c = Date.today();
        r.Person_In_Charge__c = repOwnerId;
        r.applyUser__c = repOwnerId;
        if(followOpps!=null&&followOpps!=''){
            r.Follow_UP_Opp__c = followOpps;
        }
        upsert r;
    if(aList.size() != 0){
      Account a = aList.get(0);
      r.Hospital__c = a.Hospital__r.Id;
      r.Strategic_dept__c = a.Department_Class__r.Id;
      r.Account__c = a.Id;
    }
    r.Daily_Report__c = dailyReportId;
    r.Event_Id__c = eventId;
    r.Demo_purpose_text__c = description;
    r.Request_return_day__c = Date.today();
    r.Person_In_Charge__c = repOwnerId;
    r.applyUser__c = repOwnerId;
    if(followOpps!=null&&followOpps!=''){
      r.Follow_UP_Opp__c = followOpps;
    }
    upsert r;
        updateEvent(r.id,eventId,recordType);
    updateEvent(r.id,eventId,recordType);
        return r.id;
    }
    WebService static String selectRecordType(String recordTypeName){
        List<RecordType> rtList = [select id from RecordType where IsActive = true and DeveloperName =:recordTypeName];
        return rtList.get(0).id;
    }
    return r.id;
  }
  WebService static String selectRecordType(String recordTypeName){
    List<RecordType> rtList = [select id from RecordType where IsActive = true and DeveloperName =:recordTypeName];
    return rtList.get(0).id;
  }
    WebService static List<Account> selectAccount(String aId){
        List<Account> aList = new List<Account>();
        if (aId != null && aId.startsWith('001')) {
            aList = [select Id, Department_Class__r.Id, Hospital__r.Id from Account where Id =:aId];
        }
        return aList;
    }
  WebService static List<Account> selectAccount(String aId){
    List<Account> aList = new List<Account>();
    if (aId != null && aId.startsWith('001')) {
      aList = [select Id, Department_Class__r.Id, Hospital__r.Id from Account where Id =:aId];
    }
    return aList;
  }
    WebService static void updateEvent(String rId, String eventId, String recordType){
        Event__c e = [
            select id,Maintenance_Contract_ID__c, Asset_Manual_ID__c, Rental_Apply_ID__c,
                   Product_Description_Id__c, OPD_ID__c, NTC_ID__c, ReportAccompanied_ID__c, CityStatus_ID__c, Improvement_ID__c, Conflict_ID__c, Claim_ID__c
              from Event__c where id =:eventId
        ];
  WebService static void updateEvent(String rId, String eventId, String recordType){
    Event__c e = [
      select id,Maintenance_Contract_ID__c, Asset_Manual_ID__c, Rental_Apply_ID__c,
           Product_Description_Id__c, OPD_ID__c, NTC_ID__c, ReportAccompanied_ID__c, CityStatus_ID__c, Improvement_ID__c, Conflict_ID__c, Claim_ID__c
        from Event__c where id =:eventId
    ];
//        if(recordType == 'Maintenance_Contract'){
//            e.Maintenance_Contract_ID__c = rId;
//        }
        if(recordType == 'Rental_Apply'){
            e.Rental_Apply_ID__c = rId;
        }
        if(recordType == 'Asset_Manual'){
            e.Asset_Manual_ID__c = rId;
        }
        if(recordType == 'Product_Explanation'){
            e.Product_Description_Id__c = rId;
        }
        else if(recordType == 'OPD' || recordType == 'SIS'){
            e.OPD_ID__c = rId;
        }
        else if(recordType == 'NTC'){
            e.NTC_ID__c = rId;
        }
        else if(recordType == 'On_Call'){
            e.OnCall_ID__c = rId;
        }
        else if(recordType == 'Visit_With'){
            e.ReportAccompanied_ID__c = rId;
        }
        else if(recordType == 'MarketCondition'){
            e.CityStatus_ID__c = rId;
        }
        else if(recordType == 'Improvement'){
            e.Improvement_ID__c = rId;
        }
        else if(recordType == 'Competitor'){
            e.Conflict_ID__c = rId;
        }
        else if(recordType == 'Complaint'){
            e.Claim_ID__c = rId;
        }
    if(recordType == 'Rental_Apply'){
      e.Rental_Apply_ID__c = rId;
    }
    if(recordType == 'Asset_Manual'){
      e.Asset_Manual_ID__c = rId;
    }
    if(recordType == 'Product_Explanation'){
      e.Product_Description_Id__c = rId;
    }
    else if(recordType == 'OPD' || recordType == 'SIS'){
      e.OPD_ID__c = rId;
    }
    else if(recordType == 'NTC'){
      e.NTC_ID__c = rId;
    }
    else if(recordType == 'On_Call'){
      e.OnCall_ID__c = rId;
    }
    else if(recordType == 'Visit_With'){
      e.ReportAccompanied_ID__c = rId;
    }
    else if(recordType == 'MarketCondition'){
      e.CityStatus_ID__c = rId;
    }
    else if(recordType == 'Improvement'){
      e.Improvement_ID__c = rId;
    }
    else if(recordType == 'Competitor'){
      e.Conflict_ID__c = rId;
    }
    else if(recordType == 'Complaint'){
      e.Claim_ID__c = rId;
    }
        update e;
    }
    WebService static Product2 getProduct2(String a){
        Product2 p2 = [select Id, Name, Intra_Trade_Cost_RMB__c, Intra_Trade_List_RMB__c FROM Product2 Where Id =:a];
        return p2;
    }
    update e;
  }
  WebService static Product2 getProduct2(String a){
    Product2 p2 = [select Id, Name, Intra_Trade_Cost_RMB__c, Intra_Trade_List_RMB__c FROM Product2 Where Id =:a];
    return p2;
  }
    WebService static Product2 getProduct2US(String a){
        Product2 p2 = [select Id, Name, Foreign_Trade_Cost_US__c, Foreign_Trade_List_US__c FROM Product2 Where Id =:a];
        return p2;
    }
    WebService static String getReportId(String oId, String rDate){
        List<Daily_Report__c> rtList = [select Id from Daily_Report__c where OwnerId =:oId and Reported_Date__c =:date.parse(rDate)];
        return rtList.get(0).id;
    }
    WebService static String checkAccountMatch(String name, String id){
        List<Account> accList = [select Id from Account where Name = :name and Id = :id];
        if (accList.size() > 0) {
            return 'OK';
        }
        return 'NG';
    }
    WebService static Account getAccountForJs(String id){
        return [select Id, Name, Department_Class__r.Name, Department_Class__r.Id,
                Hospital__r.Name, Hospital__r.Id, Hospital__r.OCM_Category__c
                from Account where Id = :id];
    }
  WebService static Product2 getProduct2US(String a){
    Product2 p2 = [select Id, Name, Foreign_Trade_Cost_US__c, Foreign_Trade_List_US__c FROM Product2 Where Id =:a];
    return p2;
  }
  WebService static String getReportId(String oId, String rDate){
    List<Daily_Report__c> rtList = [select Id from Daily_Report__c where OwnerId =:oId and Reported_Date__c =:date.parse(rDate)];
    return rtList.get(0).id;
  }
  WebService static String checkAccountMatch(String name, String id){
    List<Account> accList = [select Id from Account where Name = :name and Id = :id];
    if (accList.size() > 0) {
      return 'OK';
    }
    return 'NG';
  }
  WebService static Account getAccountForJs(String id){
    return [select Id, Name, Department_Class__r.Name, Department_Class__r.Id,
        Hospital__r.Name, Hospital__r.Id, Hospital__r.OCM_Category__c
        from Account where Id = :id];
  }
}
force-app/main/default/classes/AssetMaintainController.cls
@@ -1,7 +1,7 @@
public with sharing class AssetMaintainController {
    public static Asset StaticAssetQuertResult;
    // 按钮区域
    public String assertQueryCondition {get; private set;}
    public String assertQueryCondition {get;set;}
    public Boolean allBlueFlag {get; private set;}  // 查看全部保有设备蓝色按钮Flag
    public Boolean consumableBlueFlag {get; private set;}  // 查看在库的保有设备蓝色按钮Flag
    public Boolean lendingBlueFlag {get; private set;}  // 查看出借中保有设备蓝色按钮Flag
force-app/main/default/classes/AssetModifyBelongsController.cls
@@ -7,6 +7,7 @@
    public Boolean checkexact { get; set; }  // 20230110 gzw 订单号精确查询用
    public AssetModifyBelongsChange__c ambc { get; set; }
    public static List<SelectOption> textOpts { get; private set; }
    public static Account ir { get; set; }
    //public static List<SelectOption> changeReasonOpts { get; private set; }
    static {
        textOpts = new List<SelectOption>();
@@ -61,6 +62,7 @@
        Id = ApexPages.currentPage().getParameters().get('Id');
        statusEdit = ApexPages.currentPage().getParameters().get('KeyWords');
        System.debug('Id:'+Id+'   accountId:'+RawAccountId+'  KeyWords:'+statusEdit);
        assetModifyBelongsChangeDetailRecords = new List<AssetModifyBelongsChangeDetailInfo>();
        assetModifyBelongsChangeDetailRecordsview = new List<AssetModifyBelongsChangeDetailInfo>();
        editAble = false;
@@ -68,14 +70,18 @@
        pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize);
        attachments = new List<Attachment>();
        List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
                                                   FROM ContentDocumentLink
                                                   WHERE LinkedEntityId = :Id];
        List<ID> fileIDs = new List<ID>();
        for (ContentDocumentLink docLink : cdlList) {
            fileIDs.add(docLink.ContentDocumentId);
        //update 李文涛 2023/07/13 更新lightning附件上传 start
        if(String.isNotBlank(Id)){
            List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
                                                       FROM ContentDocumentLink
                                                       WHERE LinkedEntityId = :Id];
            List<ID> fileIDs = new List<ID>();
            for (ContentDocumentLink docLink : cdlList) {
                fileIDs.add(docLink.ContentDocumentId);
            }
            contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        }
        contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        //update 李文涛 2023/07/13 更新lightning附件上传 end
    }
    public boolean getcheckUser() {
@@ -269,17 +275,7 @@
        if (String.isNotBlank(val1)) {
            val1 = val1.trim();
        }
        String soql='';
        System.debug(RawAccountId);
        RawAccountId='';
        if(String.isBlank(RawAccountId)){
            soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'\'';
            System.debug('id is null');
        }
        else {
            soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\'';
            System.debug('id is not null');
        }
        String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\'';
        if (!String.isBlank(text1)) {
            if (text1 == 'Order_No__c' && checkexact) {
                soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )';
@@ -344,21 +340,20 @@
    //跳转到上传附件页面
    public PageReference uploadingAttachment() {
        PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id);
        //PageReference ref = new Pagereference('/lightning/n/Excel?objectApiName&context=RECORD_DETAIL&backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3F0.source%3DalohaHeader&0.source='+Id+'&0.recordId='+Id+'');
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 start
    //跳转到上传附件页面(lightning)
    public PageReference uploadingAttachmentLightning() {
        //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id);
        PageReference ref = new Pagereference('/lightning/n/lightning?backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3Fcount%3D1&0.recordId='+Id+'');
        PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+Id+'');
        
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 end
    // CHAN-BC6BV2 XHL AddEnd 20190522
    //  重新刷新
    public PageReference returnChangePage() {
force-app/main/default/classes/AttachmentReQisHandler.cls
@@ -5,18 +5,18 @@
 */
public without sharing class AttachmentReQisHandler extends Oly_TriggerHandler{
    @TestVisible
    private Map<Id, ContentDocumentLink> newMap;
    private Map<Id, Attachment> newMap;
    @TestVisible
    private Map<Id, ContentDocumentLink> oldMap;
    private Map<Id, Attachment> oldMap;
    @TestVisible
    private List<ContentDocumentLink> newList;
    private List<Attachment> newList;
    @TestVisible
    private List<ContentDocumentLink> oldList;
    private List<Attachment> oldList;
    public AttachmentReQisHandler() {
        this.newMap = (Map<Id, ContentDocumentLink>) Trigger.newMap;
        this.oldMap = (Map<Id, ContentDocumentLink>) Trigger.oldMap;
        this.newList = (List<ContentDocumentLink>) Trigger.new;
        this.oldList = (List<ContentDocumentLink>) Trigger.old;
        this.newMap = (Map<Id, Attachment>) Trigger.newMap;
        this.oldMap = (Map<Id, Attachment>) Trigger.oldMap;
        this.newList = (List<Attachment>) Trigger.new;
        this.oldList = (List<Attachment>) Trigger.old;
    }
    @TestVisible
    protected override void afterInsert() {
@@ -24,41 +24,40 @@
        NoteMail();
    }
    private void NoteMail() {
        List<Id> linkIdList = new List<Id>();
        for (ContentDocumentLink link : newList) {
            linkIdList.add(link.Id);
        }
        newList = [select Id,LinkedEntityId,ContentDocumentId from ContentDocumentLink where Id in: linkIdList];
        String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
        List<Messaging.SingleEmailMessage> sendMails = new List<Messaging.SingleEmailMessage>();
        List<String> Rlist = new List<String>();
        List<String> ParentIdList = new List<String>();
        // QisID
        for (ContentDocumentLink link : newList) {
            if(String.valueOf(link.LinkedEntityId).startsWith('a0J')
                || String.valueOf(link.LinkedEntityId).startsWith('a0f')){
                Rlist.add(link.ContentDocumentId);
                ParentIdList.add(link.LinkedEntityId);
        for (Attachment att : newList) {
            if(String.valueOf(att.ParentId).startsWith('a0J')
                || String.valueOf(att.ParentId).startsWith('a0f')){
                Rlist.add(att.Id);
                ParentIdList.add(att.ParentId);
            }
        }
        // for (Attachment att : newList) {
        //     if(String.valueOf(att.ParentId).startsWith('a0J')
        //         || String.valueOf(att.ParentId).startsWith('a0f')){
        //         Rlist.add(att.Id);
        //         ParentIdList.add(att.ParentId);
        //     }
        // }
        // List<Attachment> NtList = [Select id,ParentId,Name,Body FROM Attachment where Id in : Rlist];
        List<ContentVersion> verList = [select Id,Title,VersionData,ContentDocumentId from ContentVersion where ContentDocumentId in: Rlist];
        List<Attachment> NtList = [Select id,ParentId,Name,Body FROM Attachment where Id in : Rlist];
        Map<Id,Repair__c> updateRprMap = new Map<Id,Repair__c>();
        Map<Id,QIS_Report__c> updateQisMap = new Map<Id,QIS_Report__c>();
        for (Repair__c re :[select id,Name,SerialNumber__c,Delivered_Product__r.Name,HP_Name__c
                                        from Repair__c where id in : ParentIdList] ) {
        //DB202308180733 P-新投诉系统GCHS项目--SQL中加入新字段-刘川-Latest_upload_time_attachments__c
        for (Repair__c re :[select id,Name,SerialNumber__c,Delivered_Product__r.Name,HP_Name__c,Latest_upload_time_attachments__c
                                        from Repair__c where id in : ParentIdList]) {
            //DB202308180733 P-新投诉系统GCHS项目-刘川-新字段赋值
            re.Latest_upload_time_attachments__c = DateTime.now();
            updateRprMap.put(re.id, re);
        }
        for (QIS_Report__c qi :[select id,Name,lot_or_serial__c,nonyushohin__r.Name,Hospital__r.Name
        //     DB202308180733 P-新投诉系统GCHS项目-刘川-更新字段
        if (updateRprMap != null && updateRprMap.size() > 0) {
            update updateRprMap.values();
        }
        for (QIS_Report__c qi :[select id,Name,lot_or_serial__c,nonyushohin__r.Name,Hospital__r.Name,Latest_upload_time_attachments__c
                                        from QIS_Report__c where id in : ParentIdList] ) {
            qi.Latest_upload_time_attachments__c = DateTime.now();
            updateQisMap.put(qi.id, qi);
        }
        //DB202308180733 P-新投诉系统GCHS项目-刘川-更新字段
        if (updateQisMap != null && updateQisMap.size() > 0) {
            update updateQisMap.values();
        }
        // Map<Id,Repair__c> updateRprMap = [select id,Name,SerialNumber__c,Delivered_Product__r.Name
        //                              from Repair__c where id in : ParentIdList];
@@ -74,12 +73,11 @@
            }
        }
        List<User> userList = [select Id, Name, Email, Manager.Email from User where id IN :IdList];
        for (ContentVersion version : verList) {
            ContentDocumentLink link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: version.ContentDocumentId limit 1];
            String titName = updateRprMap.containsKey(link.LinkedEntityId)? updateRprMap.get(link.LinkedEntityId).Name : updateQisMap.get(link.LinkedEntityId).Name;
            String prname = updateRprMap.containsKey(link.LinkedEntityId)? updateRprMap.get(link.LinkedEntityId).Delivered_Product__r.Name : updateQisMap.get(link.LinkedEntityId).nonyushohin__r.Name;
            String Serial = updateRprMap.containsKey(link.LinkedEntityId)? updateRprMap.get(link.LinkedEntityId).SerialNumber__c : updateQisMap.get(link.LinkedEntityId).lot_or_serial__c;
            String accountname = updateRprMap.containsKey(link.LinkedEntityId)? updateRprMap.get(link.LinkedEntityId).HP_Name__c : updateQisMap.get(link.LinkedEntityId).Hospital__r.Name;
        for (Attachment nt : NtList) {
            String titName = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).Name : updateQisMap.get(nt.ParentId).Name;
            String prname = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).Delivered_Product__r.Name : updateQisMap.get(nt.ParentId).nonyushohin__r.Name;
            String Serial = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).SerialNumber__c : updateQisMap.get(nt.ParentId).lot_or_serial__c;
            String accountname = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).HP_Name__c : updateQisMap.get(nt.ParentId).Hospital__r.Name;
            String title = '';
            String body = '';
            title = '【修理/QIS】:' + titName + '已新增附件,请查看';
@@ -89,12 +87,12 @@
            body += '<br/>';
            body += '机身号/批号 :' + Serial;
            body += '<br/>';
            body += '附件名称/备注名称:' + version.Title;
            body += '附件名称/备注名称:' + nt.Name;
            body += '<br/>';
            body += '操作担当:' + UserInfo.getName();
            body += '<br/>';
            body += '<br/>';
            body += '链接:' + baseUrl + '/' + link.LinkedEntityId +' ';
            body += '链接:' + baseUrl + '/' + nt.ParentId +' ';
            //收件邮箱
            List<String> toMailList = new List<String>();
            String uId = UserInfo.getUserId();
@@ -107,7 +105,6 @@
            List<String> ccMailList = new List<String>();
            ccMailList.add('gaozhangwei@prec-tech.com');
            ccMailList.add('wei_liang@olympus.com.cn');
            // ccMailList.add('chenjingwu@prec-tech.com');
            Messaging.SingleEmailMessage messageNEW = new Messaging.SingleEmailMessage();
            messageNEW.subject = title;
            messageNEW.htmlBody = body;
@@ -118,48 +115,6 @@
            }
            sendMails.add(messageNEW);
        }
        // for (Attachment nt : NtList) {
        //     String titName = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).Name : updateQisMap.get(nt.ParentId).Name;
        //     String prname = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).Delivered_Product__r.Name : updateQisMap.get(nt.ParentId).nonyushohin__r.Name;
        //     String Serial = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).SerialNumber__c : updateQisMap.get(nt.ParentId).lot_or_serial__c;
        //     String accountname = updateRprMap.containsKey(nt.ParentId)? updateRprMap.get(nt.ParentId).HP_Name__c : updateQisMap.get(nt.ParentId).Hospital__r.Name;
        //     String title = '';
        //     String body = '';
        //     title = '【修理/QIS】:' + titName + '已新增附件,请查看';
        //     body += '用户名:' + accountname;
        //     body += '<br/>';
        //     body += '产品名称/型号 :' + prname;
        //     body += '<br/>';
        //     body += '机身号/批号 :' + Serial;
        //     body += '<br/>';
        //     body += '附件名称/备注名称:' + nt.Name;
        //     body += '<br/>';
        //     body += '操作担当:' + UserInfo.getName();
        //     body += '<br/>';
        //     body += '<br/>';
        //     body += '链接:' + baseUrl + '/' + nt.ParentId +' ';
        //     //收件邮箱
        //     List<String> toMailList = new List<String>();
        //     String uId = UserInfo.getUserId();
        //     for (User u : userList) {
        //         if (u.Id != uId) {
        //             toMailList.add(u.Email);
        //         }
        //     }
        //     //抄送的邮箱
        //     List<String> ccMailList = new List<String>();
        //     ccMailList.add('gaozhangwei@prec-tech.com');
        //     ccMailList.add('wei_liang@olympus.com.cn');
        //     Messaging.SingleEmailMessage messageNEW = new Messaging.SingleEmailMessage();
        //     messageNEW.subject = title;
        //     messageNEW.htmlBody = body;
        //     messageNEW.setCharset('UTF-8');
        //     messageNEW.toAddresses = toMailList;
        //     if(ccMailList.size() > 0){
        //         messageNEW.ccAddresses = ccMailList;
        //     }
        //     sendMails.add(messageNEW);
        // }
        //在单个事务中,只能调用send方法 10 次。
        Messaging.SendEmailResult[] results = messaging.sendEmail(sendMails);
    }
force-app/main/default/classes/CheckAllOlympusAssetController.cls
@@ -1,7 +1,7 @@
public with sharing class CheckAllOlympusAssetController {
    public static Asset StaticAssetQuertResult;
    // 按钮区域
    public String assertQueryCondition {get; set;}
    public String assertQueryCondition {get; private set;}
    public Boolean allBlueFlag {get; private set;}  // 查看全部保有设备蓝色按钮Flag
    public Boolean consumableBlueFlag {get; private set;}  // 查看在库的保有设备蓝色按钮Flag
    public Boolean lendingBlueFlag {get; private set;}  // 查看出借中保有设备蓝色按钮Flag
@@ -214,27 +214,6 @@
                daysToExpiredOpts.add(new SelectOption('14', '两周内到期'));
            }
            return daysToExpiredOpts;
        }
        set;
    }
     //chenjingwu 2023.8.2
    //设备状态
    public List<SelectOption> assertQueryConditionOpts {
        get {
            if(assertQueryConditionOpts == null){
                assertQueryConditionOpts = new List<SelectOption>();
                assertQueryConditionOpts.add(new SelectOption('all', '--无--'));
                assertQueryConditionOpts.add(new SelectOption('consumable', '有效库存'));
                assertQueryConditionOpts.add(new SelectOption('lending', '借出分配数'));
                assertQueryConditionOpts.add(new SelectOption('repairing', '修理中'));
                assertQueryConditionOpts.add(new SelectOption('scrapping', '待报废'));
                assertQueryConditionOpts.add(new SelectOption('scrapped', '已报废'));
                assertQueryConditionOpts.add(new SelectOption('consumed', '已消耗'));
                assertQueryConditionOpts.add(new SelectOption('soonExpired', '即将到期'));
                assertQueryConditionOpts.add(new SelectOption('expired', '已过期'));
            }
            return assertQueryConditionOpts;
        }
        set;
    }
@@ -1229,7 +1208,9 @@
    public Date stringToDate(String dateStr) {  // Fri Jan 18 00:00:00 GMT 2019
        //System.debug('dateStr=====' + dateStr);
        return Date.valueOf(dateStr);
        dateStr = dateStr.split(' ')[0];
        return Date.valueOf(dateStr.replaceAll('/','-'));
        //String monthStr = dateStr.substring(4,7);
        //Integer dayStr = Integer.ValueOf(dateStr.substring(8,10));
        //Integer yearStr = Integer.ValueOf(dateStr.substring(24,28));
@@ -1290,11 +1271,11 @@
        }
        System.debug('333333');
        // 检索CSV中的ID检索Asset获得List<Asset>
        try {
        // try {
            if (allApiList.contains('Id')) {
                allApiList.remove(0);
            }
            if (importApiList.contains('Id(不可修改)')) {
            if (importApiList.contains('Id')) {
                importApiList.remove(0);
            }
            List<String> notIncludeApiList = new List<String>();
@@ -1328,7 +1309,11 @@
                    if (!queryAssetFieldResult.isCalculated()) {
                        if (queryAssetFieldResult.getType() == Schema.DisplayType.Date) {
                            if (tempCsvBody[i][j+1] != '') {
                                tempAsset.put(importApiList[j], stringToDate(tempCsvBody[i][j+1]));
                                String s = tempCsvBody[i][j+1].substring(0,1);
                                if(s == '2'){
                                    tempAsset.put(importApiList[j], stringToDate(tempCsvBody[i][j+1]));
                                }
                            }
                        } else if (queryAssetFieldResult.getType() == Schema.DisplayType.Boolean) {
                            if (tempCsvBody[i][j+1] != '') {
@@ -1391,11 +1376,11 @@
                ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.INFO, importSuccessfulMsg);
                ApexPages.addMessage(errorMessage);
            }
        } catch (Exception e) {
            System.debug('1234 ' + e);
            ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR, '导入过程出现错误,导入文件中可能存在Fieldset中不存在的列名,请检查CSV文件。');
            ApexPages.addMessage(errorMessage);
        }
        // } catch (Exception e) {
        //     System.debug('1234 ' + e);
        //     ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR, '导入过程出现错误,导入文件中可能存在Fieldset中不存在的列名,请检查CSV文件。');
        //     ApexPages.addMessage(errorMessage);
        // }
    }
force-app/main/default/classes/ConsumTrialPDFController.cls
@@ -224,7 +224,7 @@
    }
    public static string GetImageBase64(string id){
        List<ContentVersion> version = [select VersionData from ContentVersion where ContentDocumentId =: id];
        List<ContentVersion> version = [select VersionData from ContentVersion where Id =: id];
        // List<Attachment> atts = [SELECT Id, IsDeleted, ParentId, Name, IsPrivate, ContentType, BodyLength, Body, OwnerId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Description FROM Attachment where id=:id];
        if (version.size()==0) {
            return null;
force-app/main/default/classes/GuaranteePeriodAlterationController.cls
@@ -48,7 +48,7 @@
    public String Id  { get; set; }
    public Boolean isShow { get; set; }
    public List<Attachment> attachments { get; set; }
    public List<ContentDocument> contents { get; set; }
    public List<ContentDocument> contents { get; set; }//update by liwentao 更新lightning附件上传
    //分页功能
    public Integer pageLimit{get;set;}
    public String soql {get;set;}
@@ -66,14 +66,18 @@
        pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize);
        attachments = new List<Attachment>();
        List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
                                                   FROM ContentDocumentLink
                                                   WHERE LinkedEntityId = :Id];
        List<ID> fileIDs = new List<ID>();
        for (ContentDocumentLink docLink : cdlList) {
            fileIDs.add(docLink.ContentDocumentId);
        //update 李文涛 2023/07/13 更新lightning附件上传 start
        if(String.isNotBlank(Id)){
            List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
                                                       FROM ContentDocumentLink
                                                       WHERE LinkedEntityId = :Id];
            List<ID> fileIDs = new List<ID>();
            for (ContentDocumentLink docLink : cdlList) {
                fileIDs.add(docLink.ContentDocumentId);
            }
            contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        }
        contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        //update 李文涛 2023/07/13 更新lightning附件上传 end
    }
    // 画面初始化
@@ -189,14 +193,14 @@
        }
        if (String.isNotBlank(Statu_AchievementsId)) {
            statu_AchievementId = Statu_AchievementsId;
        }  else {
        }  else if(String.isNotBlank(ambc.GpaaStatu_Achievements__c)) {
            statu_AchievementId = ambc.GpaaStatu_Achievements__c;
        } else{
            statu_AchievementId='';
        }
        statu_AchievementId='';
        String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c,guarantee_period__c,RepairQuantity__c from Asset where Backorder__c = \'' + statu_AchievementId +'\'';
        soql += ' AND AssetMark__c != \'耗材\'';
        if(!String.isBlank(text1)){
                soql += ' AND ('+ text1 +' like \'%' + String.escapeSingleQuotes(val1.replaceAll('%', '\\%')) + '%\' )';
        }
        soql += ' limit 200';
@@ -260,13 +264,15 @@
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 start
    //跳转到上传附件页面Lightning
    public PageReference uploadingAttachmentLightning(){
        //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id +'&retURL=%2Fapex/AssetGuaranteePeriodAlteration?Id='+Id);
        PageReference ref = new Pagereference('/lightning/n/lightning?objectApiName&context=RECORD_DETAIL&backgroundContext=%2Flightning%2Fr%2FAssetGuaranteePeriodAlteration__c%2F'+Id+'%2Fedit%3F0.source%3DalohaHeader&0.recordId='+Id+'');
        PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+Id+'');
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 start
    //查找"保有设备"是否含有"QIS"和"修理"和"保有设备的保修期限变更过"
    public Boolean find_QIS_Repair(List<String> assetIdList) {
@@ -311,7 +317,7 @@
        GuaranteePeriodAlterationApplication__c  agAlteration = new GuaranteePeriodAlterationApplication__c();
        agAlteration.Id = Id;
        attachments = seekAttachment();
        if (ambc.ChangeReason__c == '集中采购,未分配到医院' && attachments.size() == 0) {
        if (ambc.ChangeReason__c == '集中采购,未分配到医院' && contents.size() == 0) {
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '请上传标书')); 
            return null;
        }  
force-app/main/default/classes/InsReportPDFOuterController.cls
@@ -96,7 +96,7 @@
        PageReference pageRef = new PageReference(pdfPageURL);
        ContentVersion version = new ContentVersion();
        if (!Test.isRunningTest()) {
            version.VersionData = pageRef.getContent();
            version.VersionData = pageRef.getContentAsPDF();
        } else {
            version.VersionData = EncodingUtil.base64Decode('test');
        }
force-app/main/default/classes/InventoryResultRecordController.cls
@@ -1,16 +1,4 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-12 11:08:28
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-08 18:43:40
 */
public with sharing class InventoryResultRecordController {
    // 按钮区域
    public Boolean inventoryBlueFlag {get; private set;}  // 查看盘点蓝色按钮Flag
    public Boolean rentBlueFlag {get; private set;}  // 查看备品蓝色按钮Flag
    public Boolean consumBlueFlag {get; private set;}  // 查看耗材盘点蓝色按钮Flag
    // 检索区域
    public String fixtureModelNo {get; set;}  // 备品配套明细型号 Fixture_Model_No__c
    public String assetStatus {get; set;}  // 备品状态 Asset_Status__c
@@ -45,6 +33,8 @@
    private String mainAstQR = '';
    public boolean doneFlg {get; set;}
    public boolean canDoFlg {get; set;}
    public List<AggregateResult> idListBean = new List<AggregateResult>();
    public List<AggregateResult> cidListBean = new List<AggregateResult>();
    public List<SelectOption> assetStatusOptionList {
        get {
@@ -63,13 +53,6 @@
            selectOptions.add(new SelectOption('耗材', '耗材'));
            return selectOptions;
        }
    }
    // 初始化按钮颜色
    public void initSearchButtonColor() {
        inventoryBlueFlag = true;
        rentBlueFlag = false;
        consumBlueFlag = false;
    }
    // 所在地区(本部)PlickList
@@ -168,7 +151,6 @@
    // 画面初始化
    public void init() {
        initSearchButtonColor();
        angecylookrole = false;
        bpPankuiYing = NONE;
        ifInternalAsset = NONE;
@@ -255,13 +237,15 @@
                        inventoryHeader = ih;
                        canDoFlg = canDoFlg || !System.Approval.isLocked(inventoryHeader.Id);
                        List<AggregateResult> fixAssetList = [
                        idListBean = [
                                Select Internal_Asset_Flg__c fix, Asset_Status__c status, sum(toAbandon_amount__c) abAmount, sum(Amount__c) amount, sum(Inventory_Count__c) acAmount
                                From Inventory_Detail__c//20210525 you 1650
                                Where Inventory_Header__c = :inventoryHeader.Id AND Asset_Status__c <> '丢失借出明细' AND Asset_Status__c <> '丢失调拨明细'
                                group by Internal_Asset_Flg__c, Asset_Status__c];
                        unfixAssetMap = getInitData(fixAssetList, 'unfix');
                        fixAssetMap = getInitData(fixAssetList, 'fix');
                        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
                        // unfixAssetMap = getInitData(aBean, 'unfix');
                        // fixAssetMap = getInitData(aBean, 'fix');
                        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
                    }
                }
                else{
@@ -278,13 +262,15 @@
                    else{
                        consumInventoryHeader = ih;
                        canDoFlg = canDoFlg || !System.Approval.isLocked(consumInventoryHeader.Id);
                        List<AggregateResult> consumAssetList = [
                        cidListBean = [
                                Select Internal_Asset_Flg__c fix, Asset_Status__c status, sum(toAbandon_amount__c) abAmount, sum(Amount__c) amount, sum(Inventory_Count__c) acAmount
                                From Consum_Inventory_Detail__c
                                Where Inventory_Header__c = :consumInventoryHeader.Id
                                AND Asset_Status__c != '已消耗明细'
                                group by Internal_Asset_Flg__c, Asset_Status__c];
                        consumAssetMap = getInitData(consumAssetList, 'consum');
                        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
                        //consumAssetMap = getInitData(aBean, 'consum');
                        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
                    }
                }
                else{
@@ -292,13 +278,60 @@
                }
            }
        }
        //System.assertEquals('qyj','unfixAssetMap'+unfixAssetMap);
        //System.assertEquals('qyj','fixAssetMap'+fixAssetMap);
        //System.assertEquals('qyj','consumAssetMap'+consumAssetMap);
        sumRateMap = getRateMap(unfixAssetMap.get('allsum')+fixAssetMap.get('allsum')+consumAssetMap.get('allsum')
                                , unfixAssetMap.get('dsum')+fixAssetMap.get('dsum')+consumAssetMap.get('dsum')
                                , unfixAssetMap.get('acsum')+fixAssetMap.get('acsum')+consumAssetMap.get('acsum'));
        //sumRateMap = getRateMap(unfixAssetMap.get('allsum')+fixAssetMap.get('allsum')+consumAssetMap.get('allsum')
        //                        , unfixAssetMap.get('dsum')+fixAssetMap.get('dsum')+consumAssetMap.get('dsum')
        //                        , unfixAssetMap.get('acsum')+fixAssetMap.get('acsum')+consumAssetMap.get('acsum'));
    }
    //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
    public void showResult() {
        unfixAssetMap = getInitData(new List<AggregateResult>(), 'unfix');
        fixAssetMap = getInitData(new List<AggregateResult>(), 'fix');
        consumAssetMap = getInitData(new List<AggregateResult>(), 'consum');
        List<Inventory_Header__c> ihList = [
            select Id, Inventory_Status__c, Name, Internal_asset_location__c, Inventory_Start_Date__c, Fixture_Header__c
              from Inventory_Header__c
             where Inventory_Status__c <> '已批准' and Internal_asset_location__c =:bieCunFangDi
                and Inventory_Start_Date__c = LAST_N_DAYS:30
                ORDER BY Fixture_Header__c NULLS FIRST];
        System.debug('20230710 00:28--ihList--' + ihList);
        for(Inventory_Header__c ih:ihList){
            if(String.isBlank(ih.Fixture_Header__c)) {
                if( String.isNotBlank(ih.Inventory_Status__c)){
                    if (ih.Inventory_Status__c == '处理中') {
                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '盘点处理中,请等待Batch处理完毕。Batch处理完毕后会发送处理结果邮件。'));
                    }
                    else{
                         unfixAssetMap = getInitData(idListBean, 'unfix');
                         fixAssetMap = getInitData(idListBean, 'fix');
                    }
                }
                else{
                    unfixAssetMap = getInitData(new List<AggregateResult>(), 'unfix');
                    fixAssetMap = getInitData(new List<AggregateResult>(), 'fix');
                }
            }
            else {
                if (String.isNotBlank(ih.Inventory_Status__c)) {
                    if (ih.Inventory_Status__c == '处理中') {
                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '耗材盘点处理中,请等待Batch处理完毕。Batch处理完毕后会发送处理结果邮件。'));
                    }
                    else{
                        consumAssetMap = getInitData(cidListBean, 'consum');
                    }
                }
                else{
                    consumAssetMap = getInitData(new List<AggregateResult>(), 'consum');
                }
            }
        }
        sumRateMap = getRateMap(unfixAssetMap.get('allsum')+fixAssetMap.get('allsum')+consumAssetMap.get('allsum')
                                 , unfixAssetMap.get('dsum')+fixAssetMap.get('dsum')+consumAssetMap.get('dsum')
                                 , unfixAssetMap.get('acsum')+fixAssetMap.get('acsum')+consumAssetMap.get('acsum'));
    }
    //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
    //public void checkQRCode() {
    //    String soqlWhere = '';
@@ -617,6 +650,12 @@
                Decimal newCount_int = newCount == null ? 0 : newCount;
                if (oldCount_int == newCount_int && !((oldCount == null && newCount == 0) || (oldCount == 0 && newCount == null))) continue;
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start
                if (String.isBlank(idc.Appearance_Check_Result__c) || String.isBlank(idc.Package_Check_Result__c)) {
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '外观和包装必须有值,请重新确认。'));
                    return;
                }
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End
                if (idc.Inventory_Count__c != null) {
                    idc.InventoryPerson1__c = inventoryUser1 == NONE ? null : inventoryUser1;
                    idc.InventoryPerson2__c = inventoryUser2 == NONE ? null : inventoryUser2;
@@ -640,6 +679,12 @@
                Decimal newCount_int = newCount == null ? 0 : newCount;
                if (oldCount_int == newCount_int && !((oldCount == null && newCount == 0) || (oldCount == 0 && newCount == null))) continue;
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start
                if (String.isBlank(idc.Expiration_Check_Result__c) || String.isBlank(idc.Appearance_Check_Result__c) || String.isBlank(idc.Package_Check_Result__c)) {
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '效期、外观和包装必须有值,请重新确认。'));
                    return;
                }
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End
                if (idc.Inventory_Count__c != null) {
                    idc.InventoryPerson1__c = inventoryUser1 == NONE ? null : inventoryUser1;
                    idc.InventoryPerson2__c = inventoryUser2 == NONE ? null : inventoryUser2;
@@ -677,9 +722,8 @@
        } catch (exception e) {
            doneFlg = false;
            System.debug(e.getStackTraceString());
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,e.getMessage()));
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,e.getDmlMessage(0)));
        }
    }
    public void searchBtn() {
@@ -734,12 +778,18 @@
            }
            String soqlAsset = 'select '
                                + 'Id, Asset__r.SerialNumber, Inventory_Count__c, Asset__c, Asset__r.Manage_type__c, '
                                + ' Fixture_Model_No__c, Fixture_QRCode__c, Asset_Status__c, WH_location__c, Amount__c, Salesdepartment__c,Asset__r.Product2.Packing_list_Fixture_F__c';
                                + ' Fixture_Model_No__c, Fixture_QRCode__c, Asset_Status__c, WH_location__c, Amount__c, Salesdepartment__c,Asset__r.Product2.Packing_list_Fixture_F__c'
                                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start
                                + ', Appearance_Check_Result__c, Package_Check_Result__c';
                                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End
            if(isConsum){
                soqlAsset += ', Barcode__c, Asset__r.Product_Serial_No__c ';
                //add by rentx 20210823 start 耗材盘点时记录code ---- 
                soqlAsset += ', HCCodes__c ';
                //add by rentx 20210823 end 耗材盘点时记录code 
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start
                soqlAsset += ', Expiration_Check_Result__c, Consumable_Guaranteen_end__c ';
                // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End
                soqlAsset += 'from Consum_Inventory_Detail__c ';
            }
            else{
@@ -844,13 +894,15 @@
                    allHCCodelist.add(idl.HCCodes__c);
                    //add by rentx 20210901 end
                }
                List<AggregateResult> consumAssetList = [
                        Select Internal_Asset_Flg__c fix, Asset_Status__c status, sum(toAbandon_amount__c) abAmount, sum(Amount__c) amount, sum(Inventory_Count__c) acAmount
                        From Consum_Inventory_Detail__c
                        Where Inventory_Header__c = : ih.Id
                        and Asset_Status__c != '已消耗明细'
                        group by Internal_Asset_Flg__c, Asset_Status__c];
                consumAssetMap = getInitData(consumAssetList, 'consum');
                //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
                // List<AggregateResult> consumAssetList = [
                //         Select Internal_Asset_Flg__c fix, Asset_Status__c status, sum(toAbandon_amount__c) abAmount, sum(Amount__c) amount, sum(Inventory_Count__c) acAmount
                //         From Consum_Inventory_Detail__c
                //         Where Inventory_Header__c = : ih.Id
                //         and Asset_Status__c != '已消耗明细'
                //         group by Internal_Asset_Flg__c, Asset_Status__c];
                // consumAssetMap = getInitData(consumAssetList, 'consum');
                //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
            }
            else{
                inventoryDetailList = Database.query(soqlAsset);
@@ -865,21 +917,23 @@
                    oldCountMap.put(idl.Id, idl.Inventory_Count__c);
                }
                List<AggregateResult> fixAssetList = [
                //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
                /*List<AggregateResult> fixAssetList = [
                        Select Internal_Asset_Flg__c fix, Asset_Status__c status, sum(toAbandon_amount__c) abAmount, sum(Amount__c) amount, sum(Inventory_Count__c) acAmount
                        From Inventory_Detail__c //20210525 you 1650
                        Where Inventory_Header__c = :ih.Id AND Asset_Status__c <> '丢失借出明细' AND Asset_Status__c <> '丢失调拨明细'
                        group by Internal_Asset_Flg__c, Asset_Status__c];
                unfixAssetMap = getInitData(fixAssetList, 'unfix');
                fixAssetMap = getInitData(fixAssetList, 'fix');
                fixAssetMap = getInitData(fixAssetList, 'fix');*/
                //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
            }
        }
        sumRateMap = getRateMap(unfixAssetMap.get('allsum')+fixAssetMap.get('allsum')+consumAssetMap.get('allsum')
        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 start
        /*sumRateMap = getRateMap(unfixAssetMap.get('allsum')+fixAssetMap.get('allsum')+consumAssetMap.get('allsum')
        , unfixAssetMap.get('dsum')+fixAssetMap.get('dsum')+consumAssetMap.get('dsum')
        , unfixAssetMap.get('acsum')+fixAssetMap.get('acsum')+consumAssetMap.get('acsum'));
        //System.assertEquals('qyj',''+sumRateMap);
        , unfixAssetMap.get('acsum')+fixAssetMap.get('acsum')+consumAssetMap.get('acsum'));*/
        //20230506  sx DB202303526794【系统调查】备品中心盘点系统调查 end
        List<Inventory_User_Permission__mdt> usrList = [select InventoryUser__c from Inventory_User_Permission__mdt where Label = :bieCunFangDi];
        Id[] usrArray = usrList[0].InventoryUser__c.split(',');
@@ -1077,8 +1131,4 @@
        }
        return rateMap;
    }
    @TestVisible private static void test() {
        Integer i = 0;
      }
}
force-app/main/default/classes/MaintenanceProductDataController.cls
@@ -1104,7 +1104,7 @@
        // PageReference ref = new Pagereference('/p/attach/NoteAttach?pid='+id+'&retURL=%2F' + '/apex/MaintenanceProductData?id=' +id);
        // ref.setRedirect(true);
        // return ref;
        PageReference ref = new Pagereference('/lightning/n/lightning?backgroundContext=%2Flightning%2Fr%2FMaintenance_Product_Data__c%2F'+id+'%2Fedit%3Fcount%3D1&0.recordId='+id+'');
        PageReference ref = new Pagereference('/lightning/n/LexUploadPage?0.recordId='+id+'');
        ref.setRedirect(true);
        return ref;
    }
force-app/main/default/classes/MaintenanceProductDataController.cls-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <apiVersion>53.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/MonthlyReportController.cls
@@ -59,10 +59,18 @@
        update report;
        return null;
       } catch (Exception e) {
        String eMessage = e.getMessage();
        Integer left = eMessage.indexOf(',') + 1;
        Integer right = eMessage.length();
        return eMessage.substring(left,right);
        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();
        }
       }
    }
force-app/main/default/classes/NFM401Controller.cls
@@ -583,27 +583,35 @@
                //     }
                // }
                List<ContentDocumentLink> attList = rAMap.get(rr.id);
                if (attList != null && attList.size() > 0) {
                    List<Id> idList = new List<Id>();
                    for(ContentDocumentLink rpd : attList){
                        ContentVersion version = [
                            select
                            Title,
                            VersionData,
                            ContentSize
                            from ContentVersion where ContentDocumentId =: rpd.ContentDocumentId
                        ];
                        idList.add(rpd.ContentDocumentId);
                    }
                    List<ContentVersion> version = [
                        select
                        Title,
                        VersionData,
                        ContentSize
                        from ContentVersion where ContentDocumentId in: idList
                    ];
                    Integer i = 0;
                    for(ContentDocumentLink rpd : attList){
                        //2020-11-05  如果附件大小超过1.5mb 发送邮件提示
                        if (version.ContentSize > 1048576) {
                            sendemail(version,'修理'+rr.Name);
                        if (version[i].ContentSize > 1048576) {
                            sendemail(version[i],'修理'+rr.Name);
                        }else{
                            Attachment_element Attachmentdet = new Attachment_element();
                            RepairRequest.ATTACHMENT.add(Attachmentdet);
                            Attachmentdet.FILE_DATA = EncodingUtil.base64Encode(version.VersionData);
                            Attachmentdet.FILE_DATA = EncodingUtil.base64Encode(version[i].VersionData);
                            Attachmentdet.ATTACHMENT_FIELD_NAME = 'COMPLAINTS_DOCUMENT_ATTACHMENT';
                            Attachmentdet.FILE_NAME = version.Title;
                            Attachmentdet.FILE_NAME = version[i].Title;
                            Attachmentdet.GLOBAL_ATTRIBUTE1 = 'COMPLAINT';
                            Attachmentdet.RECORD_INSERTED_DATE = NFMUtil.formatDate2Str(Date.today());
                        }
                        i++;
                    }
                }
            }
force-app/main/default/classes/NFM609FiledDownloadBatch.cls
@@ -110,12 +110,14 @@
            if (ContentLength < 12582912) {
                Blob bodyAsBlob = response.getBodyAsBlob();
                version.VersionData = bodyAsBlob;
                version.PathOnClient = attachmentName + '.txt';
                // atta.Body = bodyAsBlob;
                result.add(version);
            } else {
                // atta.Name = '文件大小超过12M,请在新服务系统查看';
                // atta.Body = Blob.valueOf('文件大小超过12M');
                version.Title = '文件大小超过12M,请在新服务系统查看';
                version.PathOnClient = '文件大小超过12M,请在新服务系统查看.txt';
                version.VersionData = Blob.valueOf('文件大小超过12M');
                result.add(version);
            }
force-app/main/default/classes/NotetoPdfHandler.cls
@@ -16,13 +16,19 @@
    }
    @TestVisible
    protected override void afterInsert() {
        Set<Id> ids = new Set<Id>();
        for (ContentDocumentLink link : newList) {
            ids.add(link.ContentDocumentId);
        }
        List<ContentVersion> version = [select Id from ContentVersion where ContentDocumentId in: ids and FileType = 'SNOTE'];
        if(version != null){
            NotetoPdf();
        }
        // 修理ID
        NotetoPdf();
        // NoteMail();
        NoteMail();
    }
    // 修理和QIS新建备注时,生成对应的PDF
    private void NotetoPdf() {
        StaticParameter.AttachmentTrigger = false;
        List<String> Rlist = new List<String>();
        // QisID
        for (ContentDocumentLink link : newList) {
@@ -63,7 +69,7 @@
        //     }
        // }
        // List<Attachment> NtList = [Select id,ParentId,Name,Body FROM Attachment where Id in : Rlist];
        List<ContentVersion> verList = [select Id,Title,VersionData,ContentDocumentId from ContentVersion where ContentDocumentId in: Rlist];
        List<ContentVersion> verList = [select Id,TextPreview,Title,VersionData,ContentDocumentId from ContentVersion where ContentDocumentId in: Rlist];
        Map<Id,Repair__c> updateRprMap = new Map<Id,Repair__c>();
        Map<Id,QIS_Report__c> updateQisMap = new Map<Id,QIS_Report__c>();
        for (Repair__c re :[select id,Name,SerialNumber__c,Delivered_Product__r.Name,HP_Name__c
@@ -96,7 +102,12 @@
            String accountname = updateRprMap.containsKey(link.LinkedEntityId)? updateRprMap.get(link.LinkedEntityId).HP_Name__c : updateQisMap.get(link.LinkedEntityId).Hospital__r.Name;
            String title = '';
            String body = '';
            title = '【修理/QIS】:' + titName + '已新增文件,请查看';
            if(version.TextPreview != null){
                title = '【修理/QIS】:' + titName + '已新增备注,请查看';
            }else{
                title = '【修理/QIS】:' + titName + '已新增文件,请查看';
            }
            body += '用户名:' + accountname;
            body += '<br/>';
            body += '产品名称/型号 :' + prname;
force-app/main/default/classes/OPDNoReportApplicationController.cls
@@ -53,7 +53,7 @@
        for (ContentDocumentLink docLink : cdlList) {
        fileIDs.add(docLink.ContentDocumentId);
        }
        attachmentinfo=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        attachmentinfo=[SELECT Id,Title,OwnerId from ContentDocument WHERE Id IN :fileIDs];
        // attachmentinfo = [SELECT Id, Name,OwnerId FROM Attachment WHERE  parentid = :paramId];
@@ -127,7 +127,7 @@
            opdPlan.noReportStatus__c = '已保存';
            System.debug('opdPlan2:'+opdPlan);
            update opdPlan;
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM, '保存完毕!'));
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM, '保存完毕!'));
            saveFlag = true;
        }catch(exception e){
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, e.getMessage()));
force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,9 +4,24 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 11:16:07
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-29 16:53:17
 * @LastEditTime: 2023-09-08 16:57:51
 */
public with sharing class OpportunityLightingButtonController {
    @AuraEnabled
    public static List<Lost_cancel_report__c> queryForEditLostButton(String recordId){
        List<Lost_cancel_report__c> res = new List<Lost_cancel_report__c>();
        try {
            List<Lost_cancel_report__c> re = [
                select id,
                Report_Status__c,
                RecordTypeId
                from Lost_cancel_report__c where RecordTypeId != '01210000000R4hHAAS' and Opportunity__c =: recordId];
            res = re;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    @AuraEnabled
    public static InitData initForPredictedDateChangeButton(String recordId){
        InitData res = new InitData();
@@ -45,9 +60,21 @@
                IF_Submit__c ,
                Trade__c,
                Is_Corrosion__c,
                If_Authorizing_Lock__c
                If_Authorizing_Lock__c,
                AccDealerBlacklist__c,
                Agency1__c,
                Agency2__c,
                Hospital__c,
                OwnerId,
                Sales_assistant_name_text__c
                from Opportunity where Id =: recordId 
            ];
            res.AccDealerBlacklist = opportunity.AccDealerBlacklist__c;
            res.angency1 = opportunity.Agency1__c;
            res.angency2 = opportunity.Agency2__c;
            res.accname = opportunity.Hospital__c;
            res.ownerids = opportunity.OwnerId;
            res.ddid = opportunity.Sales_assistant_name_text__c;
            res.agency1Id = opportunity.Agency1_ID_18__c;
            res.stageName = opportunity.StageName;
            res.sapSendOK = opportunity.SAP_Send_OK__c;
@@ -264,6 +291,36 @@
        return res;
    }
    @AuraEnabled
    public static InitData initForLexQuoteEntryNewbotton(String recordId){
        InitData res = new InitData();
        try {
            Opportunity opportunity = [
                select
                Agency_Is_Delete__c,
                Account_Is_Active__c,
                Hospital_Is_Active__c,
                RecordTypeId,
                Estimation_Decision__c
                from Opportunity where Id =: recordId
            ];
            res.agencyIsDeletec = opportunity.Agency_Is_Delete__c;
            res.accountIsActivec = opportunity.Account_Is_Active__c;
            res.hospitalIsActivec = opportunity.Hospital_Is_Active__c;
            res.recordTypeId = opportunity.RecordTypeId;
            res.estimationDecisionc = opportunity.Estimation_Decision__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    @AuraEnabled
    public static Boolean describeSObjectCommon (String objname)
    {
        Schema.DescribeSobjectResult schemaMap = Schema.describeSObjects(new String[]{objname})[0];
        return schemaMap.isCreateable();
    }
    @AuraEnabled
    public static InitData initForQuotationRequestButton(String recordId){
        InitData res = new InitData();
        try {
@@ -431,7 +488,7 @@
            res.accountId = opp.AccountId;
            res.accountName = acc.Name;
            res.name = opp.Name;
            res.recordTypeId = Schema.SObjectType.Task.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP).getRecordTypeId();
            // res.recordTypeId = Schema.SObjectType.Task.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
@@ -901,5 +958,29 @@
        public String oppForecastStatus;
        @AuraEnabled
        public String oppId;
        @AuraEnabled
        public String AccDealerBlacklist;
        @AuraEnabled
        public String angency1;
        @AuraEnabled
        public String angency2;
        @AuraEnabled
        public String accname;
        @AuraEnabled
        public String ownerids;
        @AuraEnabled
        public String ddid;
        @AuraEnabled
        public String agencyIsDeletec;
        @AuraEnabled
        public String accountIsActivec;
        @AuraEnabled
        public String hospitalIsActivec;
        @AuraEnabled
        public Boolean estimationDecisionc;
        @AuraEnabled
        public String reportStatus;
        @AuraEnabled
        public String reportId;
    }
}
force-app/main/default/classes/OpportunityWebService.cls
@@ -43,6 +43,7 @@
        this.parameter = 'value';
    }
    @AuraEnabled
    WebService static String oppCheck(String oppid, String saveFlg) {
        Map<Id, String> proMap= new Map<Id, String>();
@@ -69,6 +70,7 @@
    }
    // LHJ 阿西赛多检查 Start
    @AuraEnabled
    WebService  static String checkDangerItem(String agency1) {
        //没有危化品证照的提示信息
        String licenseStr = '第一经销商没有有效的危险化学品经营许可证。';
@@ -391,6 +393,7 @@
        }
    }
    @AuraEnabled
    WebService static String updReg(String  oppid) {
        List<OpportunityLineItem> updList = new List<OpportunityLineItem>();
@@ -419,6 +422,7 @@
    //贸易合规 20230307 you start
    //营业拦截提醒
    @AuraEnabled
    WebService static Boolean accSendEmail(String  AccDealerBlacklist,String accname,String angency1,String angency2,String ownerids,String ddid,String oppid) {
      //发送邮件
        List<Messaging.SingleEmailMessage> sendMails = new List<Messaging.SingleEmailMessage>();
@@ -502,6 +506,7 @@
    //服务拦截提醒 
    //【新建询价】检查点仅通知合同组 sendalert=Main_Con 
    //【报价Decide】检查点邮件通知人员:合同组、FSE领导、服务助理(标签) sendalert=decide_con
    @AuraEnabled
    WebService static Boolean accSendEmailFW(String  AccDealerBlacklist,String accname,String angency,String mcid,String sendalert,String[] FSEStr) {
      //发送邮件
        List<Messaging.SingleEmailMessage> sendMails = new List<Messaging.SingleEmailMessage>();
@@ -532,20 +537,33 @@
        //    }
        //}
        //MailsList.add('youchang@prec-tech.com');
        MailsList.add('youchang@prec-tech.com');
        //MailsList.add('Xingyu_Liu@olympus.com.cn');
        system.debug('111===:'+MailsList);
        if (MailsList!=null&&MailsList.size()>0){
            String title = '';
            String body = '';
            title = '医院/经销商涉及黑名单';
            //title = '医院/经销商涉及黑名单';
            String accname1 = accname==null ? '' :accname;
            String angency1 = angency==null ? '' :angency;
            //if(AccDealerBlacklist=='1' || AccDealerBlacklist=='intercept'){
            //    body += '黑名单的客户为:' + accname1 + '<br/>';
            //    body += '黑名单的经销商为:' + angency1 + '<br/>';
            //}
            if(AccDealerBlacklist=='1' || AccDealerBlacklist=='intercept'){
                title = accname1+'涉及黑名单';
                body += '黑名单的客户为:' + accname1 + '<br/>';
            }else if(AccDealerBlacklist=='2'){
                title = angency1+'涉及黑名单';
                body += '黑名单的经销商为:' + angency1 + '<br/>';
            }else if(AccDealerBlacklist=='12'){
                title = accname1+'和'+angency1+'涉及黑名单';
                body += '黑名单的客户为:' + accname1 + '<br/>';
                body += '黑名单的经销商为:' + angency1 + '<br/>';
            }
            body += '<a href="' + System.Label.Environment_Url + mcid + '">'
                    + System.Label.Environment_Url+ mcid +'</a><br/>'; 
            body += '谢谢!';
force-app/main/default/classes/ReportController.cls
@@ -70,7 +70,7 @@
            res.profileId = UserInfo.getProfileId();
            res.userId = UserInfo.getUserId();
            res.luShengId = getUserIdByName(LightingButtonConstant.LU_SHENG_NAME);
            res.huDiAnId = getUserIdByName(LightingButtonConstant.HU_DI_AN_NAME);
            // res.huDiAnId = getUserIdByName(LightingButtonConstant.HU_DI_AN_NAME);
            res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        } catch (Exception e) {
@@ -294,13 +294,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //OPDtoSIS操作更新相应数据
@@ -314,13 +318,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
@@ -337,13 +345,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //完毕操作更新相应数据
@@ -358,13 +370,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //OCSM要报告操作更新相应数据
@@ -378,13 +394,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
@@ -399,13 +419,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //DispatchOCSMQARA操作更新相应数据
@@ -419,13 +443,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //OCSM不要报告操作更新相应数据
@@ -439,13 +467,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
@@ -460,13 +492,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    
@@ -501,13 +537,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
@@ -550,13 +590,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //VOC回答更新相应数据
@@ -568,17 +612,33 @@
            User[] records = [SELECT  Job_Category__c FROM User WHERE Id = :createdById];
            List<String> userAccess = new List<String>();
            if (records[0].Job_Category__c == LightingButtonConstant.TYPE_OF_SALES_SERVICES) {
            userAccess.add(rac.JingliApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
            userAccess.add(rac.BuchangApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
            rac.VOC_CreatedBy_jingli__c = rac.JingliApprovalManager__c;
            rac.VOC_CreatedBy_buzhang__c = rac.BuchangApprovalManager__c;
            } else {
            userAccess.add(rac.SalesManager__c + LightingButtonConstant.USER_ACCESS_READ);
            userAccess.add(rac.BuchangApprovalManagerSales__c + LightingButtonConstant.USER_ACCESS_READ);
            rac.VOC_CreatedBy_jingli__c = rac.SalesManager__c;
            rac.VOC_CreatedBy_buzhang__c = rac.BuchangApprovalManagerSales__c;
            if(rac.JingliApprovalManager__c != null){
                userAccess.add(rac.JingliApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
                rac.VOC_CreatedBy_jingli__c = rac.JingliApprovalManager__c;
            }
            userAccess.add(rac.ZongjianApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
            if(rac.BuchangApprovalManager__c != null){
                userAccess.add(rac.BuchangApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
                rac.VOC_CreatedBy_buzhang__c = rac.BuchangApprovalManager__c;
            }
            } else {
                if(rac.SalesManager__c != null){
                    userAccess.add(rac.SalesManager__c + LightingButtonConstant.USER_ACCESS_READ);
                    rac.VOC_CreatedBy_jingli__c = rac.SalesManager__c;
                }
                if(rac.BuchangApprovalManagerSales__c != null){
                    userAccess.add(rac.BuchangApprovalManagerSales__c + LightingButtonConstant.USER_ACCESS_READ);
                    rac.VOC_CreatedBy_buzhang__c = rac.BuchangApprovalManagerSales__c;
                }
            }
            if(rac.ZongjianApprovalManager__c != null){
                userAccess.add(rac.ZongjianApprovalManager__c + LightingButtonConstant.USER_ACCESS_READ);
            }
            String rtn = ControllerUtil.setSObjectShare(LightingButtonConstant.SOBJECT_NAME_OF_REPORT_SHARE,LightingButtonConstant.SOBJECT_NAME_OF_VOC_SHARE,recordId,userAccess,rac.Owner.Id);
            if (rtn != LightingButtonConstant.OK) {
            return rtn;
@@ -590,13 +650,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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();   
            }
            }
        }
    }
    //VOC判定更新相应数据
@@ -608,26 +672,34 @@
                // VOC対応者の経理部長総監を設定
                User[] records = [SELECT Id, Job_Category__c, JingliApprovalManager__c, SalesManager__c, BuchangApprovalManager__c, BuchangApprovalManagerSales__c, ZongjianApprovalManager__c FROM User WHERE Id = :personId];
                if (records[0].job_Category__c == LightingButtonConstant.TYPE_OF_SALES_SERVICES) {
                    rac.VOC_jingli__c = records[0].JingliApprovalManager__c == null ? '' : records[0].JingliApprovalManager__c;
                    rac.VOC_buzhang__c = records[0].BuchangApprovalManager__c == null ? '' : records[0].BuchangApprovalManager__c;
                    rac.VOC_jingli__c = records[0].JingliApprovalManager__c == null ? null : records[0].JingliApprovalManager__c;
                    rac.VOC_buzhang__c = records[0].BuchangApprovalManager__c == null ? null : records[0].BuchangApprovalManager__c;
                } else {
                    rac.VOC_jingli__c = records[0].SalesManager__c == null ? '' : records[0].SalesManager__c;
                    rac.VOC_buzhang__c = records[0].BuchangApprovalManagerSales__c == null ? '' : records[0].BuchangApprovalManagerSales__c;
                    rac.VOC_jingli__c = records[0].SalesManager__c == null ? null : records[0].SalesManager__c;
                    rac.VOC_buzhang__c = records[0].BuchangApprovalManagerSales__c == null ? null : records[0].BuchangApprovalManagerSales__c;
                }
                rac.VOC_zongjian__c = records[0].ZongjianApprovalManager__c == null ? '' : records[0].ZongjianApprovalManager__c;
                rac.VOC_zongjian__c = records[0].ZongjianApprovalManager__c == null ? null : records[0].ZongjianApprovalManager__c;
                rac.Status__c = LightingButtonConstant.STATUS_VOC_CHECK_OVER;
                rac.VOC_Finish__c = false;
                Date serverTimestamp = Date.today();
                rac.VOC_share_date__c = serverTimestamp;
                // share
                List<String> userAccess = new List<String>();
                userAccess.add(rac.Responsible_Person__c + LightingButtonConstant.USER_ACCESS_EDIT);
                userAccess.add(rac.VOC_jingli__c + LightingButtonConstant.USER_ACCESS_READ);
                userAccess.add(rac.VOC_buzhang__c + LightingButtonConstant.USER_ACCESS_READ);
                userAccess.add(rac.VOC_zongjian__c + LightingButtonConstant.USER_ACCESS_READ);
                if(rac.Responsible_Person__c != null){
                    userAccess.add(rac.Responsible_Person__c + LightingButtonConstant.USER_ACCESS_EDIT);
                }
                if(rac.VOC_jingli__c != null){
                    userAccess.add(rac.VOC_jingli__c + LightingButtonConstant.USER_ACCESS_READ);
                }
                if(rac.VOC_buzhang__c != null){
                    userAccess.add(rac.VOC_buzhang__c + LightingButtonConstant.USER_ACCESS_READ);
                }
                if(rac.VOC_zongjian__c != null){
                    userAccess.add(rac.VOC_zongjian__c + LightingButtonConstant.USER_ACCESS_READ);
                }
                String rtn = ControllerUtil.setSObjectShare(LightingButtonConstant.SOBJECT_NAME_OF_REPORT_SHARE,LightingButtonConstant.SOBJECT_NAME_OF_VOC_SHARE,recordId,userAccess,rac.Owner.Id);
                if (rtn != LightingButtonConstant.OK) {
                    return null;
                    return rtn;
                }
                update rac;
                } else {
@@ -652,13 +724,17 @@
            return null;
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left,right);
                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
force-app/main/default/classes/Xin_SearchVisitorPlace.cls
@@ -47,7 +47,7 @@
        Map<Id, Account> accMap = new Map<Id, Account>((List<Account>) Database.query(queryString));
        if (accMap.size() <= 50) {
            // さらに省単位のデータを検索
            Map<Id, Account> stateDepartmentMap = ControllerUtil.selectDepartByHospitalState(nameCondition, reporterState, 51 - accMap.size());
            Map<Id, Account> stateDepartmentMap = selectDepartByHospitalState(nameCondition, reporterState, 51 - accMap.size());
            if (stateDepartmentMap.size() > 0) {
                for (Id accId : stateDepartmentMap.keySet()) {
                    if (!accMap.containsKey(accId)) {
@@ -60,4 +60,23 @@
        this.results.sort();                                    // order by Name
        //this.results = Database.Query('select id, Name from Account where Name like ' + nameCondition + ' AND Id NOT IN (select AccountId From AccountShare where UserOrGroupId = \'00510000000gaBh\' and RowCause = \'ImplicitParent\' ) order by Name limit 30');
    }
    // 省単位 or 全国の診療科を検索,最初の50件
    public Map<Id, Account> selectDepartByHospitalState(String nameCondition, String reporterState, Integer limitCnt) {
        User loginUser = [Select Id, State_Hospital__c, Job_Category__c from User where Id =: UserInfo.getUserId()];
        String queryString = 'select Id, Name, Department_Class__c, Department_Class__r.Name, Hospital__c, Hospital__r.Name from Account where' + nameCondition + ' Hospital__r.RecordType.DeveloperName = \'HP\' and Is_Active__c <> \'無効\'';
        if (loginUser.Job_Category__c == 'GI市场'
                || loginUser.Job_Category__c == 'SP市场'
                || loginUser.Job_Category__c == '服务本部'
                || loginUser.Job_Category__c == '培训'
        ) {
            // 全国範囲、なにもしない
        } else {
            // 省単位の条件追加
            system.debug('selectDepartByHospitalState reporterState=' + reporterState);
            queryString += ' and Parent.Parent.State_Master__r.Name = :reporterState';
        }
        queryString += ' order by Name limit :limitCnt';
        system.debug('selectDepartByHospitalState queryString=' + queryString);
        return new Map<Id, Account>((List<Account>) Database.query(queryString));
    }
}
force-app/main/default/classes/eSignAgencyConfirmPageController.cls
@@ -313,4 +313,71 @@
        delete con;
    }
    //文件删除功能  精琢技术 thh 2021-09-26 end
    //获取AWS信息 zhj 2023-01-03 start
    @AuraEnabled
    public static ControllerResponse getAWS(String objectName){
        ControllerResponse res = new ControllerResponse();
        try{
            res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName));
            res.IsSuccess = true;
        }catch(Exception e){
            res.IsSuccess = false;
            res.Message = e.getMessage();
        }
        return res;
    }
    //获取AWS信息 zhj 2023-01-03 end
    //AWS改造文件上传 deloitte zhj 2023-01-03 start
    @AuraEnabled
    public static Id saveFile(String fileName,String key,String transId,String parentId){
        FileAddress__c file = new FileAddress__c();
        PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
        // 去除filename里得“&” bysushanhu 20220414
        fileName = fileName.remove('&');
        file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName;
        file.FileName__c =fileName;
        file.ViewLink__c =pI.queryUrl+key;
        file.ParentRecordId__c =parentId;
        file.AWS_File_Key__c = key;
        insert file;
        return file.Id;
    }
    //AWS改造文件上传 deloitte zhj 2023-01-03 end
    //获取上传文件 deloitte zhj 2023-01-03 start
    public static List<FileAddress__c> getFileds(String parentId){
        // SWAG-C9S9P6 2022-05-25 ssm start
        // 文件地址里增加招标项目专用字段(信息Id、项目阶段、更新日期)
        if(String.isNotBlank(parentId)){
            return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                    // SWAG-C9S9P6 新增字段 start
                    , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                    // SWAG-C9S9P6 新增字段 end
                    FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc];
        }
        return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                // SWAG-C9S9P6 新增字段 start
                , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                // SWAG-C9S9P6 新增字段 end
                FROM FileAddress__c order by createddate desc limit 100];
        // SWAG-C9S9P6 2022-05-25 ssm end
    }
    //获取上传文件 deloitte zhj 2023-01-03 end
    //AWS文件删除功能  deloitte zhj 2022-01-03 start
    @AuraEnabled
    public static String deleteFile(String fileId){
        System.debug('fileId = ' + fileId);
        List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId];
        String awsKey = '';
        if(fList != null && fList.size() > 0){
            awsKey = fList[0].AWS_File_Key__c;
            delete fList;
        }
        return awsKey;
    }
    //AWS文件删除功能  deloitte zhj 2022-01-03 end
}
force-app/main/default/classes/eSignAgencyPageController.cls
@@ -409,4 +409,70 @@
        // delete attachment;
    }
    //文件删除功能  精琢技术 thh 2021-09-26 end
    //获取AWS信息 zhj 2023-01-03 start
    @AuraEnabled
    public static ControllerResponse getAWS(String objectName){
        ControllerResponse res = new ControllerResponse();
        try{
            res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName));
            res.IsSuccess = true;
        }catch(Exception e){
            res.IsSuccess = false;
            res.Message = e.getMessage();
        }
        return res;
    }
    //获取AWS信息 zhj 2023-01-03 end
    //AWS改造文件上传 deloitte zhj 2023-01-03 start
    @AuraEnabled
    public static Id saveFile(String fileName,String key,String transId,String parentId){
        FileAddress__c file = new FileAddress__c();
        PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
        // 去除filename里得“&” bysushanhu 20220414
        fileName = fileName.remove('&');
        file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName;
        file.FileName__c =fileName;
        file.ViewLink__c =pI.queryUrl+key;
        file.ParentRecordId__c =parentId;
        file.AWS_File_Key__c = key;
        insert file;
        return file.Id;
    }
    //AWS改造文件上传 deloitte zhj 2023-01-03 end
    //获取上传文件 deloitte zhj 2023-01-03 start
    public static List<FileAddress__c> getFileds(String parentId){
        // SWAG-C9S9P6 2022-05-25 ssm start
        // 文件地址里增加招标项目专用字段(信息Id、项目阶段、更新日期)
        if(String.isNotBlank(parentId)){
            return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                    // SWAG-C9S9P6 新增字段 start
                    , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                    // SWAG-C9S9P6 新增字段 end
                    FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc];
        }
        return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                // SWAG-C9S9P6 新增字段 start
                , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                // SWAG-C9S9P6 新增字段 end
                FROM FileAddress__c order by createddate desc limit 100];
        // SWAG-C9S9P6 2022-05-25 ssm end
    }
    //获取上传文件 deloitte zhj 2023-01-03 end
    //AWS文件删除功能  deloitte zhj 2022-01-03 start
    @AuraEnabled
    public static String deleteFile(String fileId){
        System.debug('fileId = ' + fileId);
        List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId];
        String awsKey = '';
        if(fList != null && fList.size() > 0){
            awsKey = fList[0].AWS_File_Key__c;
            delete fList;
        }
        return awsKey;
    }
    //AWS文件删除功能  deloitte zhj 2022-01-03 end
}
force-app/main/default/classes/eSignHospitalConfirmController.cls
@@ -263,4 +263,69 @@
        delete con;
    }
    //文件删除功能  精琢技术 thh 2021-09-26 end
     //获取AWS信息 zhj 2023-01-03 start
     @AuraEnabled
     public static ControllerResponse getAWS(String objectName){
         ControllerResponse res = new ControllerResponse();
         try{
             res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName));
             res.IsSuccess = true;
         }catch(Exception e){
             res.IsSuccess = false;
             res.Message = e.getMessage();
         }
         return res;
     }
     //获取AWS信息 zhj 2023-01-03 end
     //AWS改造文件上传 deloitte zhj 2023-01-03 start
     @AuraEnabled
     public static Id saveFile(String fileName,String key,String transId,String parentId){
         FileAddress__c file = new FileAddress__c();
         PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
         // 去除filename里得“&” bysushanhu 20220414
         fileName = fileName.remove('&');
         file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName;
         file.FileName__c =fileName;
         file.ViewLink__c =pI.queryUrl+key;
         file.ParentRecordId__c =parentId;
         file.AWS_File_Key__c = key;
         insert file;
         return file.Id;
     }
     //AWS改造文件上传 deloitte zhj 2023-01-03 end
     //获取上传文件 deloitte zhj 2023-01-03 start
     public static List<FileAddress__c> getFileds(String parentId){
         // SWAG-C9S9P6 2022-05-25 ssm start
         // 文件地址里增加招标项目专用字段(信息Id、项目阶段、更新日期)
         if(String.isNotBlank(parentId)){
             return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                     // SWAG-C9S9P6 新增字段 start
                     , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                     // SWAG-C9S9P6 新增字段 end
                     FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc];
         }
         return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                 // SWAG-C9S9P6 新增字段 start
                 , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                 // SWAG-C9S9P6 新增字段 end
                 FROM FileAddress__c order by createddate desc limit 100];
         // SWAG-C9S9P6 2022-05-25 ssm end
     }
     //获取上传文件 deloitte zhj 2023-01-03 end
     //AWS文件删除功能  deloitte zhj 2022-01-03 start
     @AuraEnabled
     public static String deleteFile(String fileId){
         System.debug('fileId = ' + fileId);
         List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId];
         String awsKey = '';
         if(fList != null && fList.size() > 0){
             awsKey = fList[0].AWS_File_Key__c;
             delete fList;
         }
         return awsKey;
     }
     //AWS文件删除功能  deloitte zhj 2022-01-03 end
}
force-app/main/default/classes/eSignHospitalPageController.cls
@@ -317,4 +317,70 @@
        delete con;
    }
    //文件删除功能  精琢技术 thh 2021-09-26 end
    //获取AWS信息 zhj 2023-01-03 start
    @AuraEnabled
    public static ControllerResponse getAWS(String objectName){
        ControllerResponse res = new ControllerResponse();
        try{
            res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName));
            res.IsSuccess = true;
        }catch(Exception e){
            res.IsSuccess = false;
            res.Message = e.getMessage();
        }
        return res;
    }
    //获取AWS信息 zhj 2023-01-03 end
    //AWS改造文件上传 deloitte zhj 2023-01-03 start
    @AuraEnabled
    public static Id saveFile(String fileName,String key,String transId,String parentId){
        FileAddress__c file = new FileAddress__c();
        PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document');
        // 去除filename里得“&” bysushanhu 20220414
        fileName = fileName.remove('&');
        file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName;
        file.FileName__c =fileName;
        file.ViewLink__c =pI.queryUrl+key;
        file.ParentRecordId__c =parentId;
        file.AWS_File_Key__c = key;
        insert file;
        return file.Id;
    }
    //AWS改造文件上传 deloitte zhj 2023-01-03 end
    //获取上传文件 deloitte zhj 2023-01-03 start
    public static List<FileAddress__c> getFileds(String parentId){
        // SWAG-C9S9P6 2022-05-25 ssm start
        // 文件地址里增加招标项目专用字段(信息Id、项目阶段、更新日期)
        if(String.isNotBlank(parentId)){
            return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                    // SWAG-C9S9P6 新增字段 start
                    , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                    // SWAG-C9S9P6 新增字段 end
                    FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc];
        }
        return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c,AWS_File_Key__c  //deloitte zhj 预览/下载 加token 2022/12/01
                // SWAG-C9S9P6 新增字段 start
                , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c
                // SWAG-C9S9P6 新增字段 end
                FROM FileAddress__c order by createddate desc limit 100];
        // SWAG-C9S9P6 2022-05-25 ssm end
    }
    //获取上传文件 deloitte zhj 2023-01-03 end
    //AWS文件删除功能  deloitte zhj 2022-01-03 start
    @AuraEnabled
    public static String deleteFile(String fileId){
        System.debug('fileId = ' + fileId);
        List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId];
        String awsKey = '';
        if(fList != null && fList.size() > 0){
            awsKey = fList[0].AWS_File_Key__c;
            delete fList;
        }
        return awsKey;
    }
    //AWS文件删除功能  deloitte zhj 2022-01-03 end
}
force-app/main/default/classes/lexCaseController.cls
@@ -6,12 +6,15 @@
            Case ca = [
                select
                Department__c,
                Account__c
                Account__c,
                CICName__c
                from Case where Id =: recordId
            ];
            res.department = ca.Department__c;
            res.accountId = ca.Account__c;
            res.recordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_VOC).getRecordTypeId();
            res.caseNumber = ca.CICName__c;
            res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_VOC).getRecordTypeId();
            // res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().toString();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
@@ -24,5 +27,7 @@
        public String accountId;
        @AuraEnabled
        public String recordTypeId;
        @AuraEnabled
        public String caseNumber;
    }
}
force-app/main/default/classes/lexCaseController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -68,7 +68,7 @@
    //报告书的记录类型‘提交’
    public static final String RECORD_TYPE_NAME_BY_SUBMIT = '提交';
     //报告书的记录类型‘跟台’
     public static final String RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE = '跟台';
     public static final String RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE = '售后服务跟台';
      //报告书的记录类型‘OPD’
      public static final String RECORD_TYPE_NAME_BY_OPD= 'OPD';
      //报告书的记录类型‘SIS-ENG’
force-app/main/default/classes/lexLookupController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
@@ -27,7 +27,18 @@
        update opp;
        return '';
    } catch (Exception e) {
        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();
        }
    }
   } 
    public class InitData{
force-app/main/default/classes/lexOpportunitySpecialApplyController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -172,7 +172,18 @@
                lostReportList[0].LostType__c ='部分失单';
            }
            // 权限,如果当前状态不是草案中,那么需要跳转到只读页面
            if(!'草案'.equals(lostReportList[0].Report_Status__c) && userinfo.getProfileId() != (ID) '00e10000000Y3o5AAC') {
        //原:!'草案'.equals(lostReportList[0].Report_Status__c) && userinfo.getProfileId() != (ID) '00e10000000Y3o5AAC'
        // 20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 end 改if条件
        if(
            !('草案'.equals(lostReportList[0].Report_Status__c)
            || userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC'
            ||('批准'.equals(lostReportList[0].Report_Status__c) &&
                (userinfo.getProfileId() == (ID) '00e10000000xnp2AAA' ||
                userinfo.getProfileId() == (ID) '00e10000000xnpRAAQ' ||
                userinfo.getProfileId() == (ID) '00e10000000xnpHAAQ'))
            )
          ){
                pageStatus = 'View';
            }
            oppId = lostReportList[0].Opportunity__c;
@@ -232,6 +243,28 @@
        brandNo = 0;
        // 读取竞争对手品牌
        // BrandmapSet();
        if (LostReport.lostReport.Report_Status__c != '草案' && lostReportId != null) {
            ProcessInstance pro = [
            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>();
            items.addall(pro.StepsAndWorkitems);
            LostReport.approvalHistorys = items;
        }
        if(string.isNotEmpty(submitFlag)) {
            maps.put('message', '提交成功!');
            maps.put('LostReport', LostReport);
@@ -266,6 +299,19 @@
        }
        String jsonStr = JSON.serialize(lstPickvals);
        return jsonStr;
    }
    @AuraEnabled
    public static string searchBatchIfForProduct(String productName){
        try {
            List<BatchIF_Transfer__c> transfer = [select
                                  Internal_value__c
                                  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;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
    }
    // 数据录入
    @AuraEnabled
@@ -448,9 +494,9 @@
            report.lostReport.Id = reportId;
            report.lostReport.Report_Status__c = '提交';
            update report.lostReport;
            Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
            psr.setObjectId(reportId);
            Approval.ProcessResult submitResult = Approval.process(psr);
            // Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
            // psr.setObjectId(reportId);
            // Approval.ProcessResult submitResult = Approval.process(psr);
            objs.put('uri', '/apex/PCLLostReportPage');
            objs.put('Id', reportId);
            objs.put('pageStatus', 'View');
force-app/main/default/classes/lexRentalApplyController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexSolutionProgrammaController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexSolutionProgrammeController.cls
@@ -39,6 +39,28 @@
            return e.getMessage();
        }
    }
    //提交审批
    @AuraEnabled
    public static String submitApproval(String recordId){
        Savepoint sp = Database.setSavepoint();
        try {
            Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
            req1.setObjectId(recordId);
            Approval.ProcessResult submitResult = Approval.process(req1);
            return 'OK';
        }
        catch (Exception e) {
            Database.rollback(sp);
            if(e.getMessage().contains(':')){
                String eMsg = e.getMessage();
                Integer left = eMsg.indexOf(',')+1;
                Integer right = eMsg.lastindexOf('。')+1;
                return eMsg.substring(left,right);
            }else{
                return e.getMessage();
            }
        }
    }
    class InitData{
        @AuraEnabled
        public String schemeType;
force-app/main/default/classes/lexSolutionProgrammeController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls
@@ -76,7 +76,14 @@
            update so;
            return '';
        } catch (Exception e) {
            return e.getMessage();
            if (e.getMessage().contains(':')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',') + 1;
                Integer right = eMessage.lastIndexOf('。') + 1;
                return eMessage.substring(left,right);
            }else {
                return e.getMessage();
            }
        }
    }
    @AuraEnabled
@@ -88,7 +95,14 @@
            update so;
            return '';
        } catch (Exception e) {
            return e.getMessage();
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left + 1,right);
            }else {
                return e.getMessage();
            }
        }
    }
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
</ApexClass>
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-06-01 10:37:01
 * @LastEditTime: 2023-08-28 10:42:47
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -70,35 +70,16 @@
    editor(){
        if (this.id != undefined){
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                Id: this.id,
                ReportId: this.recordId,
                RecordTypeIds: 'ASACDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
        } else {
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                ReportId: this.recordId,
                RecordTypeIds: 'ASACDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
        }
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            attributes: {
                url: this.url
            }
        });
        // window.open(this.url,"_self");
    }
}
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-06-01 10:37:17
 * @LastEditTime: 2023-08-28 09:11:47
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -68,35 +68,16 @@
    editor(){
        if (this.id != undefined){
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                Id: this.id,
                ReportId: this.recordId,
                RecordTypeIds: 'ASRCDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
        } else {
            const defaultValues = encodeDefaultFieldValues({
                ReportId: this.recordId,
                RecordTypeIds: 'ASRCDecision'
            });
            this[NavigationMixin.Navigate]({
                nooverride: '1',
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
        }
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            attributes: {
                url: this.url
            }
        });
        // window.open(this.url,"_self");
    }
}
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.html
@@ -1,6 +1,15 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-12 11:08:29
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-21 14:08:11
-->
<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>
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-05-11 13:46:32
 * @LastEditTime: 2023-09-05 15:47:38
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -14,9 +14,12 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import checkDangerItem from '@salesforce/apex/OpportunityWebService.checkDangerItem';
import accSendEmail from '@salesforce/apex/OpportunityWebService.accSendEmail';
import oppCheck from '@salesforce/apex/OpportunityWebService.oppCheck';
import updReg from '@salesforce/apex/OpportunityWebService.updReg';
import TradeComplianceStatusFlag from '@salesforce/label/c.TradeComplianceStatusFlag';
import IFTradeComplianceAlert from '@salesforce/label/c.IFTradeComplianceAlert';
import LightningConfirm from 'lightning/confirm';
export default class LexAgencyAuthorize extends LightningElement {
    @api recordId;
    agency1Id;
@@ -42,6 +45,12 @@
    s61ProfileId;
    s62ProfileId;
    m4ProfileId;
    AccDealerBlacklist;
    angency1;
    angency2;
    accname;
    ownerids;
    ddid;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -86,8 +95,18 @@
            this.s61ProfileId = result.s61ProfileId;
            this.s62ProfileId = result.s62ProfileId;
            this.m4ProfileId = result.m4ProfileId;
            this.AccDealerBlacklist = result.AccDealerBlacklist;
            this.angency1 = result.angency1;
            this.angency2 = result.angency2;
            this.accname = result.accname;
            this.ownerids = result.ownerids;
            this.ddid = result.ddid;
            console.log("w");
            this.AgencyAuthorize();
        })
        }).catch(error=>{
            console.log("error");
            console.log(error);
        });
    }
    AgencyAuthorize(){
        var btns = document.getElementsByName("agency_authorize");
@@ -106,6 +125,89 @@
            this.showToast("您没有授权申请的权限。请联系系统管理员。","error");
            return;
        }
        //贸易合规 you
        var AccDealerBlacklist = this.AccDealerBlacklist;//判断客户/经销商是否为黑名单
        var angency1 = this.angency1;
        var angency2 = this.angency2;
        var accname = this.accname;
        var ownerids = this.ownerids;
        var ddid = this.ddid;
        if(TradeComplianceStatusFlag=='true'){
            //拦截+邮件提醒
            var oppflag=false;
            if (AccDealerBlacklist=='123') {
                // alert('客户,经销商1,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('客户,经销商1,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='12'){
                // alert('客户,经销商1都为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('客户,经销商1都为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='23'){
                // alert('经销商1,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('经销商1,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='13'){
                // alert('客户,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('客户,经销商2都为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='1'){
                // alert('客户为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('客户为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='2'){
                // alert('经销商1为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('经销商1为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }else if(AccDealerBlacklist=='3'){
                // alert('经销商2为黑名单,不能做授权申请,'+IFTradeComplianceAlert);
                this.showToast('经销商2为黑名单,不能做授权申请,'+IFTradeComplianceAlert,'error');
                oppflag=true;
            }
            console.log('y');
            console.log(oppflag);
            if(oppflag){
                accSendEmail({
                    "AccDealerBlacklist":AccDealerBlacklist,
                    "accname":accname,
                    "angency1":angency1,
                    "angency2":angency2,
                    "ownerids":ownerids,
                    "ddid":ddid,
                    "oppid":oppid
                }).then(result=>{
                    console.log('q');
                    var opprtn = result;
                    if (opprtn = true) {
                        return;
                    }
                    //警示提醒
                    if (AccDealerBlacklist=='567') {
                        this.handleConfirmClick('您所选择的客户,经销商1,经销商2存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='56'){
                        this.handleConfirmClick('您所选择的客户,经销商1存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='67'){
                        this.handleConfirmClick('您所选择的经销商1,经销商2存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='57'){
                        this.handleConfirmClick('您所选择的客户,经销商2存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='5'){
                        this.handleConfirmClick('您所选择的客户存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='6'){
                        this.handleConfirmClick('您所选择的经销商1存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }else if(AccDealerBlacklist=='7'){
                        this.handleConfirmClick('您所选择的经销商2存在贸易合规警示风险,不建议做授权申请,请您确认是否继续申请,'+IFTradeComplianceAlert);
                    }
                });
            }else{
                this.ss();
            }
        }else{
            this.ss();
        }
        //贸易合规 you
    }
    ss(){
        if (this.stageName != '引合' && this.stageName != '询价' ) {
            this.showToast("状态1:" + this.stageName + "、不能做授权申请!","error");
            return;
@@ -146,7 +248,7 @@
        if (this.trade == '内貿') {
            if(this.isCorrosion == '1'){
                checkDangerItem({
                    agency1: angency
                    agency1: this.agency1Id
                }).then(result=>{
                    var rtn1 = result;
                    if (rtn1 != 'OK') {
@@ -157,7 +259,7 @@
            });
            }else{
                oppCheck({
                    oppid: oppid,
                    oppid: this.recordId,
                    saveFlg: '1'
                }).then(result=>{
                    var rtn = result;
@@ -170,12 +272,24 @@
            }
        } else {
            updReg({
                oppid: oppid
                oppid: this.recordId
            }).then(()=>{
                this.update();
            });
        }  
    }
    async handleConfirmClick(msg) {
        const result = await LightningConfirm.open({
            message: msg,
            variant: 'headerless',
            label: 'this is the aria-label value'
        });
        if (result) {
            this.ss();
        } else {
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
force-app/main/default/lwc/lexApplyAgainLwc/lexApplyAgainLwc.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-30 17:55:39
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-07 16:22:25
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
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-06-05 14:01:14
 * @LastEditTime: 2023-09-04 13:16:23
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -12,7 +12,8 @@
import init from '@salesforce/apex/OpportunityLightingButtonController.initForAssignTaskButtonButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexAssignTaskButton extends LightningElement {
import RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP from '@salesforce/label/c.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP';
export default class LexAssignTaskButton extends NavigationMixin(LightningElement) {
    @api recordId;
    accountName;
    accountId;
@@ -40,7 +41,7 @@
            this.accountId = result.accountId;
            this.accountName = result.accountName;
            this.oppName = result.name;
            this.recordTypeId = result.recordTypeId;
            this.recordTypeId = RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP;
            this.assignTask();
        }).catch(error=>{
            console.log("error");
@@ -71,12 +72,13 @@
            account__c: this.accountId,
            OpportunityId__c: this.recordId,
            taskStatus__c: '01 分配',
            taskDifferent__c: '上级分配任务'
            taskDifferent__c: '上级分配任务',
            Name: '*'
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Task',
                objectApiName: 'task__c',
                actionName: 'new'
            },
            state: {
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-05-11 15:49:41
 * @LastEditTime: 2023-08-25 16:41:24
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -48,9 +48,10 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
force-app/main/default/lwc/lexBeforeOPDPDFBtnSIS/lexBeforeOPDPDFBtnSIS.html
@@ -4,12 +4,11 @@
 * @Author: chen jing wu
 * @Date: 2023-04-13 15:55:45
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-24 16:39:05
 * @LastEditTime: 2023-04-13 15:56:58
-->
<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>
        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
    </div>
</template>
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-05-24 16:37:05
 * @LastEditTime: 2023-04-13 16:04:14
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -13,7 +13,7 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import selectCommonSequence from '@salesforce/apex/ControllerUtil.selectCommonSequence';
import addReportOPWithEvaluationPDF from '@salesforce/apex/Add_Report.addReportOPWithEvaluationPDF';
import LightningConfirm from 'lightning/confirm';
export default class LexBeforeOPDPDFBtnSIS extends LightningElement {
    @api recordId;
    accountId;
@@ -34,55 +34,6 @@
          }
        }
    }
    async handleConfirmClick(msg) {
        const result = await LightningConfirm.open({
            message: msg,
            variant: 'headerless',
            label: 'this is the aria-label value',
        });
        console.log(result);
        if(result){
            try {
                selectCommonSequence({
                    valueField: 'EvaluationPDF_NextValue__c',
                    formatField: 'EvaluationPDF_Format__c'
                }).then(result=>{
                    var pdfno = result;
                    addReportOPWithEvaluationPDF({
                        "repOwnerId": this.userId,
                        "reportId": "",
                        "dailyReportId": "",
                        "eventId": "",
                        "recordType": "SIS",
                        "aId": this.accountId,
                        "visitor1": "",
                        "visitor2": "",
                        "visitor3": "",
                        "visitor4": "",
                        "visitor5": "",
                        "opp1": this.recordId,
                        "opp2": "",
                        "opp3": "",
                        "opp4": "",
                        "opp5": "",
                        "reportDate": "",
                        "evaluationPDFNumber": pdfno
                    }).then(()=>{
                        // 20220913 ljh WLIG-CHMATN update end
                        this.IsLoading = false;
                        window.open('/apex/BeforeOPDPDF?oid=' + this.recordId + '&pdfNo=' + pdfno, 'BeforeOPDPDF');
                        this.dispatchEvent(new CloseActionScreenEvent());
                    })
                });
                } catch(e) {
                    this.showToast(e,"error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
        }else{
            window.open('/apex/BeforeOPDPDF?oid=' + this.recordId, 'BeforeOPDPDF');
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
@@ -93,7 +44,47 @@
        })
    }
    beforeOPDPDFBtn(){
        this.handleConfirmClick('是否新建SIS报告书?');
        if (window.confirm('是否新建SIS报告书?')) {
            try {
            selectCommonSequence({
                valueField: 'EvaluationPDF_NextValue__c',
                formatField: 'EvaluationPDF_Format__c'
            }).then(result=>{
                var pdfno = result;
                addReportOPWithEvaluationPDF({
                    "repOwnerId": this.userId,
                    "reportId": "",
                    "dailyReportId": "",
                    "eventId": "",
                    "recordType": "SIS",
                    "aId": this.accountId,
                    "visitor1": "",
                    "visitor2": "",
                    "visitor3": "",
                    "visitor4": "",
                    "visitor5": "",
                    "opp1": this.recordId,
                    "opp2": "",
                    "opp3": "",
                    "opp4": "",
                    "opp5": "",
                    "reportDate": "",
                    "evaluationPDFNumber": pdfno
                }).then(()=>{
                    // 20220913 ljh WLIG-CHMATN update end
                    this.IsLoading = false;
                    window.open('/apex/BeforeOPDPDF?oid=' + this.recordId + '&pdfNo=' + pdfno, 'BeforeOPDPDF');
                    this.dispatchEvent(new CloseActionScreenEvent());
                })
            });
            } catch(e) {
                this.showToast(e,"error");
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        } else {
            window.open('/apex/BeforeOPDPDF?oid=' + this.recordId, 'BeforeOPDPDF');
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-28 15:58:45
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-10 14:27:50
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -30,6 +38,7 @@
    CBLBPNewLwc(){
      const defaultValues = encodeDefaultFieldValues({
        ProductName__c: this.recordId,
        Name: '*'
    });
      this[NavigationMixin.Navigate]({
          type: 'standard__objectPage',
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-04-11 16:44:49
 * @LastEditTime: 2023-08-25 16:41:19
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -55,9 +55,10 @@
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
force-app/main/default/lwc/lexCopyPI/lexCopyPI.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-06-21 10:22:50
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-21 11:10:10
 * @LastEditTime: 2023-06-21 10:33:50
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-13 13:50:23
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-05 09:13:58
 * @LastEditTime: 2023-09-06 14:36:47
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -36,6 +36,7 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            console.log(result);
            this.accountId = result.accountId;
            this.createEvent();
        }).catch(error=>{
force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js
@@ -37,9 +37,12 @@
        }
    }
    connectedCallback(){
        console.log('LexCreateOPDFromRentalApply init')
        console.log('this.recordId = ' + this.recordId)
        init({
            recordId: this.recordId
        }).then(result=>{
            console.log('LexCreateOPDFromRentalApply init result = ' + JSON.stringify(result))
            this.hospitalId = result.hospitalId;
            this.strategicDeptId = result.strategicDeptId;
            this.accountId = result.accountId;
@@ -61,7 +64,7 @@
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                //nooverride: '1',  //2023-08-14 zhj
                defaultFieldValues: defaultValues,
                recordTypeId: this.recordTypeId
            }
force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js
@@ -48,11 +48,13 @@
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Case',
                objectApiName: 'Report__c',
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                //2023 08 04 张赫阳 PIPL按钮改造 Start
                // nooverride: '1',
                //2023 08 04 张赫阳 PIPL按钮改造 Start
                defaultFieldValues: defaultValues,
                recordTypeId: this.recordTypeId
            }
force-app/main/default/lwc/lexDepartmentCreateGI/lexDepartmentCreateGI.js
@@ -1,3 +1,11 @@
/*
//  * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-08-28 17:27:59
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-28 17:33:22
 */
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -29,6 +37,7 @@
            recordId: this.recordId,
            type: 'GI'
        }).then(result=>{
            console.log(result);
            this.recordTypeId = result.recordTypeId;
            this.hospitalDepartmentClass = result.hospitalDepartmentClass;
            const defaultValues = encodeDefaultFieldValues({
force-app/main/default/lwc/lexDepartmentCreateGS/lexDepartmentCreateGS.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-31 10:56:23
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-31 11:06:33
 */
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
force-app/main/default/lwc/lexDepartmentCreateGYN/lexDepartmentCreateGYN.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-31 11:05:47
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-31 11:18:49
 */
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
force-app/main/default/lwc/lexDepartmentCreateOTH/lexDepartmentCreateOTH.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-31 11:18:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-31 11:28:22
 */
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="Holder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.js
New file
@@ -0,0 +1,34 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-09-06 13:46:37
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-06 14:17:26
 */
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexInitCreateSolution extends NavigationMixin(LightningElement) {
    connectedCallback(){
        const defaultValues = encodeDefaultFieldValues({
            Name: '*'
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'SolutionProjectRequirements__c',
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                defaultFieldValues: defaultValues,
                backgroundContext: '/lightning/o/SolutionProjectRequirements__c/list?filterName=Recent'
            }
        });
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexInitCreateSolution/lexInitCreateSolution.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__AppPage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="Holder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.js
New file
@@ -0,0 +1,26 @@
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexLastbuyProductNew extends NavigationMixin(LightningElement) {
    connectedCallback(){
        const defaultValues = encodeDefaultFieldValues({
            Name: '*'
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'LastbuyProduct__c',
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                defaultFieldValues: defaultValues,
                backgroundContext: '/lightning/o/LastbuyProduct__c/list?filterName=Recent'
            }
        });
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexLastbuyProductNew/lexLastbuyProductNew.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__AppPage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
@@ -15,7 +15,7 @@
                    <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}>
                             role="textbox" type="text" placeholder="Search..." style="width: 190px;"  onkeyup={onKeyChange} value={selectedValue}/ disabled={disabled} onclick={onKeyChange}>
                       </template>
                       <template if:true={recordselected}>
                          <span class="slds-pill slds-pill_link fullWidth slds-input slds-combobox__input"> 
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-01 15:34:21
 * @LastEditTime: 2023-08-16 13:59:32
 */
import { LightningElement, track, api } from 'lwc';
import getRecordsByName from '@salesforce/apex/lexLookupController.getRecordsByName'
@@ -68,6 +68,11 @@
        this.recordselected = false;
        this.selectedValue = "";
        this.recordsList = undefined;
        const customEvent = new CustomEvent('buttonclick', {
            bubbles: true,  // 使事件冒泡
            composed: true  // 使事件可以跨shadow boundary传播
        });
        this.dispatchEvent(customEvent);
    }
    //Method to pass selected record to parent component.
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-05-12 11:35:46
 * @LastEditTime: 2023-08-25 16:44:13
 */
/*
 * @Description: 
@@ -82,7 +82,7 @@
        //alert("关联招投标项目的询价,只能在有结果后做失单报告!");
        //}
        else {
            var url = '/apex/PCLLostReportPage?pageStatus=Create&oppId=' + this.recordId + '&lostType=失单';
            var url = '/apex/PCLLostReportPageLwc?pageStatus=Create&oppId=' + this.recordId + '&lostType=失单';
            location.href = url;
            // location.href = '/a1U/e?retURL=%2F' + this.recordId +
            // '&RecordType=01210000000R4hM' +
@@ -100,9 +100,10 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
force-app/main/default/lwc/lexNewAgencyHospital/lexNewAgencyHospital.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-15 09:52:50
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-25 09:16:27
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -64,4 +56,4 @@
        });
        }
    }
}
}
force-app/main/default/lwc/lexNewSolutionClosingAttachment/lexNewSolutionClosingAttachment.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-08-29 14:42:25
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-29 14:42:44
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -8,7 +16,7 @@
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexNewSolutionClosingAttachment extends LightningElement {
export default class LexNewSolutionClosingAttachment extends NavigationMixin(LightningElement) {
    @api recordId;
    schemeType;
    @wire(CurrentPageReference)
force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-08-24 15:52:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-24 15:54:14
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -64,6 +72,7 @@
            this.salesAssistant = '';
        }
        const defaultValues = encodeDefaultFieldValues({
            Name: '*',
            Hospital__c: this.hospitalId == undefined ? '' : this.hospitalId,
            Department_Class__c: this.accountId == undefined ? '' : this.accountId,
            Sales_Assistant__c: this.salesAssistant == undefined ? '' : this.salesAssistant
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-03-28 15:59:44
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-24 16:12:08
 * @LastEditTime: 2023-05-24 16:09:50
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -71,7 +71,7 @@
                    return;
                }
                } catch(e) {
                    console.log(e);
                }
        }else{
            this.dispatchEvent(new CloseActionScreenEvent());
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -2,14 +2,6 @@
 * @Description: 
 * @version: 
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:33
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-24 16:21:07
 */
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-24 16:16:57
force-app/main/default/lwc/lexOPDReport/lexOPDReport.js
@@ -93,6 +93,7 @@
                Opportunity_Situation__c: '跟进询价',
                
            });
            console.log('defaultValues = ' + defaultValues);
            this[NavigationMixin.Navigate]({
                type: 'standard__objectPage',
                attributes: {
@@ -100,7 +101,7 @@
                    actionName: 'new'
                },
                state: {
                    nooverride: '1',
                    //nooverride: '1',
                    defaultFieldValues: defaultValues,
                    recordTypeId: this.recordTypeId
                }
@@ -118,6 +119,7 @@
            Report_OPDPlan__c: this.opdPlan,
            Hospital_Department__c: this.account
        });
        console.log('defaultValues = ' + defaultValues);
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
@@ -125,7 +127,7 @@
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                //nooverride: '1',
                defaultFieldValues: defaultValues,
                recordTypeId: this.recordTypeId
            }
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-07-06 09:34:39
 * @LastEditTime: 2023-07-06 09:26:09
 */
import { LightningElement,api, track, wire } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
@@ -95,7 +95,9 @@
                    actionName: 'new'
                },
                state: {
                    nooverride: '1',
                    // 2023 08 04 张赫阳 PIPL相关按钮改造 Start
                    //nooverride: '1',
                    // 2023 08 04 张赫阳 PIPL相关按钮改造 End
                    defaultFieldValues: defaultValues,
                    recordTypeId: this.recordTypeId
                }
@@ -114,11 +116,32 @@
                    actionName: 'new'
                },
                state: {
                    nooverride: '1',
                    // 2023 08 04 张赫阳 PIPL相关按钮改造 Start
                    //nooverride: '1',
                    // 2023 08 04 张赫阳 PIPL相关按钮改造 End
                    defaultFieldValues: defaultValues,
                    recordTypeId: this.recordTypeId1
                }
            });
        }
        // }else{
        //     strs = '';
        // }
        // if(strs.length<=0){
        //     url = '/setup/ui/recordtypeselect.jsp?retURL=%2F'
        //     + this.rentalApplyId
        //     + '&save_new_url=%2Fa0B%2Fe%3FretURL%3D%252Fa0B%252Fo';
        // }else{
        //     url = '/a0B/e?retURL=%2Fa0B%2Fo' + strs;
        // }
        // url += '&CF00N100000098rY2=' + this.name +
        // '&CF00N100000098rY2_lkid=' + this.recordId +
        // '&CF00N10000002DPUD=' + this.hospital +
        // '&CF00N10000002DPUD_lkid=' + this.hospitalId +
        // '&CF00N10000002Dh0f=' + this.strategicDept +
        // '&CF00N10000002Dh0f_lkid=' + this.strategicDeptId +
        // '&CF00N10000002CWW4=' + this.account +
        // '&CF00N10000002CWW4_lkid=' + this.accountId +'&ent=01I10000000SWfe';
        // window.open(url);
    }
}
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-06-05 11:53:46
 * @LastEditTime: 2023-05-15 11:06:07
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -12,9 +12,8 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForOpporSpliteButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexOpporSplite extends NavigationMixin(LightningElement) {
export default class LexOpporSplite extends LightningElement {
    @api recordId;
    authorizedDBNo;
    estimationDecision;
@@ -62,30 +61,18 @@
        }else if(this.siDecideID == ''){
            this.showToast("需求表未批准,不能拆单","error");
        }else if(this.recordId != '草案中' && this.recordId != '已提交' && this.recordId != '已终止'){
            // console.log("sss");
            // window.open(
            //         "/"
            //         + this.recordId
            //         + "/e?clone=1&retURL=%2F"
            //         + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai="
            //         + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR="
            //         + this.opportunityNo + "&CF00N10000006qHai_lkid="
            //         + this.recordId + "&00N10000006qHav="
            //         + this.opportunityNo + "&00N10000009Glvn="
            //         + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
            // );
            this[NavigationMixin.Navigate]({
                type: 'standard__objectPage',
                attributes: {
                    objectApiName: 'Opportunity',
                    actionName: 'clone',
                    recordId: this.recordId
                },
                state: {
                    nooverride: '1',
                    // defaultFieldValues: defaultValues,
                }
            });
            console.log("sss");
            window.open(
                    "/"
                    + this.recordId
                    + "/e?clone=1&retURL=%2F"
                    + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai="
                    + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR="
                    + this.opportunityNo + "&CF00N10000006qHai_lkid="
                    + this.recordId + "&00N10000006qHav="
                    + this.opportunityNo + "&00N10000009Glvn="
                    + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
            );
        }
        this.dispatchEvent(new CloseActionScreenEvent());
    }
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
@@ -6,7 +6,9 @@
.combobox-container label {
    margin-right: 10px;
}
.THIS.white svg {
    fill : white;
}
/* .holder{
    position: relative;
    display: inline-block;
@@ -79,5 +81,4 @@
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    }
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,12 +4,38 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 17:16:48
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-02 11:29:37
 * @LastEditTime: 2023-09-06 15:43:06
-->
<template>
    <div class="holder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </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">
                    <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>
        </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_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>
                    </div>
                </div>
            </div>
        </template>
    </template>
    <template if:true={isInit}>
        <template if:true={isCreateOrEdit}>
            <lightning-card id="my-element1" class="card"  variant="Narrow" data-id="my-card">
@@ -33,7 +59,7 @@
                                    <div style="padding: 10px 3px;font: 16px;float: left">
                                        <span style="color:red;font-size: 10px;">*</span>
                                        失单类型:</div>
                                    <div style="float: left;">
                                    <div style="float: left;padding-top: 17px;">
                                        <lightning-combobox name="progress" value={LostReport.lostReport.LostType__c} options={RecordTypeOptions} 
                                        onchange={handleLostTypeChange} class="searchField" style="bottom: 16px;">
                                        </lightning-combobox> 
@@ -59,11 +85,11 @@
                                </lightning-layout-item>
                            </template>
                        </lightning-layout>
                                <lightning-accordion allow-multiple-sections-open class="myAccordion">
                                <lightning-accordion active-section-name="失单品牌" allow-multiple-sections-open="true" class="myAccordion">
                                        <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
                                            <li key={brand.lineNo}>
                                                <div class= "x-accordion-heading">
                                                    <lightning-accordion-section class="" data-id={i} name="失单品牌" label="失单品牌" active>
                                                    <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-layout>
@@ -75,13 +101,13 @@
                                                                    <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="失单品牌: " required></c-multi-select-combobox>
                                                                </template> 
                                                            </lightning-layout-item>
                                                            <lightning-layout-item flexibility="auto" padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(主):" value={brand.lostBrand.Lost_reason_main__c} options={columns2}
                                                                onchange={handleLostReasonMainChange} class="searchField" required></lightning-combobox>
                                                            <lightning-layout-item size="4"  padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(主):" value={brand.lostBrand.Lost_reason_main__c} options={columns2s}
                                                                onchange={handleLostReasonMainChange} class="searchField" placeholder="--无--" required></lightning-combobox>
                                                            </lightning-layout-item>
                                                            <lightning-layout-item flexibility="auto" padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(次):" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2}
                                                                onchange={handleLostReasonSubChange} class="searchField"></lightning-combobox>
                                                            <lightning-layout-item size="4"  padding="around-small">
                                                                <lightning-combobox name={i} label="失单原因(次):" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2s}
                                                                onchange={handleLostReasonSubChange} class="searchField" placeholder="--无--"></lightning-combobox>
                                                            </lightning-layout-item>
                                                        </lightning-layout>
                                                        <lightning-layout> 
@@ -126,14 +152,18 @@
                                                                                <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: 70px"></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" style="margin-bottom: 20px; width: 130px"></lightning-combobox>
                                                                                        </td>
                                                                                        <td>
                                                                                            <template if:true={isEdit}>
                                                                                                <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} init-value={product.productName}></c-lex-lookup-lwc>
                                                                                                <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>
                                                                                            </template>
                                                                                            <template if:false={isEdit}>
                                                                                                <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} style="margin-bottom: 20px;"></c-lex-lookup-lwc>
                                                                                                <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} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
                                                                                                </div>
                                                                                            </template>
                                                                                        </td>
                                                                                        <td>
@@ -212,7 +242,7 @@
                                    </lightning-record-view-form> 
                                </lightning-layout-item>
                                <lightning-layout-item size="1"></lightning-layout-item>
                                <lightning-layout-item size="2">
                                <lightning-layout-item size="1">
                                    <label>失单总金额(元):</label>
                                </lightning-layout-item>
                                <lightning-layout-item size="1">
@@ -242,72 +272,81 @@
                        </div>
                        <div style="margin-top: 5px">
                            <div class="slds-box slds-p-around_medium">
                                <lightning-accordion allow-multiple-sections-open class="myAccordion">
                                <lightning-accordion allow-multiple-sections-open class="myAccordion" active-section-name="失单品牌">
                                    <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="失单品牌">
                                                <lightning-layout>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <label>失单品牌:</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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" style="border-style:solid;border-width: 1px;">
                                                        <label>失单原因(主):</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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" style="border-style:solid;border-width: 1px;">
                                                        <label>失单原因(次):</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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>
                                                    </lightning-layout-item>
                                                </lightning-layout>
                                                <lightning-layout>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <label>失单品牌(手动):</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <label>失单金额(元):</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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="2" style="border-style:solid;border-width: 1px;">
                                                        <label>中标经销商:</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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>
                                                <lightning-layout>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <label>中标经销商(手动):</label>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
                                                        <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-accordion-section  class="text-container" data-id={i} name="失单品牌" label="失单品牌" 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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        </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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                        <lightning-layout-item size="3" style="border-width: 1px;border-bottom-style: groove;border-bottom-color: silver;">
                                                            <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>
                                                <lightning-layout>
                                                    <lightning-layout-item flexibility="auto" padding="around-small">
                                                        <!-- <template if:true={isInit}>
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,15 +4,26 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 15:04:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-01 16:22:17
 * @LastEditTime: 2023-09-07 14:46:02
 */
const columns2=[
let columns2=[
    { label: '--无--', value: '' },
    { label: '无信息,跟进不及时', value: '无信息,跟进不及时' },
    { label: '价格', value: '价格' },
    { label: '医生偏好', value: '医生偏好' },
    { label: '服务不到位', value: '服务不到位' },
    { label: '行政决策', value: '行政决策' },
    { label: '竞品原有基础上增添设备', value: '竞品原有基础上增添设备' },
    { label: '渠道因素', value: '渠道因素' },
    { label: '某种产品缺失', value: '某种产品缺失' },
    { label: '采购平衡', value: '采购平衡' }
];
let columns22=[
    { label: '--无--', value: '' },
    { label: '无信息,跟进不及时', value: '无信息,跟进不及时' },
    { label: '价格', value: '价格' },
    { label: '医生偏好', value: '医生偏好' },
    { label: '服务不到位', value: '服务不到位' },
    { label: '竞品原有基础上增添设备', value: '竞品原有基础上增添设备' },
    { label: '渠道因素', value: '渠道因素' },
    { label: '某种产品缺失', value: '某种产品缺失' },
@@ -46,7 +57,6 @@
import { api, wire,track,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import dataEntry from '@salesforce/apex/lexPCLLostReportLwcController.dataEntry';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/lexPCLLostReportLwcController.init';
import multiSelectCombobox from 'c/multiSelectCombobox'
import searchBrands from '@salesforce/apex/lexPCLLostReportLwcController.searchBrands';
@@ -55,17 +65,21 @@
import getPickList from '@salesforce/apex/lexPCLLostReportLwcController.getPickList';
import { NavigationMixin } from 'lightning/navigation';
import submit from '@salesforce/apex/lexPCLLostReportLwcController.submit';
import searchBatchIfForProduct from '@salesforce/apex/lexPCLLostReportLwcController.searchBatchIfForProduct';
import {CloseActionScreenEvent} from 'lightning/actions'; 
import lexLookupLwc from 'c/lexLookupLwc';
import searchProduct from '@salesforce/apex/lexPCLLostReportLwcController.searchProduct';
import { updateRecord } from 'lightning/uiRecordApi';
export default class LexPCLLostReportPage extends NavigationMixin(LightningElement) {
    @track visible = false;
    @wire(CurrentPageReference) pageRef;
    @api oppId;
    @track columns2=columns2;
    @track columns2s=columns22;
    @track status = {
        pageStatus: 'Create'
      }
    @track message;
    @track isSuccess;
    @track LostReport = {
        LostBrands: [
        ],
@@ -77,7 +91,8 @@
    submitFlag = '';
    flag;
    tableflag = 0;
    reportId = '';
    @api reportId;
    @api pageStatus;
    newProduct;
    productOptionsList;
    productClassOptions = productClassOptions;
@@ -90,7 +105,26 @@
    deleteProductIdList = [];
    IsLoading;
    newApprovalHistorys;
    handleCustomButtonClick(event) {
        try {
            var index1 = event.target.title;
            var index2 = event.target.name;
            var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + index1 + '"]');
            var elements2 = this.template.querySelectorAll('.ProductCategory[data-id="' + index1 + '"]');
            this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.LostProduct__c = null;
            elements1[index2].readOnly = false;
            elements2[index2].readOnly = false;
            this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.ProductClass__c=null;
            this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.ProductCategory__c=null;
            this.LostReport.LostBrands[index1].LostProducts[index2].bool=false;
            elements2[index2].readOnly = true;
        } catch (error) {
            console.log('error');
        }
    }
    connectedCallback(){
        this.status.pageStatus = this.pageStatus;
        init({
            oppId1: this.oppId,
            lostReportId1: this.reportId,
@@ -114,6 +148,36 @@
                this.newProduct = JSON.parse(JSON.stringify(this.LostReport.LostBrands[0].LostProducts[0]));
                this.newApprovalHistorys = JSON.parse(JSON.stringify(this.LostReport.approvalHistorys));
                console.log(this.LostReport);
                console.log(this.LostReport.approvalHistorys.length);
                if(this.LostReport.approvalHistorys.length > 0){
                    for(var i=0;i < this.LostReport.approvalHistorys.length;i++){
                        console.log('123');
                        var date = new Date(this.LostReport.approvalHistorys[i].CreatedDate);
                        this.LostReport.approvalHistorys[i].CreatedDate = date.toLocaleString();
                        if(this.LostReport.approvalHistorys[i].StepStatus == 'Approved'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已批准';
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Fault'){
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Pending'){
                            this.LostReport.approvalHistorys[i].StepStatus = '待处理';
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Held'){
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'NoResponse'){
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Reassigned'){
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Rejected'){
                            resthis.LostReportult.approvalHistorys[i].StepStatus = '已拒绝';
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Removed'){
                        }else if(this.LostReport.approvalHistorys[i].StepStatus == 'Started'){
                            this.LostReport.approvalHistorys[i].StepStatus = '已提交';
                        }
                        // this.LostReport.approvalHistorys.push(JSON.parse(JSON.stringify(result.approvalHistorys[i])));
                        console.log('321');
                    }
                    this.submitFlag = true;
                }
                this.isInit = true;
            }
            }).catch(error=>{
@@ -141,6 +205,13 @@
        });
    }
    renderedCallback(){
        const sections = this.template.querySelectorAll('lightning-accordion-section');
        sections.forEach(section=>{
            console.log(section);
            section.active = true;
        });
    }
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -159,12 +230,30 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        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);
        }
        // const event = new ShowToastEvent({
        //     title: '',
        //     message: msg,
        //     variant: type
        // });
        // this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
@@ -292,13 +381,14 @@
        });
    }
    onApproveChange(event){
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.LostReport.approvalHistorys[0].Id,
                actionName: 'view'
            }
        });
        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'
        //     }
        // });
    }
    
@@ -337,11 +427,25 @@
            console.log(this.deleteProductIdList);
        }
        this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c = payload.value;
        if(payloadType === 'multi-select'){
            this.clearProducts(payload.value,index);
            this.setDefaultBrand(payload.value,index);
            this.clearBrandMannualName(payload.value,index);
        }
        this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c = '';
        this.LostReport.LostBrands[index].lostBrand.Lost_Reason_Sub__c = '';
        searchBatchIfForProduct({
            productName: this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c
        }).then(result=>{
            console.log(result);
            if(result == '进口'){
                this.columns2s = columns2;
            }else{
                this.columns2s = columns22;
            }
            if(payloadType === 'multi-select'){
                this.clearProducts(payload.value,index);
                this.setDefaultBrand(payload.value,index);
                this.clearBrandMannualName(payload.value,index);
            }
        });
    }
    setDefaultBrand(value,index){
        var newProducts = [];
@@ -393,13 +497,14 @@
    }
    cancel() {
        // Navigate to the specified opportunity page using the NavigationMixin
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.oppId,
                actionName: 'view'
            }
        });
        // this[NavigationMixin.Navigate]({
        //     type: 'standard__recordPage',
        //     attributes: {
        //         recordId: this.oppId,
        //         actionName: 'view'
        //     }
        // });
        window.location = '/' +this.oppId;
    }
    
    saveBrandJs(event) {
@@ -582,6 +687,7 @@
        console.log(this.deleteProductIdList);
    }
    search(topNum,secondNum){
        console.log('12345');
        var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + topNum + '"]');
        var elements2 = this.template.querySelectorAll('.ProductCategory[data-id="' + topNum + '"]');
        if (this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) {
@@ -590,8 +696,8 @@
            this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null;
            this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null;
            this.LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false;
            elements1[secondNum].readOnly = true;
            elements2[secondNum].readOnly = true;
            // elements1[secondNum].readOnly = true;
            // elements2[secondNum].readOnly = true;
        }else {
            searchProduct({
@@ -622,7 +728,13 @@
            
        }
    }
    handleClear(event){
        console.log('ssss');
    }
    handleSelected(event) {
        console.log('54321');
        var index1 = event.target.title;
        var index2 = event.target.name;
        this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.LostProduct__c = event.detail.Id;
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-14 17:15:33
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-05 10:36:22
 * @LastEditTime: 2023-09-08 13:07:55
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -49,10 +49,10 @@
        var Currency = this.currencyIsoCode;
        var OppID = this.recordId;
        if (Currency == 'CNY'){
        var url = '/' + this.reportForCNYId + '?pv0=' + OppID;
        var url = '/lightning/r/Report/' + this.reportForCNYId + '/view?fv0=' + OppID;
        }
        else if (Currency == 'USD'){
        var url = '/' + this.reportForUSDId + '?pv0=' + OppID;
        var url = '/lightning/r/Report/' + this.reportForUSDId + '/view?fv0=' + OppID;
        }
        window.open(url);
        this.dispatchEvent(new CloseActionScreenEvent());
force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.html
@@ -1,7 +1,13 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-07-28 15:58:45
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-10 15:02:42
-->
<template>
    <div class="specSubmitHolder" 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 alternative-text="Loading" size="small"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexSpecSubmit/lexSpecSubmit.js
@@ -4,22 +4,26 @@
 * @Author: chen jing wu
 * @Date: 2023-06-06 15:41:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-07 10:35:35
 * @LastEditTime: 2023-09-01 09:33:28
 */
import { api, wire,LightningElement } from 'lwc';
import { api, wire,LightningElement, track } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateForSpecSubmitButton  from '@salesforce/apex/lexOpportunitySpecialApplyController.updateForSpecSubmitButton';
import init  from '@salesforce/apex/lexOpportunitySpecialApplyController.initForSpecSubmitButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { updateRecord,getRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import LightningConfirm from 'lightning/confirm';
import STATUS_FIELD from "@salesforce/schema/OpportunitySpecialApply__c.Status__c";
import { refreshApex } from '@salesforce/apex';
export default class LexSpecSubmit extends LightningElement {
    @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] })
    record;
    @api recordId;
    applyReason;
    isUploadFile;
    status;
    IsLoading = true;
    @track IsLoading = false;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
@@ -37,9 +41,10 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
@@ -84,8 +89,10 @@
            message: msg,
            variant: 'headerless',
            label: 'this is the aria-label value',
            mode:'sticky'
        });
        console.log(result);
        this.IsLoading = true;
        if(result){
            updateForSpecSubmitButton({
                recordId: this.recordId
@@ -94,8 +101,10 @@
                    this.showToast(result,'error');
                }else{
                    this.showToast('审批提交成功。','success');
                    this.updateRecordView(this.recordId);
                    this.IsLoading = false;
                    setTimeout(() => {
                        refreshApex(this.record);
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }, 1000);
                }
                this.dispatchEvent(new CloseActionScreenEvent());
            });
force-app/main/default/lwc/lexSpecilaApplyCreateLwc/lexSpecilaApplyCreateLwc.js
@@ -1,11 +1,3 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-25 10:06:08
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-25 10:54:46
 */
import { LightningElement,api, track, wire } from 'lwc';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -62,4 +54,4 @@
        });
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
}
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-04-11 11:28:51
 * @LastEditTime: 2023-08-25 16:50:36
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -49,9 +49,10 @@
    showToast(msg,type) {
      const event = new ShowToastEvent({
          title: '',
          title: ' ',
          message: msg,
          variant: type
          variant: type,
          mode: 'sticky'
      });
      this.dispatchEvent(event);
  }
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.html
@@ -1,5 +1,14 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-08-23 17:29:26
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-08-24 16:50:01
-->
<template>
    <div class="submitSolutionForApprovalHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={showToast}></lightning-button>
    </div> 
</template>
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.js
@@ -4,19 +4,23 @@
 * @Author: chen jing wu
 * @Date: 2023-06-20 14:37:24
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-07 16:11:12
 * @LastEditTime: 2023-08-29 14:07:08
 */
import { api, wire,LightningElement } from 'lwc';
import { api, wire,LightningElement, track } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateSubmitSolutionForApprovalButton  from '@salesforce/apex/lexSolutionProjectRequirementsController.updateSubmitSolutionForApprovalButton';
import init  from '@salesforce/apex/lexSolutionProjectRequirementsController.initSubmitSolutionForApprovalButton';
import queryForAttachments  from '@salesforce/apex/lexSolutionProjectRequirementsController.queryForAttachments';
import { updateRecord } from 'lightning/uiRecordApi';
import { updateRecord,getRecord } from 'lightning/uiRecordApi';
import STATUS_FIELD from "@salesforce/schema/SolutionProjectRequirements__c.Status__c";
import { refreshApex } from '@salesforce/apex';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import LightningConfirm from 'lightning/confirm';
export default class LexSubmitSolutionForApproval extends LightningElement {
    @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] })
    record;
    @api recordId;
    status;
    submitDateYouWant;
@@ -42,9 +46,10 @@
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
@@ -79,13 +84,12 @@
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if(this.submitDateYouWant < this.createdDate + 3){
        this.createdDate.setDate(this.createdDate.getDate() + 3);
        if(this.submitDateYouWant.getTime() < this.createdDate.getTime()){
            this.showToast('希望提交日期不得小于三天,如紧急需求请邮件联络Solution担当','error');
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        console.log("start");
        queryForAttachments({
            Id: this.departmentClassId
        }).then(result=>{
@@ -118,7 +122,7 @@
        const result = await LightningConfirm.open({
            message: msg,
            variant: 'headerless',
            label: 'this is the aria-label value',
            label: 'this is the aria-label value'
        });
        console.log(result);
        if(result){
@@ -129,7 +133,13 @@
                   if(results){
                        this.showToast(results,"error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                   }
                   } else{
                        setTimeout(() => {
                            refreshApex(this.record);
                            this.dispatchEvent(new CloseActionScreenEvent());
                        }, 1000);
                   }
                } catch (error) {
                    if(err.faultstring !=undefined && err.faultstring.indexOf('INVALID_SESSION_ID') != -1) {
                        this.showToast('当前网页已登出,请您重新登录后刷新该网页!','error');
@@ -140,8 +150,6 @@
                    }
                    return;
                }
                this.updateRecordView(this.recordId);
                this.dispatchEvent(new CloseActionScreenEvent());
            });
            // isopd.Id = "{!SolutionProjectRequirements__c.Id}";
            // isopd.Submint_TF__c = true;
force-app/main/default/lwc/lexSubmitSolutionForApproval/lexSubmitSolutionForApproval.js-meta.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <apiVersion>56.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
force-app/main/default/lwc/lexSubmitSolutionSchemeForApproval/lexSubmitSolutionSchemeForApproval.js
@@ -1,15 +1,8 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-21 09:17:25
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-07 16:35:41
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateSubmitSolutionSchemeForApprovalButton  from '@salesforce/apex/lexSolutionProgrammeController.updateSubmitSolutionSchemeForApprovalButton';
import submitApproval  from '@salesforce/apex/lexSolutionProgrammeController.submitApproval';
import init  from '@salesforce/apex/lexSolutionProgrammeController.initSubmitSolutionSchemeForApprovalButton';
import queryForAttachments  from '@salesforce/apex/lexSolutionProgrammeController.queryForAttachments';
import { updateRecord } from 'lightning/uiRecordApi';
@@ -36,15 +29,6 @@
          }
        }
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
@@ -54,8 +38,9 @@
        init({
            recordId: this.recordId
        }).then(result=>{
            this.schemeType = result.schemeType == undefined ? result.schemeType : '';
            this.confirmationResult = result.confirmationResult == undefined ? result.confirmationResult : '';
            console.log(result);
            this.schemeType = result.schemeType;
            this.confirmationResult = result.confirmationResult == undefined ?  '' : result.confirmationResult;
            this.submitSolutionSchemeForApproval();
        });
    }
@@ -76,22 +61,29 @@
        });
        console.log(result);
        if(result){
            if(this.schemeType == '结案' && this.confirmationResult == ''){
            console.log(this.schemeType);
            console.log(this.confirmationResult);
            if(this.schemeType == '结案' && (this.confirmationResult == '' || this.confirmationResult == undefined)){
                this.showToast('结案方案提交前,方案采纳结果必填','error');
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
            console.log('this.schemeType:'+this.schemeType);
            if((this.records.length > 0 && this.schemeType == '结案') || (this.schemeType == '初次')){
                updateSubmitSolutionSchemeForApprovalButton({
                    recordId: this.recordId
                }).then(result=>{
                    if(result){
                        this.showToast(result,'error');
                submitApproval({recordId:this.recordId}).then(rep => {
                    console.log(rep);
                    if(rep==='OK'){
                        console.log('1');
                        this.showToast('提交审批成功','success');
                    }else{
                        this.updateRecordView(this.recordId);
                        console.log('2');
                        this.showToast(rep,'error');
                    }
                    this.dispatchEvent(new CloseActionScreenEvent());
                });
                }).catch(err => {
                    console.log('3');
                    console.log(err);
                    this.showToast(err,'error');
                })
            }else{
                this.showToast('结案的方案提交前,必须上传结案附件','error');
                this.dispatchEvent(new CloseActionScreenEvent());
@@ -103,4 +95,15 @@
            return;
        }
    }
    showToast(msg, type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
        if(type==='success'){
            window.location.href = '/lightning/r/Solution_Programme__c/'+this.recordId+'/view';
        }
    }
}
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-05-09 10:21:25
 * @LastEditTime: 2023-08-25 16:51:56
 */
import { LightningElement, wire, track, api } from "lwc";
import { CurrentPageReference } from "lightning/navigation";
@@ -54,14 +54,15 @@
    //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
  }
  showToast(msg, type) {
  showToast(msg,type) {
    const event = new ShowToastEvent({
      title: "",
      message: msg,
      variant: type
        title: ' ',
        message: msg,
        variant: type,
        mode: 'sticky'
    });
    this.dispatchEvent(event);
  }
}
  updateRecordView(recordId) {
    updateRecord({ fields: { Id: recordId } });
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.html
@@ -1,6 +1,6 @@
<template>
    <div class="checkHolder" 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>
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
@@ -18,7 +18,7 @@
    userId;
    systemProfileId;
    luShengId;
    huDiAnId;
    // huDiAnId;
    Isloading = true;
    @wire(CurrentPageReference)
@@ -52,7 +52,7 @@
                this.profileId = result.profileId;
                this.systemProfileId = result.systemProfileId;
                this.luShengId = result.luShengId;
                this.huDiAnId = result.huDiAnId;
                // this.huDiAnId = result.huDiAnId;
                console.log(this.status); 
                this.check();
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
@@ -92,7 +92,8 @@
    }
    check (){
        // 陆胜,胡迪安,系统管理员可点(需要调整)
        if (this.userId != this.luShengId && this.userId != this.huDiAnId && this.profileId != this.systemProfileId) {
        // && this.userId != this.huDiAnId 胡迪安已离职
        if (this.userId != this.luShengId && this.profileId != this.systemProfileId) {
                this.showToast("你没有判定VOC的权限","error");
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
@@ -118,6 +119,7 @@
                    this.showToast(result,"error");
                }else{
                    this.updateRecordView(this.recordId);
                    console.log("success");
                }
                this.Isloading = false;   
                this.dispatchEvent(new CloseActionScreenEvent());
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-03-27 14:08:56
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 09:13:55
 * @LastEditTime: 2023-08-24 15:37:45
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -84,12 +84,13 @@
            }
        updateForVOCConfirmButton({
            recordId: this.recordId,
            satisfy: this.sSatisfy,
            satisfy: this.satisfy,
            satisfy1: this.satisfy1    
        }).then(result=>{
            if(result){
                this.showToast(result,"error");
            }else{
                this.showToast(result,"success");
                this.updateRecordView(this.recordId);
            }
            this.Isloading = false;
force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.html
@@ -1,6 +1,14 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-14 16:06:52
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-28 11:15:02
-->
<template>
    <div class="vocFinishHolder" 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>
force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.html
@@ -1,11 +1,3 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-14 16:06:52
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-07-12 13:50:00
-->
<template>
    <div class="vocSubmitHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
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-05-09 10:15:43
 * @LastEditTime: 2023-09-08 15:42:21
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -61,9 +61,10 @@
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            title: ' ',
            message: msg,
            variant: type
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
    }
@@ -81,7 +82,10 @@
                if(result){
                    this.showToast(result,"error");
                }else{
                    this.updateRecordView(this.recordId);
                    // this.updateRecordView(this.recordId);
                    setTimeout(() => {
                        window.location = '/' + this.recordId;
                    }, 2000);
                }
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
force-app/main/default/pages/AccountCaseTab.page
@@ -1,10 +1,47 @@
<apex:page controller="AccountCaseTabController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true">
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<title>检查数</title>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<style type="text/css">
    table {border-collapse: collapse;}
     /*信息提示颜色*/
body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
    background-color: #08107b !important;;
    color: #FFF !important;
}
body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
    background-color: #08107b !important;
}
body .message, .slds-vf-scope .message{
    background-color: #08107b !important;
}
body .errorM2 h4,body .errorM3 h4,body .errorM4 h4,.slds-vf-scope .errorM2 h4,.slds-vf-scope .errorM3 h4,.slds-vf-scope .errorM4 h4 {
    /* color: rgb(255, 255, 255)!important */
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .warningM2,body .warningM3,body .warningM4,.slds-vf-scope .warningM2,.slds-vf-scope .warningM3,.slds-vf-scope .warningM4 {
    background-color: rgb(254, 147, 57)!important;
    color: rgb(24, 24, 24)!important
}
body .confirmM2,body .confirmM3,body .confirmM4,.slds-vf-scope .confirmM2,.slds-vf-scope .confirmM3,.slds-vf-scope .confirmM4 {
    background-color: rgb(46, 132, 74)!important
}
body .pbButton{
    text-align: left;
}
.message .messageText{
    color: #FFF !important;
}
    th.lvl1 {width: 100px;}
    th.lvl2 {width: 100px;}
    th.lvl3 {width: 100px;}
@@ -15,7 +52,7 @@
    th.priceSum {width: 100px; text-align: center;}
    th.priceTotal {width: 100px; text-align: center;}
    
    td {font-size: 120%;}
    td {font-size: .8125rem; }
    td.lvl1 {text-align:center; vertical-align:middle;}
    td.lvl2 {text-align:center; vertical-align:middle;}
    td.sum {text-align: right;}
force-app/main/default/pages/AssetGuaranteePeriodAlteration.page
@@ -232,7 +232,7 @@
                            </td>                           
                            <td>
                            <apex:inputText value="{!val1}"
                            id="val1" style="width:100px"/>
                            id="val1" style="width:110px"/>
                            </td>
                            <td align="right"></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;" onclick="searchProductJs('0');return false;" /></td>
force-app/main/default/pages/AssetMaintain.page
@@ -4,6 +4,11 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style>
         /*20230815 ljh start*/
         table.mytable tr{
            height:45px;
        }
        /*20230815 ljh end*/
        .dateFormat  {
            display: none;
        }
@@ -16,6 +21,7 @@
        table {
            table-layout: fixed;
            border-collapse: collapse;
            line-height: 28px;
        }
        a {
            text-decoration: none;
@@ -105,7 +111,7 @@
            padding-left: 10px;
        }
        .inputTextStyle input {
            width: 90%;
            width: 95%;
        }
        .inputTextStyle select {
            width: 95%;
@@ -121,6 +127,30 @@
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        td{
            min-height: 28px
        }
        .you-button {
            background-color: #d9d8d8 !important;
            box-shadow: 0px 7px 2px 0px #aeacac !important;
            transition: all .5s !important;
            }
            /* .you-button:hover {
                background-color: #fcdc5e !important;
            } */
        .you-button:active {
            transform: translate(0,4px) !important;
            text-shadow: -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0) !important;
            box-shadow: 0px 1px 0px 0px #aeacac !important;
        }
    </style>
    <script type="text/javascript">
@@ -198,21 +228,21 @@
        }
        var globalQueryCondition;
        var fromQuickBarFlag = 'false';
        // function checkAssetJs(queryCondition) {
        //     fromQuickBarFlag = 'true';
        //     globalQueryCondition = queryCondition;
        //     var changeFlg = checkChangeFlg();
        //     if (changeFlg == '1') {
        //         blockme();
        //         checkAssetFunc(queryCondition, fromQuickBarFlag);
        //     } else if (changeFlg == '3') {
        //         blockme();
        //         checkAssetFunc(queryCondition, fromQuickBarFlag);
        //         globalQueryCondition = '';
        //     }
        //     fromQuickBarFlag = 'false';
        //     return false;
        // }
        function checkAssetJs(queryCondition) {
            fromQuickBarFlag = 'true';
            globalQueryCondition = queryCondition;
            var changeFlg = checkChangeFlg();
            if (changeFlg == '1') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
            } else if (changeFlg == '3') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
                globalQueryCondition = '';
            }
            fromQuickBarFlag = 'false';
            return false;
        }
        // 检索按钮
        function searchBtnJs() {
@@ -396,48 +426,37 @@
            <apex:actionFunction name="clearAllSearchConditionWhenCancel" action="{!clearAllSearchConditionWhenCancel}"></apex:actionFunction>
            <!-- 左侧按钮区 -->
            <!-- chenjingwu 2023.8.2 start-->
            <!-- <apex:outputPanel layout="block" style="width: 13%; float: left;" rendered="{!showTop}">
            <!-- 左侧按钮区 -->
            <apex:outputPanel layout="block" style="width: 17%; float: left;" rendered="{!showTop}">
                <apex:pageBlock mode="maindetail">
                    <table style='height: 220px'>
                    <table style='height: 390px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle "><apex:commandButton styleClass="you-button"  value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看借出分配数" rendered="{!!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr> -->
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <!-- OLY_OCM-818 -->
                        <!-- <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel> -->
            <!-- <apex:outputPanel layout="block" style="width: 13%; float: left;" rendered="{!showTop}">
                <apex:pageBlock mode="maindetail">
                    <table style='height: 220px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel> -->
            </apex:outputPanel>
            <!-- chenjingwu 2023.8.2 end-->
            <!-- 右侧检索区 -->
            <apex:outputPanel layout="block" style="width: 100%;margin: 0 auto;" rendered="{!showTop}">
            <apex:outputPanel layout="block" style="width: 82%;margin: 0 auto;float: right;" rendered="{!showTop}">
                <apex:pageBlock mode="maindetail">
                    <table style='width: 95%; height: 220px'>
                    <table style='width: 100%; height: 390px' class="mytable">
                        <tr>
                            <td class="labelStyle">备品存放地</td>
                            <td class="inputTextStyle">
@@ -452,14 +471,11 @@
                            <td class="labelStyle">货架号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.wh_location}" id="shelfNumId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品状态</td>
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品管理编码</td>  <!-- シリアル番号 -->
                            <td class="inputTextStyle">
@@ -483,7 +499,6 @@
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">主体/附属品</td>
                            <td class="inputTextStyle">
@@ -506,14 +521,7 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
                                    <apex:selectOptions value="{!manage_typeOpts}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">所在地区(本部)</td>
                            <td class="inputTextStyle">
@@ -529,17 +537,14 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">消耗品有效期至</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:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="searchButtonStyle" colspan="2">
                                <apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
@@ -555,14 +560,18 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <!-- chenjingwu 2023.8.2 start-->
                            <td class="labelStyle">设备状态</td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!assertQueryCondition}" id="assertQueryCondition" size="1">
                                    <apex:selectOptions value="{!assertQueryConditionOpts}"/>
                                <apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
                                    <apex:selectOptions value="{!manage_typeOpts}"/>
                                </apex:selectList>
                            </td>
                            <!-- chenjingwu 2023.8.2 end-->
                            <td class="blankStyle"></td>
                            <td class="searchButtonStyle" colspan="2" style="text-align: right;">
                                <apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
@@ -576,11 +585,12 @@
            <apex:inputHidden id="clearApplyFlagId" />
            <apex:outputPanel style="display:none">
                <apex:outputPanel id="popupBox" layout="block">
                    <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                    <input type="file" id="file_input" name="attFile" accept=".csv" style="padding-left: 8px;"/><br/><br/>
                    <apex:selectList size="1" id="csvMaintaintype">
                        <apex:selectOptions value="{!maintainTypeOptionList}"/>
                    </apex:selectList>
                    <center>
                        <input type="hidden" id="customHidden"/>
                        <apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                        <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                    </center>
@@ -675,10 +685,10 @@
            <table border="0">
                <tr>
                    <td style="width: 2%"></td>
                    <td class="setButtonStyle"><apex:commandButton value="EXCEL导入" onclick="openPopupCSV(); return false;" oncomplete="refresh" disabled="{!!importCSVButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton action="{!saveApply}" value="保存申请" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!saveButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton value="提交申请" onclick="submitApplyJS();return false;" disabled="{!!submitButtonActive}" /></td>
                    <!-- <td style="width: 2%"></td> -->
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="EXCEL导入" onclick="openPopupCSV(); return false;" oncomplete="refresh" disabled="{!!importCSVButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" action="{!saveApply}" value="保存申请" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!saveButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="提交申请" onclick="submitApplyJS();return false;" disabled="{!!submitButtonActive}" /></td>
                    <apex:actionFunction name="submitApply" action="{!submitApply}" rerender="allForm" onComplete="unblockUI();" />
                    <script>
                        function submitApplyJS(){
@@ -688,7 +698,7 @@
                            }
                        }
                    </script>
                    <td class="setButtonStyle"><apex:commandButton value="删除" onclick="deleteApplyJS();return false;" disabled="{!!deleteButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="删除" onclick="deleteApplyJS();return false;" disabled="{!!deleteButtonActive}" /></td>
                    <apex:actionFunction name="deleteApply" action="{!deleteApply}" rerender="allForm" onComplete="unblockUI();" />
                    <script>
                        function deleteApplyJS() {
@@ -698,14 +708,14 @@
                            }
                        }
                    </script>
                    <td class="setButtonStyle"><apex:commandButton action="{!abandon}" value="废弃" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!abandonButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" action="{!abandon}" value="废弃" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!abandonButtonActive}" /></td>
                    <td>
                        <apex:selectList size="1" id="reportMaintaintype">
                            <apex:selectOptions value="{!maintainTypeOptionList}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:commandButton onclick="openReport();return false;" value="查看报表" />
                        <apex:commandButton style="width: 90px" onclick="openReport();return false;" value="查看报表" />
                    </td>
                    <script type="text/javascript">
                        var popupBox;
@@ -762,31 +772,35 @@
                            else{
                                reportId = "{!notScrappedReportId}";
                            }
                            var url = `/${reportId}?pv0=${maintainType}`;
                            var url = `/lightning/r/Report/${reportId}?fv0=${maintainType}`;
                            window.open(url);
                        }
                    </script>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td class="labelSettingStyle">维护类型</td>
                    <td class="inputTextStyle">
                        <apex:selectList id="maintainTypeId" size="1">
                    <td>
                    <font>维护类型</font>&nbsp;
                    <apex:selectList id="maintainTypeId" size="1" style="width: 100px;">
                            <apex:selectOptions value="{!maintainTypeOptionList}"/>
                        </apex:selectList>
                        </apex:selectList>
                    </td>
                    <!-- <td class="inputTextStyle">
                    </td> -->
                    <td class="labelSettingStyle">维护数量</td>
                    <td class="inputTextStyle">
                        <apex:inputText id="maintainCountId"/>
                        <apex:inputText id="maintainCountId" style="width: 90%"/>
                    </td>
                    <td class="labelSettingStyle">废弃数量</td>
                    <td class="inputTextStyle">
                        <apex:inputText id="abandonCountId"/>
                        <apex:inputText id="abandonCountId" style="width: 90%"/>
                    </td>
                    <td class="setButtonStyle"><apex:commandButton 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();" disabled="{!!editButtonActive}" /></td>
                    <td class="setButtonStyle">
                        <apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!!editmode}"  />
                        <apex:commandButton style="width: 58%" value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!!editmode}"  />
                        <script type="text/javascript">
                            // 适用按钮
                            function applyJs() {
@@ -851,50 +865,55 @@
                        </script>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
            </table>
            <table>
                <tr>
                    <td>
                    <td style="width: 49%;">
                        <font>数据字段</font>&nbsp;
                        <apex:selectList value="{!fieldName}" size="1" style="width:110px"><apex:selectOptions value="{!fieldNameOpts}"/></apex:selectList> 
                        <apex:selectList value="{!fieldName}" size="1" style="width:100px"><apex:selectOptions value="{!fieldNameOpts}"/></apex:selectList> 
                        &nbsp;<apex:selectList value="{!operator}" size="1"><apex:selectOptions value="{!operatorOpts}"/></apex:selectList> 
                        &nbsp;<apex:inputText value="{!fieldvalue}" style="width:80px"/>
                        <apex:commandButton value="筛选" action="{!filter}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()"/>
                        <apex:commandButton style="width: 18%;" value="筛选" action="{!filter}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()"/>
                    </td>
                    <td>显示数据数量</td>
                    <td style="width: 8%;">显示数据数量</td>
                    <td class="inputTextStyle">
                        <apex:actionFunction name="firstPg" action="{!firstPage}" rerender="allForm" onComplete="unblockUI();" />
                        <apex:selectList value="{!selRecordOption}" size="1" onchange="blockme();firstPg(); return false;">
                            <apex:selectOptions value="{!limitOpts}"/>
                        </apex:selectList>
                    </td>
                    <td align="right">共{!allAssetDataListSize}条数据</td>
                    <td align="right" style="width: 8%;">共{!allAssetDataListSize}条数据</td>
                    <td width="20px"></td>
                    <td align="right"> 已选中<label id="checkedNumId">{!checkedSize}</label>条数据</td>
                    <td align="right" style="width: 10%;"> 已选中<label id="checkedNumId">{!checkedSize}</label>条数据</td>
                    <td width="20px"></td>
                    <td align="right"> 未选中<label id="uncheckedNumId">{!allAssetDataListSize - checkedSize}</label>条数据</td>
                    <td width="20px"></td>
                    <td align="right">第 {!currPage} 页</td>
                    <td width="20px"></td>
                    <td align="right">共 {!totalPage} 页</td>
                    <td width="20px"></td>
                    <td align="right" width="45px">
                    <td style="width: 13%;"> 未选中<label id="uncheckedNumId">{!allAssetDataListSize - checkedSize}</label>条数据</td>
                </tr>
            </table>
            <table style="width: 97%">
                <tr>
                    <td></td>
                    <td style="width: 40%" align="right">第 {!currPage} 页 &nbsp;&nbsp;共 {!totalPage} 页</td>
                    <td align="left"></td>
                    <td width="120px"></td>
                    <td style="width: 8%">
                        <apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="4%">
                        <apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="45px">
                        <apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="下一页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="50px"></td>
                    <td width="45px">
                        <apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="尾页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
@@ -912,7 +931,7 @@
                <table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 30px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <!-- 全选 -->
                        <td style="width:20px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
                        <td style="width:23px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!amdLeftLabelList}" var="t">
                            <td class="col_{!columnAmdLeftCssList[cnt]}" style="word-wrap:break-word">
@@ -943,7 +962,7 @@
                    <apex:repeat id="dataline_L1" value="{!allAssetInfoShowList}" var="eachAssetData">
                        <tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                            <!-- 全选 -->
                            <td class="dataCellBorder1" style="width:20px" align="center">
                            <td class="dataCellBorder1" style="width:23px" align="center">
                                <apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.amd['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
                                <apex:inputHidden id="canChange" />
                            </td>
@@ -972,7 +991,7 @@
                    <apex:repeat id="dataline_L2" value="{!assetFromSearchList}" var="eachAssetData">
                        <tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                            <!-- 全选 -->
                            <td class="dataCellBorder1" style="width:20px" align="center">
                            <td class="dataCellBorder1" style="width:23px" align="center">
                                <apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.amd['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
                                <apex:inputHidden id="canChange" />
                            </td>
force-app/main/default/pages/AssetMaintainIframe.page
@@ -1,4 +1,4 @@
<apex:page lightningStylesheets="true">
<apex:page lightningStylesheets="true" title="备品维护数据相关操作">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
@@ -7,38 +7,71 @@
                flex: 2;
                padding: 20px;
            }
            .you-button {
            background-color: #d9d8d8 !important;
            box-shadow: 0px 7px 2px 0px #aeacac !important;
            transition: all .5s !important;
            }
            /* .you-button:hover {
                background-color: #fcdc5e !important;
            } */
        .you-button:active {
            transform: translate(0,4px) !important;
            text-shadow: -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0) !important;
            box-shadow: 0px 1px 0px 0px #aeacac !important;
        }
        </style>
    <apex:form >
        <apex:actionFunction action="{!loadPage}" name="cancel" rerender="allForm" oncomplete="unblockUI();"/>
        <div class="vf-container">
            <div style="width:10%;float:left;">
            <div style="width:9%;float:left;">
                <div>
                    <apex:commandButton style="width: 99%" value="数据维护" onclick="loadPage('/apex/AssetMaintain'); return false"/>
                    <apex:commandButton styleClass="you-button" style="width: 100%;" value="数据维护" onclick="loadPage('/apex/AssetMaintain'); return false"/>
                </div>
                <div>
                    <apex:commandButton style="width: 99%" value="维护产品主数据" onclick="location.href = '/a3z/o'; return false"/>
                <div style="margin-top:10px;">
                    <apex:commandButton style="width: 100%" value="数据维护单" onclick="window.open('/lightning/o/AssetMaintainHeader__c/list?filterName=Recent')"/>
                </div>
                <div style="margin-top:10px;">
                    <apex:commandButton style="width: 100%" value="维护产品主数据" onclick="window.open('/a3z/o')"/>
                </div>
            </div>
            <div style="width:90%;float:right;" id="vf-content">
                <!-- VF 页面内容将在此处显示 -->
            </div>
            <iframe src="/apex/AssetMaintain" id="iframepage" width="90%" style="margin-left:3px;" scrolling="auto" onload="changeFrameHeight()" frameborder="0"></iframe>
        </div>
    </apex:form>
        
    
        <script>
            function loadPage(pageUrl) {
            // function loadPage(pageUrl) {
    
                var vfContent = "<iframe src='" + pageUrl + "' style='width: 100%; height: 1000px; border: none;'></iframe>";
                document.getElementById("vf-content").innerHTML = vfContent;
            //     var vfContent = "<iframe src='" + pageUrl + "' style='width: 100%; height: 1000px; border: none;'></iframe>";
            //     document.getElementById("vf-content").innerHTML = vfContent;
                
            }
            // }
    
            window.addEventListener('load', function () {
                blockme();
                var vfContent = "<iframe src='/apex/AssetMaintain' style='width: 100%; height: 1000px; border: none;'></iframe>";
                document.getElementById("vf-content").innerHTML = vfContent;
                unblockUI();
            });
            // window.addEventListener('load', function () {
            //     blockme();
            //     var vfContent = "<iframe src='/apex/AssetMaintain' style='width: 100%; height: 1000px; border: none;'></iframe>";
            //     document.getElementById("vf-content").innerHTML = vfContent;
            //     unblockUI();
            // });
            function changeFrameHeight(){
                var ifm= document.getElementById("iframepage");
                ifm.height=document.documentElement.clientHeight-30;
            }
            function changeFlagColor(){
            }
            window.onresize=function(){
                changeFrameHeight();
            }
        </script>
</apex:page>
force-app/main/default/pages/AssetModifyBelongs.page
@@ -1,12 +1,122 @@
<apex:page standardController="AssetModifyBelongsChange__c" extensions="AssetModifyBelongsController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="最终用户变更申请" lightningStylesheets="true">
<apex:page standardController="AssetModifyBelongsChange__c"  extensions="AssetModifyBelongsController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="最终用户变更申请" lightningStylesheets="true">
<apex:slds />
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<apex:includeScript value="{!$Resource.SLDSDynamicLookupScript}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<script>
             //2023 08 30 张赫阳 PIPL页面改造 start
        var AWSDataId = '';
        //2023 08 30 张赫阳 PIPL页面改造 end
        let inputHiddenId='allPage:allForm:AccountField__c';
        //2023 08 30 张赫阳 PIPL页面改造 start
        function Query2(){
        }
        let newSearchContactWindow = null;
        function searchContact() {
                    let accountValue = '{!ambc.AccountField__c}';
                    let searchContactKeyWord = document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").value;
                    let responsibleNodeId = document.getElementById("allPage:allForm:AccountField__c").value;
                    let ObjectType = 'Account';
                    let FieldNameList = '姓名,Id';
                    let FieldApiNameList = 'Name,Id';
                    let QueryFieldName = '姓名';
                    let QueryFieldApiName = 'Name';
                    let QuertLimit='recordTypeId in '+
                    '(\\\'01210000000Qfmb\\\',\\\'01210000000QfmR\\\',\\\'01210000000QfmM\\\',\\\'01210000000QfmH\\\''+
                    ',\\\'01210000000QfmC\\\',\\\'01210000000Qfm7\\\',\\\'01210000000Qfm2\\\',\\\'01210000000QemQ\\\')';
                    // let QuertLimit='';
                    console.log(accountValue);
                    if (accountValue != '000000000000000') {
                        let baseUrl = "/apex/SearchContactPageLWC";
                        let suffixUrl = "?contactId=" + responsibleNodeId + "&accountId=" + accountValue+"&searchContactKeyWord=" + searchContactKeyWord+"&Type=OFS" + '&ObjectType=' + ObjectType + '&FieldNameList=' + FieldNameList + '&FieldApiNameList=' + FieldApiNameList + '&QueryFieldName=' + QueryFieldName + '&QueryFieldApiName=' + QueryFieldApiName + '&QuertLimit=' + encodeURI(QuertLimit) + '&inputHiddenId=' +inputHiddenId;
                        let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
                        newSearchContactWindow = window.open(baseUrl + suffixUrl, 'Popup', newSearchContactParam);
                        if (window.focus) {
                            newSearchContactWindow.focus();
                        }
                        return false;
                    } else {
                        alertErrorMessage('请先选择医院名');
                    }
        }
        function closePopupWindow() {
            console.log('close1');
            if (null != newSearchContactWindow) {
                newSearchContactWindow.close();
            }
            console.log('close2');
            let contactInfoStr = document.getElementById('allPage:allForm:AccountField__c').value;
            console.log('closePopup:' + contactInfoStr);
            let contactInfo = JSON.parse(contactInfoStr);
            document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").value = contactInfo.Name;
            document.getElementById(document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").id + '_lkold').value = contactInfo.Name;
            document.getElementById(document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").id + '_lkid').value = contactInfo.Id;
            document.getElementById('allPage:allForm:AccountField__c').value = contactInfo.Id;
            AWSDataId = contactInfo.AWSDataId;
            console.log('AWSDataId = ' + AWSDataId);
        }
        j$(function(){
            Query2();
            replaceSearchContactLookup();
        })
        function replaceSearchContactLookup() {
            console.log('enter replaceSearchContactLookup');
            document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").parentNode.children[2].removeAttribute("href");
            console.log(document.getElementById("allPage:allForm:allBlock:searchBlock:OEC"));
            document.getElementById("allPage:allForm:allBlock:searchBlock:OEC").parentNode.children[2].onclick = function() {
                searchContact();
            };
        }
//2023 08 30 张赫阳 PIPL页面改造 end
function cg(){
    var input=document.getElementById("allPage:allForm:allBlock:searchBlock:OEC");
    // console.log(cam);
    // console.log(document.getElementById("allPage:allForm:allBlock:searchBlock:OEC_lkid"));
    // console.log(cam.classList.add("slds-lookup__menu"));
    // input.classList.add("slds-form-element_stacked");
    // console.log(input);
              // 获取inputField组件
    // let td = document.querySelector("td[colspan='4']");
    // let input = td[1].querySelector("input[id$='OEC']");
    console.log(input);
    input.classList.add("slds-input");
    input.style.boxShadow = "0 2px 3px #F7F7F7";
  input.addEventListener('click', (event) => {
  // 阻止默认弹出默认搜索框
  event.preventDefault();
  // 弹出层元素
  const popup = input.querySelector('.lookupInput');
  // 添加Lightning样式类
  popup.classList.add('slds-dropdown');
  popup.classList.add('slds-combobox');
  // 输入框
  const searchInput = popup.querySelector('input');
  searchInput.classList.add('slds-input');
  // 调整DOM结构
  // ......
  // 删除默认样式
  popup.classList.remove('xx-class');
  // 设置CSS样式
  searchInput.style.boxShadow = '0 2px 3px #f7f7f7';
  // 弹出层显示
  popup.style.display = 'block';
});
};
function ClearJs(){
    blockme();
    document.getElementById("allPage:allForm:allBlock:searchBlock:text1").value = "";
@@ -127,7 +237,7 @@
    }
</style>
    <apex:form id="allForm">
        <apex:inputHidden value="{!ambc.AccountField__c}" id="AccountField__c" />
        <apex:actionFunction name="save" action="{!save}" rerender="editAble,ConsumableorderdetailsSection, message,editAble" onComplete="unblockUI();CheckStatusAfter();">
        </apex:actionFunction>
        <apex:actionFunction name="Sorder" action="{!Sorder}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();init();">
@@ -252,7 +362,7 @@
                            id="val1" style="width:200px"/>
                            </td>
                            <td align="left"><div id="seachdiv">合同编码精确查询<apex:inputCheckbox value="{!checkexact}" id="RowCheckbox"/></div></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;padding-right: 10px" onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td>
                            <td/>
                        </tr>
@@ -262,7 +372,16 @@
                        <tr>
                            <td colspan="3"/>
                            <td colspan="4" style="height:50px;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;原客户:<apex:outputField value="{!ambc.rawAccount__c}"/></td>
                            <td colspan="4">目标客户:<apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="height:25px;width:200px"/></td>
                            <!-- <td colspan="4">目标客户:<apex:inputField  id="OEC" value="{!ambc.AccountField__c}"  style="height:25px;width:200px"/></td> -->
                            <td colspan="4" style="height:50px;display: flex;flex-direction:column;justify-content:center;">
                                <div style="display: flex;flex-direction:row;justify-content:flex-start;">
                                    <div style="height:50px;display: flex;flex-direction:column;justify-content:center;">目标客户:</div>
                                    <div style="height:50px;display: flex;flex-direction:column;justify-content:center;padding-bottom: 10px">
                                        <c:SLDSDynamicLookup SLDSResourceName="{!$Resource.SLDS}" ObjectApiName="Account" DisplayFieldApiNames="Name" DisplayFieldsPattern="Name"  LabelName="Name" SetValueToField="{!ambc.AccountField__c}" setStyleCss="width:300px;"/>
                                    </div>
                                </div>
                            </td>
                        </tr>
                       
                        <tr  >
force-app/main/default/pages/AssetModifyBelongs.page-meta.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>36.0</apiVersion>
    <apiVersion>40.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>AssetModifyBelongs</label>
force-app/main/default/pages/CheckAllOlympusAsset.page
@@ -60,7 +60,7 @@
            height:50px;
            width:90%;
        }
        table.list .col_Internal_asset_location__c {width:130px;}
        table.list .col_Internal_asset_location__c {width:100px;}
        table.list .col_Salesdepartment__c {width:110px;}
        table.list .col_SalesProvince__c {width:70px;}
        table.list .col_Asset_loaner_category__c {width:80px;}
@@ -68,14 +68,14 @@
        table.list .col_CompanyOfEquipment__c {width:60px;}
        table.list .col_Asset_name__c {width:60px;}
        table.list .col_Internal_Asset_number__c {width:80px;}
        table.list .col_Internal_Asset_number_key__c {width:80px;}
        table.list .col_Internal_Asset_number_key__c {width:100px;}
        table.list .col_SerialNumber {width:60px;}  /*机身编号*/
        table.list .col_SerialNumber {width:40px;}  /*机身编号*/
        table.list .col_Product_Serial_No__c {width:60px;}  /*产品 + 机体编码*/
        table.list .col_Product_category__c {width:60px;}
        table.list .col_Equipment_Type__c {width:120px;}
        table.list .col_Equipment_Type__c {width:70px;}/* 备品分类zyh*/
        table.list .col_Consumable_Guaranteen_end__c {width:70px;}
        table.list .col_Manage_type__c {width:80px;}  /*管理种类*/
        table.list .col_Manage_type__c {width:60px;}  /*管理种类*/
        table.list .col_Loaner_accsessary__c {width:50px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:50px;}
        table.list .col_AssetManageConfirm__c {width:50px;}
@@ -92,6 +92,7 @@
        table.list .col_Repairing_Count__c {width:30px;}
        table.list .col_Fixture_Status__c {width:30px;}
        table.list .col_Main_OneToOne__c {width:40px;}
        table.list .col_Status {width:40px;}
        .navigationBarBlock {
            width: 100%;
@@ -135,7 +136,7 @@
            width: 9%;
        }
        .inputTextStyle input {
            width: 90%;
            width: 95%;
        }
        .inputTextStyle select {
            width: 95%;
@@ -152,6 +153,11 @@
        #pageBlockButton1 {
            margin: 0pxt;
        }
        /*20230815 ljh start*/
        table.mytable tr{
            height:45px;
        }
        /*20230815 ljh end*/
    </style>
    <script type="text/javascript">
        // 改变table尺寸
@@ -220,21 +226,21 @@
        }
        var globalQueryCondition;
        var fromQuickBarFlag = 'false';
        // function checkAssetJs(queryCondition) {
        //     fromQuickBarFlag = 'true';
        //     globalQueryCondition = queryCondition;
        //     var changeFlg = checkChangeFlg();
        //     if (changeFlg == '1') {
        //         blockme();
        //         checkAssetFunc(queryCondition, fromQuickBarFlag);
        //     } else if (changeFlg == '3') {
        //         blockme();
        //         checkAssetFunc(queryCondition, fromQuickBarFlag);
        //         globalQueryCondition = '';
        //     }
        //     fromQuickBarFlag = 'false';
        //     return false;
        // }
        function checkAssetJs(queryCondition) {
            fromQuickBarFlag = 'true';
            globalQueryCondition = queryCondition;
            var changeFlg = checkChangeFlg();
            if (changeFlg == '1') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
            } else if (changeFlg == '3') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
                globalQueryCondition = '';
            }
            fromQuickBarFlag = 'false';
            return false;
        }
        // 检索按钮
        function searchBtnJs() {
@@ -359,6 +365,12 @@
            window.open('{!$Page.InventoryResultRecord}');
        }
        // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start
        function gotoInventoryTemperatureHumidity() {
            window.open('{!$Page.InventoryTemperatureHumidity}');
        }
        // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start
        function gotoInventoryReport() {
            window.open('{!$Page.InventoryReport}');
        }
@@ -445,60 +457,42 @@
            <apex:actionFunction name="clearAllSearchConditionWhenCancel" action="{!clearAllSearchConditionWhenCancel}"></apex:actionFunction>
            <!-- 左侧按钮区 -->
            <!-- chenjingwu 2023.8.2 start-->
            <!-- <apex:outputPanel layout="block" style="width: 13%; float: left;">
            <apex:outputPanel layout="block" style="width: 16%; float: left;">
                <apex:pageBlock mode="maindetail">
                    <table style='height: 220px'>
                    <table style='height: 370px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle "><apex:commandButton style="background-color: silver;" value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看借出分配数" rendered="{!!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <apex:outputText rendered="{!angecylookrole}">  -->
                            <!-- 1650-->
                        <!-- <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag && angecylookrole}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr> -->
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <!-- OLY_OCM-818 -->
                        <!-- <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag && angecylookrole}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag && angecylookrole}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag && angecylookrole}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        </apex:outputText> -->
                        <!-- OLY_OCM-818 -->
                        <!-- <tr>
                            <td class="checkButtonStyle">
                                <apex:commandButton value="盘点结果记录" onclick="checkChangeFlg(); gotoInventoryResultRecord(); return false;" />
                            </td>
                        </tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
             <!--  【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start -->
                        <tr>
                            <td class="checkButtonStyle">
                                <apex:commandButton value="备品盘点报告" onclick="checkChangeFlg(); gotoInventoryReport(); return false;" />
                                <apex:commandButton value="温湿度盘点" rendered="{!angecylookrole}" onclick="checkChangeFlg(); gotoInventoryTemperatureHumidity(); return false;" />
                            </td>
                        </tr>
                        <tr>
                            <td class="checkButtonStyle">
                                <apex:commandButton value="耗材盘点报告" rendered="{!angecylookrole}" onclick="checkChangeFlg(); gotoConsumInventoryReport(); return false;" />
                            </td>
                        </tr>
                        <tr>
                            <td class="checkButtonStyle">
                                <apex:commandButton value="数据维护" rendered="{!angecylookrole}" onclick="checkChangeFlg(); gotoAssetMaintain(); return false;" />
                            </td>
                        </tr>
                        <!--  【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End -->
                    </table>
                </apex:pageBlock>
            </apex:outputPanel> -->
            <!-- chenjingwu 2023.8.2 end-->
            </apex:outputPanel>
            <!-- 右侧检索区 -->
            <apex:outputPanel layout="block" style="width: 90%;margin: 0 auto;">
            <apex:outputPanel layout="block" style="width: 83%; float: right;">
                <apex:pageBlock mode="maindetail">
                    <table style='width: 95%; height: 220px'>
                    <table style='width: 100%; height: 370px'>
                        <tr>
                            <td class="labelStyle">备品存放地</td>
                            <td class="inputTextStyle">
@@ -597,10 +591,30 @@
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="searchButtonStyle" colspan="2">
                                <apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="导出数据" disabled="{!onlyReadFlag}" onclick="checkCsvExport(); return false;" />
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.asset_loaner_category}" id="assetLoanerCategory" size="1">
                                    <apex:selectOptions value="{!assetLoanerCategoryOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">到期时间</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.daysToExpired}" id="daysToExpired" size="1">
                                    <apex:selectOptions value="{!daysToExpiredOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td colspan="2">
                                <apex:commandButton style="width: 28%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 28%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 36%" value="导出数据" disabled="{!onlyReadFlag}" onclick="checkCsvExport(); return false;" />
                            </td>
                            <apex:actionFunction name="csvExprot" action="{!csvExprot}" />
                            <script type="text/javascript">
@@ -621,38 +635,6 @@
                                }
                            </script>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.asset_loaner_category}" id="assetLoanerCategory" size="1">
                                    <apex:selectOptions value="{!assetLoanerCategoryOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">到期时间</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.daysToExpired}" id="daysToExpired" size="1">
                                    <apex:selectOptions value="{!daysToExpiredOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <!-- chenjingwu 2023.8.2 start-->
                            <td class="labelStyle">设备状态</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!assertQueryCondition}" id="assertQueryCondition" size="1">
                                    <apex:selectOptions value="{!assertQueryConditionOpts}"/>
                                </apex:selectList>
                            </td>
                            <!-- chenjingwu 2023.8.2 end-->
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
                            <td class="searchButtonStyle">
                                <apex:commandButton style="width: 100%;float:right" value="数据维护​" onclick="gotoAssetMaintain(); return false;" rerender="allForm" />
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel>
@@ -667,11 +649,11 @@
            <apex:inputHidden id="clearApplyFlagId" />
            <table>
                <tr>
                    <td style="width: 2%"></td>
                    <td class="labelSettingStyle">备品存放地</td>
                    <td class="blankStyle"></td>
                    <!-- <td style="width: 2%"></td> -->
                    <td class="">备品存放地</td>
                    <td width="10px"></td>
                    <td class="inputTextStyle">
                        <apex:selectList value="{!internalAssetLocationSet}" id="stockId" size="1" rendered="{!beipincunfangdiEditableFlag}">
                        <apex:selectList value="{!internalAssetLocationSet}" id="stockId" size="1" rendered="{!beipincunfangdiEditableFlag}" style="margin-left: 3px;">
                            <apex:selectOptions value="{!internalAssetDataLocationOptionList}"/>
                        </apex:selectList>
                        <apex:inputText disabled="true" rendered="{!!beipincunfangdiEditableFlag}" />
@@ -694,7 +676,7 @@
                    <td><apex:inputText id="otherSelectionId" rendered="{!angecylookrole}"/>
                    <apex:inputText disabled="true" rendered="{!!angecylookrole}" /></td>
                    <td class="setButtonStyle">
                    <td class="setButtonStyle" style="padding-right: 10px;">
                        <apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!onlyReadFlag}" />
                        <script type="text/javascript">
                            // 适用按钮
@@ -865,7 +847,7 @@
                        <apex:param name="applyMsgType" value="" />
                    </apex:actionFunction>
                    <td class="setButtonStyle"><apex:commandButton action="{!saveBtn}" value="保存" onclick="blockme();" rerender="allForm" oncomplete="unblockUI(); checkSavingJs();" disabled="{!onlyReadFlag}" /></td>
                    <td class="setButtonStyle" style="padding-right: 10px;"><apex:commandButton action="{!saveBtn}" value="保存" onclick="blockme();" rerender="allForm" oncomplete="unblockUI(); checkSavingJs();" disabled="{!onlyReadFlag}" /></td>
                    <!-- 批量更新 -->
                    <td class="setButtonStyle"><apex:commandButton value="批量更新" onclick="openPopup(); return false;" oncomplete="refresh" disabled="{!onlyReadFlag}" /></td>
                    <td style="width: auto"></td>
@@ -913,25 +895,26 @@
                <apex:outputPanel id="popupBox" layout="block">
                    <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                    <center>
                        <input type="hidden" id="other_hidden"/>
                        <apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                        <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                    </center>
                </apex:outputPanel>
            </apex:outputPanel>
            <table>
            <table style="width: 100%">
                <tr>
                    <td style="width: 5%"></td>
                    <td>显示未选中数据数量</td>
                    <td class="blankStyle"></td>
                    <td class="inputTextStyle">
                        <apex:selectList value="{!selRecordOption}" size="1" onchange="searchBtnJs(); return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList>
                    <!-- <td style="width: 5%"></td> -->
                    <td width="70px">显示未选中数据数量</td>
                    <!-- <td class="blankStyle"></td> -->
                    <td class="inputTextStyle" style="padding-left: 35px;">
                        <apex:selectList value="{!selRecordOption}" size="1" style="margin-top: 10px;margin-left: 5px;" onchange="searchBtnJs(); return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList>
                    </td>
                    <td width="45px"></td>
                    <td align="right">共检索出 {!totalSoqlRecordNum + totalFixDataNum} 条数据</td>
                    <td width="45px"></td>
                    <td id="checkedNumId" align="right">本页已选中 {!totalFixDataNum} 条数据</td>
                    <td width="45px"></td>
                    <td id="uncheckedNumId" align="right"> 本页未选中 {!totalUnfixDataNum} 条数据</td>
                    <td width="30px"></td>
                    <td align="right" style="width: 130px">共检索出 {!totalSoqlRecordNum + totalFixDataNum} 条数据</td>
                    <td width="30px"></td>
                    <td id="checkedNumId" align="right"  style="width: 180px">本页已选中 {!totalFixDataNum} 条数据</td>
                    <td width="10px"></td>
                    <td id="uncheckedNumId" align="right" style="width: 153px"> 本页未选中 {!totalUnfixDataNum} 条数据</td>
                    <script>
                        j$(function() {
                            // 统计打勾数量
@@ -948,29 +931,30 @@
                        });
                    </script>
                    <td width="45px"></td>
                    <td align="right">第 {!currPage} 页</td>
                    <td align="right" style="width:41px">第 {!currPage} 页</td>
                    <td width="45px"></td>
                    <td align="right">共 {!totalPage} 页</td>
                    <td width="45px"></td>
                    <td align="right" style="width:55px">共 {!totalPage} 页</td>
                    <td width="60px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="下一页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="尾页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td class="blankStyle"></td>
                </tr>
            </table>
        </apex:pageBlock>
@@ -980,7 +964,7 @@
            <input type="hidden" id="count_hidden" value="{!allAssetDataListSize}"/>
            <!-- 查看全部保有设备 -->
            <div id="out_Div_L" style="overflow:auto">
                <table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 80px; width: 600px;">
                <table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 40px; width: 600px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <!-- 全选 -->
                        <td style="width:20px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
@@ -995,7 +979,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: 80px;">
                <table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:2660px; height: 40px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!rightLabelList}" var="t">
@@ -1064,13 +1048,13 @@
                }
            </script>
            <div id="in_Div_R" style="overflow:auto;">
                <table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:660px;" id="tableData_R">
                <table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:2660px;" id="tableData_R">
                    <apex:variable value="{!0}" var="Cnt_R" />
                    <apex:repeat id="dataline_R" value="{!allAssetInfoList}" var="eachAssetData">
                        <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" >
                            <apex:variable value="{!0}" var="cnt2" />
                            <apex:repeat id="eachdata_R" value="{!rightApiList}" var="eachRightApi">
                                <td class="col_{!columnRightCssList[cnt2]} dataCellBorder1 {!eachRightApi[0]}" style="word-wrap:break-word">
                                <td class="col_{!columnRightCssList[cnt2]} dataCellBorder1 {!eachRightApi[0]}" style="word-wrap:break-word;min-width: 100px">
                                    <!-- r -->
                                    <apex:outputPanel rendered="{!(eachRightApi.size>1 || columnRightRWMap[eachRightApi[0]]=='r')}" layout="none">
                                        <apex:outputPanel rendered="{!eachRightApi.size == 1}" layout="none">
force-app/main/default/pages/CheckAllOlympusAssetNew.page
New file
@@ -0,0 +1,1088 @@
<apex:page controller="CheckAllOlympusAssetController" title="检索保有设备" showHeader="true" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" docType="html-5.0" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style>
        .dateFormat  {
            display: none;
        }
        .requiredBlock  {
            display: none;
        }
        .message {
            margin: 0px;
            /*width: 1125px;*/
        }
        table {
            table-layout: fixed;
            border-collapse: collapse;
        }
        a {
            text-decoration: none;
        }
        /*TODO width margin-left 这里调节宽度*/
        div#out_Div_L {
            position: relative;
            overflow: hidden;
            width: 1300px;
        }
        div#out_Div_R {
            position: relative;
            overflow: hidden;
            width: 1200px;
            margin-left: 686px;
        }
        div#in_Div_L {
            position: relative;
            width: 745px;
            height: 451px;
        }
        div#in_Div_R {
            position: relative;
            overflow: auto;
            height: 451px;
            margin-left: 686px;
            margin-top: -451px;
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
        }
        /* 默认 */
        table.list td {width:100px;}
        table.list td select {width:95%;}
        table.list td input {width:95%;}
        table.list td textarea {
            height:50px;
            width:90%;
        }
        table.list .col_Internal_asset_location__c {width:100px;}
        table.list .col_Salesdepartment__c {width:110px;}
        table.list .col_SalesProvince__c {width:70px;}
        table.list .col_Asset_loaner_category__c {width:80px;}
        table.list .col_Fixture_Model_No_F__c {width:80px;}
        table.list .col_CompanyOfEquipment__c {width:60px;}
        table.list .col_Asset_name__c {width:60px;}
        table.list .col_Internal_Asset_number__c {width:80px;}
        table.list .col_Internal_Asset_number_key__c {width:100px;}
        table.list .col_SerialNumber {width:40px;}  /*机身编号*/
        table.list .col_Product_Serial_No__c {width:60px;}  /*产品 + 机体编码*/
        table.list .col_Product_category__c {width:60px;}
        table.list .col_Equipment_Type__c {width:70px;}/* 备品分类zyh*/
        table.list .col_Consumable_Guaranteen_end__c {width:70px;}
        table.list .col_Manage_type__c {width:60px;}  /*管理种类*/
        table.list .col_Loaner_accsessary__c {width:50px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:50px;}
        table.list .col_AssetManageConfirm__c {width:50px;}
        table.list .col_Fixture_QRCode__c {width:50px;}
        table.list .col_WH_location__c {width:30px;}
        table.list .col_Quantity {width:30px;}
        table.list .col_You_Xiao_Ku_Cun__c {width:30px;}
        table.list .col_Ji_Zhong_Guan_Li_Ku_Cun__c {width:30px;}
        table.list .col_Out_of_wh__c {width:30px;}
        table.list .col_Rental_Count__c {width:30px;}
        table.list .col_Frozen_Quantity__c {width:30px;}
        table.list .col_Abandoned_RealThing__c {width:30px;}
        table.list .col_Abandoned_Inventory__c {width:40px;}
        table.list .col_Repairing_Count__c {width:30px;}
        table.list .col_Fixture_Status__c {width:30px;}
        table.list .col_Main_OneToOne__c {width:40px;}
        table.list .col_Status {width:40px;}
        .navigationBarBlock {
            width: 100%;
        }
        .apexp .bPageBlock.apexDefaultPageBlock .pbBody {
            margin: 0px;
        }
        .checkButtonStyle input {
            width: 100%;
            text-align: left;
        }
        .searchButtonStyle {
            width: 50%;
        }
        .searchButtonStyle input {
            width: 80%;
            background: #9BC2E6;
        }
        .setButtonStyle {
            width: 8%;
        }
        .setButtonStyle input {
            width: 100%;
            background: #9BC2E6;
        }
        .startInventoryButtonStyle {
            width: 12%;
        }
        .labelSettingStyle {
            width: 8%;
            text-align: right;
        }
        .labelStyle {
            width: 8%;
            text-align: left;
        }
        .blankStyle {
            width: 1%;
        }
        .inputTextStyle {
            width: 9%;
        }
        .inputTextStyle input {
            width: 95%;
        }
        .inputTextStyle select {
            width: 95%;
        }
        .redStyle {
            background-color: #F00;
        }
        .greyStyle {
            background-color: #AAA;
        }
        .blueStyle input {
            background: #9BC2E6;
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        /*20230815 ljh start*/
        table.mytable tr{
            height:45px;
        }
        /*20230815 ljh end*/
    </style>
    <script type="text/javascript">
        // 改变table尺寸
        var heightAjustment = 120;
        var widthAjustment = 30;
        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();
            R_width = j$(escapeVfId('allPage:allForm:dataBlock')).width();
            blockWidth = 490;
            j$(escapeVfId('allPage:allForm:dataBlock')).css('height', blockHeight + 150 + 'px');
            j$('div#in_Div_L').css('width', blockWidth + 220 + 'px');
            j$('div#out_Div_L').css('width', blockWidth + 220 + 'px');  // 调整out_Div_L宽度
            j$('div#in_Div_L').css('height', blockHeight + 'px');
            // **************************************************************
            j$('div#in_Div_R').css('width', R_width - blockWidth - 220 + 'px');
            j$('div#out_Div_R').css('width', R_width - blockWidth - 220  + 'px');
            j$('div#in_Div_R').css('height', blockHeight + 20 + 'px');
            var titleHeight_L = j$('div#out_Div_L').height();
            var titleHeight_R = j$('div#out_Div_R').height();
            if (titleHeight_L >= titleHeight_R) {
                j$('div#out_Div_R').css('height', (titleHeight_L) + 'px');
                j$('div#out_Div_R').css('margin-top', (-titleHeight_L) + 'px');
                j$('table#table_out_Div_R').css('height', (titleHeight_L) + 'px');
            } else {
                j$('div#out_Div_L').css('height', titleHeight_R+'px');
            }
            j$('div#in_Div_R').css('margin-top', (-j$('div#in_Div_L').height()) + 'px');
            var number = j$('table#tableData_L').find('tr').length;
            if (number>0) {
                for (var i = 0 ; i < number ;i++) {
                    if (j$('tr#tableData_R_'+i).height() > j$('tr#tableData_L_'+i).height()){
                        j$('tr#tableData_L_'+i).css('height', j$('tr#tableData_R_'+i).height());
                    } else {
                        j$('tr#tableData_R_'+i).css('height', j$('tr#tableData_L_'+i).height());
                    }
                }
            }
            if (j$('table#tableData_R').height() > j$('div#in_Div_R').height()) {
                j$('div#in_Div_R').css('width', (R_width-blockWidth-220 + sbwidth) + 'px');
            } else {
                j$('div#out_Div_R').css('width', (R_width-blockWidth-240 + sbwidth) + 'px');
                j$('div#in_Div_R').css('width', (R_width-blockWidth-240 + sbwidth) + 'px');
            }
        }
        // 全选功能
        function selectAllJs() {
            j$(escapeVfId('checker')).prop('disabled', true);
            var productCount = j$('input#count_hidden').val();
            if (j$(escapeVfId('checker')).attr('checked') == 'checked') {
                for (var i = 0; i < productCount; i++) {
                    var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('disabled');
                    if (disabled == false) {
                        j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', true);
                    }
                }
            } else {
                for (var i = 0; i < productCount; i++) {
                    var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('disabled');
                    if (disabled == false) {
                        j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
                    }
                }
            }
            j$(escapeVfId('checker')).prop('disabled', false);
        }
        var globalQueryCondition;
        var fromQuickBarFlag = 'false';
        function checkAssetJs(queryCondition) {
            fromQuickBarFlag = 'true';
            globalQueryCondition = queryCondition;
            var changeFlg = checkChangeFlg();
            if (changeFlg == '1') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
            } else if (changeFlg == '3') {
                blockme();
                checkAssetFunc(queryCondition, fromQuickBarFlag);
                globalQueryCondition = '';
            }
            fromQuickBarFlag = 'false';
            return false;
        }
        // 检索按钮
        function searchBtnJs() {
            var changeFlg = checkChangeFlg();
            if (changeFlg == '1') {
                blockme();
                checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
            } else if (changeFlg == '3') {
                blockme();
                checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
            }
        }
        function checkAssetFuncJs() {
            checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
            globalQueryCondition = '';
        }
        // 取消时数据存在变更检测
        function checkChangeFlagWhenCancel() {
            var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
            if (changeFlag == 1) {
                if (window.confirm('画面上的数据有变化,要取消所做的变更吗?\n点击 [确定] 取消所有变更\n点击 [取消] 返回之前的结果。')) {
                    document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
                    return '1';
                } else {
                    return '2';
                }
            }
            return '3';
        }
        // 取消按钮
        function cancelBtnJs() {
            var changeFlg = checkChangeFlagWhenCancel();
            // 点击取消并确定时
            if (changeFlg == '1') {
                blockme();
                clearAllCheckedJs();  // apex:actionFunction
                j$(escapeVfId('checker')).prop('disabled', true);
                var productCount = j$('input#count_hidden').val();
                for (var i = 0; i < productCount; i++) {
                    var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('checked');
                    if (disabled == true) {
                        j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
                    }
                }
                j$(escapeVfId('checker')).prop('disabled', false);
                j$(escapeVfId('allPage:allForm:pageBlockButton1:stockId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:applyEquipmentTypeId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:applyAssetTypeListId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:otherSelectionId')).val('');
                clearAllSearchConditionWhenCancel();  // 取消确定后清空检索条件   // apex:actionFunction
            } else if (changeFlg == '3') {
                blockme();
                clearAllCheckedJs();
                j$(escapeVfId('checker')).prop('disabled', true);
                var productCount = j$('input#count_hidden').val();
                for (var i = 0; i < productCount; i++) {
                    var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('checked');
                    if (disabled == true) {
                        j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
                    }
                }
                j$(escapeVfId('checker')).prop('disabled', false);
                j$(escapeVfId('allPage:allForm:pageBlockButton1:stockId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:applyEquipmentTypeId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:applyAssetTypeListId')).val('');
                j$(escapeVfId('allPage:allForm:pageBlockButton1:otherSelectionId')).val('');
                clearAllSearchConditionWhenCancel();  // 取消确定后清空检索条件
            }
        }
        // 当用户点击检索等按钮时检查setChangeFlg,若为true则alert
        function setChangeFlg() {
            document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 1;
        }
        var dataSortKey;
        function saveAndSort(dataColumn) {
            dataSortKey = dataColumn;
            if (checkChangeFlg2() == '3') {
                sortTableJs(dataSortKey);
                dataSortKey = '';
            }
            return false;
        }
        function checkChangeFlg() {
            var currentPageRecordCount = j$('input#count_hidden').val();
            var allCheckedFalse = false;
            for (var i = 0; i < currentPageRecordCount; i++) {
                var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
                if (checkBox.prop('checked') == true) {
                    allCheckedFalse = true;
                }
            }
            var onlyReadFlag = j$(escapeVfId('onlyReadFlagId')).val();
            var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
            if (changeFlag == 1 && onlyReadFlag == 'false' && allCheckedFalse) {
                if (window.confirm('画面上的数据有变化,要保存所做的变更吗?\n点击 [确定] 保存打钩项数据并检索\n点击 [取消] 返回之前的结果。')) {
                    saveBeforeSearch();
                    document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
                    setSaveSuccessMsg();  // 保存完了
                    return '1';
                } else {
                    return '2';
                }
            } else if (changeFlag == 1 && onlyReadFlag == 'true' && allCheckedFalse) {
                if (window.confirm('备品存放地选项与您的权限不符,您不具有保存权限。\n画面上的数据有变化,要继续操作吗?\n点击 [确定] 继续操作\n点击 [取消] 返回之前的结果。')) {
                    document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
                    return '3';
                } else {
                    return '2';
                }
            }
            return '3';
        }
        function gotoInventoryResultRecord() {
            window.open('{!$Page.InventoryResultRecord}');
        }
        function gotoInventoryReport() {
            window.open('{!$Page.InventoryReport}');
        }
        function gotoConsumInventoryReport() {
            window.open('{!$Page.InventoryReport}?isConsum=true');
        }
        function gotoAssetMaintain() {
            window.open('{!$Page.AssetMaintain}');
        }
        function checkChangeFlg2() {
            var currentPageRecordCount = j$('input#count_hidden').val();
            var allCheckedFalse = false;
            for (var i = 0; i < currentPageRecordCount; i++) {
                var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
                if (checkBox.prop('checked') == true) {
                    allCheckedFalse = true;
                }
            }
            var onlyReadFlag = j$(escapeVfId('onlyReadFlagId')).val();
            var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
            if (changeFlag == 1 && onlyReadFlag == 'false' && allCheckedFalse) {
                if (window.confirm('画面上的数据有变化,要保存所做的变更吗?\n点击 [确定] 保存打钩项数据并检索\n点击 [取消] 返回之前的结果。')) {
                    saveBeforeSearch2();
                    document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
                    setSaveSuccessMsg();
                    return '1';
                } else {
                    return '2';
                }
            } else if (changeFlag == 1 && onlyReadFlag == 'true' && allCheckedFalse) {
                if (window.confirm('备品存放地选项与您的权限不符,您不具有保存权限。\n画面上的数据有变化,要继续操作吗?\n点击 [确定] 继续操作\n点击 [取消] 返回之前的结果。')) {
                    document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
                    return '3';
                } else {
                    return '2';
                }
            }
            return '3';
        }
        function sorTableJs2() {
            if (dataSortKey != '' && dataSortKey != null) {
                sortTableJs(dataSortKey);
                dataSortKey = '';
            }
            return false;
        }
        // 排序适用
        function sortTableJs(key) {
            blockme();
            sortTablefunc(key);
            return false;
        }
        // function checkExcessFlag() {
        //     var excess2000Flag = j$(escapeVfId('excess2000FlagId')).val();
            // if (excess2000Flag == 'true') {
            //     alert('检索数据已超过2000条,无法显fromQuickBarFlag示超过2000条的部分,请追加检索条件。');
            // }
        // }
        window.onresize = windowResize;
    </script>
    <apex:form id="allForm">
        <!-- 判断检索数量上限2000 -->
        <input type="hidden" id="excess2000FlagId" value="{!excess2000Flag}"/>
        <input type="hidden" id="isSavingSuccessId" value="{!isSavingSuccess}"/>
        <input type="hidden" id="onlyReadFlagId" value="{!onlyReadFlag}"/>
        <input type="hidden" id="internalAssetLocationUser" value="{!internalAssetLocationLogin}" />
        <apex:pageBlock id="edit">
            <!-- 保存成功 -->
            <apex:actionFunction name="setSaveSuccessMsg" action="{!setSaveSuccessMsg}" />
            <!-- 查看保有设备 -->
            <apex:actionFunction name="checkAssetFunc" action="{!checkAssetBtn}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag();">
                <apex:param name="assertCondition" value="" />
                <apex:param name="fromQuickBarFlag" value="" />
            </apex:actionFunction>
            <!-- 取消按钮 -->
            <apex:actionFunction name="clearAllCheckedJs" action="{!clearAllCheckedBtn}" rerender="allForm" onComplete="unblockUI();" />
            <!-- 检索按钮 -->
            <apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag();"></apex:actionFunction>
            <!-- 取消是清空检索区 -->
            <apex:actionFunction name="clearAllSearchConditionWhenCancel" action="{!clearAllSearchConditionWhenCancel}"></apex:actionFunction>
            <!-- 左侧按钮区 -->
            <!-- chenjingwu 2023.8.2 start-->
            <apex:outputPanel layout="block" style="width: 16%; float: left;">
                <apex:pageBlock mode="maindetail">
                    <table style='height: 370px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle "><apex:commandButton style="background-color: silver;" value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看借出分配数" rendered="{!!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <!-- OLY_OCM-818 -->
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton style="background-color: silver;" value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel>
            <!-- 右侧检索区 -->
            <apex:outputPanel layout="block" style="width: 83%; float: right;">
                <apex:pageBlock mode="maindetail">
                    <table style='width: 100%; height: 370px'>
                        <tr>
                            <td class="labelStyle">备品存放地</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.internal_asset_location}" id="stockStorageId" size="1">
                                    <apex:selectOptions value="{!internalAssetLocationOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品配套明细型号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.fixture_Model_No}" id="fixtureModelNoId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">货架号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.wh_location}" id="shelfNumId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品状态</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品管理编码</td>  <!-- シリアル番号 -->
                            <td class="inputTextStyle">
                                <apex:inputText value="{!searchB.equipmentSet_Managment_Code}" id="stockManagementCodeId" rendered="{!equipmentSetManagmentCodeEditableFlag}" />
                                <apex:inputText value="{!searchB.equipmentSet_Managment_Code}" id="stockManagementCodeId2" rendered="{!!equipmentSetManagmentCodeEditableFlag}" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">固定资产号</td>
                            <td class="inputTextStyle">
                                <apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId" rendered="{!internalAssetNumberEditableFlag}" />
                                <apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId2" rendered="{!!internalAssetNumberEditableFlag}" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">分公司号</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.companyOfEquipment}" id="companyOfEquipment" size="1">
                                    <apex:selectOptions value="{!companyOfEquipmentOpts}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">主体/附属品</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.bodyOrAccessory}" id="bodyOrAccessoryId" size="1">
                                    <apex:selectOptions value="{!bodyOrAccessoryOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">产品分类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.product_category}" id="product_category" size="1">
                                    <apex:selectOptions value="{!product_categoryOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品分类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.equipment_Type}" id="equipment_Type" size="1">
                                    <apex:selectOptions value="{!equipment_TypeOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
                                    <apex:selectOptions value="{!manage_typeOpts}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">所在地区(本部)</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.salesdepartment}" id="salesdepartment" size="1">
                                    <apex:selectOptions value="{!salesdepartmentOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">所在地区(省)</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.salesProvince}" id="salesProvince" size="1">
                                    <apex:selectOptions value="{!salesProvinceopts}"/>
                                </apex:selectList>
                            </td>
                            <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)" />
                            </td>
                            <td class="blankStyle"></td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.asset_loaner_category}" id="assetLoanerCategory" size="1">
                                    <apex:selectOptions value="{!assetLoanerCategoryOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">到期时间</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.daysToExpired}" id="daysToExpired" size="1">
                                    <apex:selectOptions value="{!daysToExpiredOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td colspan="2">
                                <apex:commandButton style="width: 28%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 28%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 36%" value="导出数据" disabled="{!onlyReadFlag}" onclick="checkCsvExport(); return false;" />
                            </td>
                            <apex:actionFunction name="csvExprot" action="{!csvExprot}" />
                            <script type="text/javascript">
                                function checkCsvExport() {
                                    var currentPageRecordCount = j$('input#count_hidden').val();
                                    var isCheckSaveFlag = false;
                                    for (var i = 0; i < currentPageRecordCount; i++) {
                                        var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
                                        if (checkBox.prop('checked') == true) {
                                            isCheckSaveFlag = true;
                                        }
                                    }
                                    if (!isCheckSaveFlag) {
                                        alert("未选择任何数据,无法导出。");
                                    } else {
                                        csvExprot();
                                    }
                                }
                            </script>
                        </tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel>
        </apex:pageBlock>
        <!-- 设置区 -->
        <apex:pageBlock id="pageBlockButton1">
            <apex:actionFunction name="applyButton" action="{!applyBtn}" rerender="allForm" onComplete="unblockUI();" />
            <apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag(); return false;">
            <!-- <apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allForm" onComplete="unblockUI(); return false;"> -->
                <apex:param name="sortKey" value="" />
            </apex:actionFunction>
            <apex:inputHidden id="clearApplyFlagId" />
            <table>
                <tr>
                    <!-- <td style="width: 2%"></td> -->
                    <td class="">备品存放地</td>
                    <td width="10px"></td>
                    <td class="inputTextStyle">
                        <apex:selectList value="{!internalAssetLocationSet}" id="stockId" size="1" rendered="{!beipincunfangdiEditableFlag}" style="margin-left: 3px;">
                            <apex:selectOptions value="{!internalAssetDataLocationOptionList}"/>
                        </apex:selectList>
                        <apex:inputText disabled="true" rendered="{!!beipincunfangdiEditableFlag}" />
                    </td>
                    <td class="labelSettingStyle">备品分类</td>
                    <td class="blankStyle"></td>
                    <td class="inputTextStyle">
                        <apex:inputField value="{!assetSetting.Equipment_Type__c}" id="applyEquipmentTypeId" rendered="{!beipinfenleiEditableFlag}" />
                        <apex:inputText disabled="true" rendered="{!!beipinfenleiEditableFlag}" />
                    </td>
                    <td class="labelSettingStyle">其他选项</td>
                    <td class="blankStyle"></td>
                    <td class="inputTextStyle">
                        <apex:selectList value="{!appliedSelectOption}" id="applyAssetTypeListId" size="1" rendered="{!angecylookrole}">
                            <apex:selectOptions value="{!appliedSelectOptionList}"/>
                        </apex:selectList>
                         <apex:selectList disabled="true" rendered="{!!angecylookrole}">
                        </apex:selectList>
                    </td>
                    <td><apex:inputText id="otherSelectionId" rendered="{!angecylookrole}"/>
                    <apex:inputText disabled="true" rendered="{!!angecylookrole}" /></td>
                    <td class="setButtonStyle" style="padding-right: 10px;">
                        <apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!onlyReadFlag}" />
                        <script type="text/javascript">
                            // 适用按钮
                            function applyJs() {
                                var appliedFlag = true;
                                var selectFlag = true;
                                var isCheckFlag = false;
                                var internalAssetLocation = j$(escapeVfId('{!$Component.stockId}')).val();  // 备品存放地
                                var productCategory = j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val();  // 备品分类
                                var otherSelectOptionValue = j$(escapeVfId('{!$Component.otherSelectionId}')).val();  // 其他选项值
                                otherSelectOptionValue = j$.trim(otherSelectOptionValue);
                                var otherSelectOptionValues = [];
                                var otherSelectOptionApi = j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val();  // 其他选项的api
                                var otherSelectOptionText = j$(escapeVfId('{!$Component.applyAssetTypeListId}')).find("option:selected").text();  // 其他选项的text
                                if (otherSelectOptionApi != "") {
                                    j$("td." + "col_" + otherSelectOptionApi + ".dataCellBorder1." + otherSelectOptionApi).each(function() {
                                        otherSelectOptionValues.push(j$(this));
                                    });
                                }
                                var internalAssetLocations = [];  // 备品存放地
                                j$("td.col_Internal_asset_location__c.dataCellBorder1.Internal_asset_location__c").each(function() {
                                    internalAssetLocations.push(j$(this));
                                });
                                var equipmentTypes = [];  // 备品分类
                                j$("td.col_Equipment_Type__c.dataCellBorder1.Equipment_Type__c").each(function() {
                                    equipmentTypes.push(j$(this));
                                });
                                var currentPageRecordCount = j$('input#count_hidden').val();
                                for (var i = 0; i < currentPageRecordCount; i++) {
                                    var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
                                    if (checkBox.prop('checked') == true) {
                                        isCheckFlag = true;
                                        // if (internalAssetLocations[i].find("select").val() != internalAssetLocation && internalAssetLocation != '') {
                                        if (internalAssetLocation != '' && typeof(internalAssetLocation) != "undefined") {
                                            setChangeFlg();
                                            internalAssetLocations[i].find("select").val(internalAssetLocation);
                                            appliedFlag = false;
                                        }
                                        // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
                                        if (productCategory != '' && typeof(productCategory) != "undefined") {
                                            setChangeFlg();
                                            equipmentTypes[i].find("select").val(productCategory);
                                            appliedFlag = false;
                                        }
                                        if (otherSelectOptionApi != '' && otherSelectOptionValue != '') {
                                            if (typeof(otherSelectOptionValues[i].find("input").val()) != "undefined") {
                                                if (otherSelectOptionValues[i].find("input").attr("type") == "text") {
                                                    // if (otherSelectOptionValues[i].find("input").val() != otherSelectOptionValue) {
                                                    setChangeFlg();
                                                    otherSelectOptionValues[i].find("input").val(otherSelectOptionValue);
                                                    appliedFlag = false;
                                                    // }
                                                } else if (otherSelectOptionValues[i].find("input").attr("type") == "checkbox") {
                                                    if (otherSelectOptionValue == "true") {
                                                        setChangeFlg();
                                                        otherSelectOptionValues[i].find("input").attr("checked", true);
                                                        appliedFlag = false;
                                                    } else if (otherSelectOptionValue == "false") {
                                                        setChangeFlg();
                                                        otherSelectOptionValues[i].find("input").attr("checked", false);
                                                        appliedFlag = false;
                                                    }
                                                }
                                            } else if (typeof(otherSelectOptionValues[i].find("select").val()) != "undefined") {
                                                selectFlag = false;
                                                var oldOtherSelectOptionValues = otherSelectOptionValues[i].find("select").val();
                                                setChangeFlg();
                                                var tempvalue = otherSelectOptionValues[i].find("select").val();
                                                otherSelectOptionValues[i].find("select").val(otherSelectOptionValue);
                                                if (otherSelectOptionValues[i].find("select").val() == "") {  // 若选项值无效,则为空
                                                    otherSelectOptionValues[i].find("select").val(tempvalue);
                                                    appliedFlag = true;
                                                } else {
                                                    appliedFlag = false;
                                                }
                                            }
                                        }
                                    }
                                }
                                j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
                                // var clearApplyFlag = false;
                                window.setTimeout(function () {
                                    if (internalAssetLocation == '' && productCategory== '' && (otherSelectOptionText == '' || otherSelectOptionValue == '')) {  // 适用入力框全为空
                                        // alert('适用区输入框为空,请输入适用值。');
                                        var applyMsg = '适用区输入框为空,请输入适用值。';
                                        passApplyMsgToController(applyMsg, 'Fail');
                                        return;
                                    }
                                    if (isCheckFlag == false) {
                                        // alert('未勾选任何待适用数据。');
                                        var applyMsg = '未勾选任何待适用数据。';
                                        passApplyMsgToController(applyMsg, 'Fail');
                                        return;
                                    }
                                    if (selectFlag) {
                                        if (!appliedFlag) {
                                            var alertMsg = "适用完了 \r\n";
                                            if (internalAssetLocation != '' && typeof(internalAssetLocation) != "undefined") {
                                                var alertMsg1 = "已将打勾数据中的 " + "备品存放地" + " 适用为 " + internalAssetLocation + " \r\n";
                                                alertMsg += alertMsg1;
                                            }
                                            if (productCategory != '' && typeof(productCategory) != "undefined") {
                                                var alertMsg2 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + productCategory + " \r\n";
                                                alertMsg += alertMsg2;
                                            }
                                            if (otherSelectOptionText != '' && otherSelectOptionValue != '') {
                                                var alertMsg3 = "已将打勾数据中的 " + otherSelectOptionText + " 适用为 " + otherSelectOptionValue + " \r\n";
                                                alertMsg += alertMsg3;
                                            }
                                            // alert(alertMsg);
                                            // clearApplyFlag = true;
                                            j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                                            passApplyMsgToController(alertMsg, 'Success');
                                        }
                                    } else {
                                        if (!appliedFlag) {
                                            var alertMsg = "适用完了, ";
                                            if (internalAssetLocation != '') {
                                                var alertMsg1 = "已将打勾数据中的 " + "备品存放地" + " 适用为 " + internalAssetLocation + "。 ";
                                                alertMsg += alertMsg1;
                                            }
                                            if (productCategory != '') {
                                                var alertMsg2 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + productCategory + "。 ";
                                                alertMsg += alertMsg2;
                                            }
                                            if (otherSelectOptionText != '' && otherSelectOptionValue != '') {
                                                var alertMsg3 = "已将打勾数据中的 " + otherSelectOptionText + " 适用为 " + otherSelectOptionValue + "。";
                                                alertMsg += alertMsg3;
                                            }
                                            passApplyMsgToController(alertMsg, 'Success');
                                            j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                                        } else {
                                            var alertMsg = "其他选项: " + otherSelectOptionText +"中无此选项值" + otherSelectOptionValue + ",无法更新。";
                                            passApplyMsgToController(alertMsg, 'Fail');
                                        }
                                    }
                                }, 5);
                            }
                            function clearApplyValue() {
                                var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
                                if(clearApplyValueFlag) {
                                    j$(escapeVfId('{!$Component.stockId}')).val('');
                                    j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
                                    j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
                                    j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
                                }
                                j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
                            }
                            function checkSavingJs() {
                                var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
                                // alert(isSavingSuccess);
                                if (isSavingSuccess != 'false') {
                                    setSaveSuccessMsg();
                                }
                            }
                        </script>
                    </td>
                    <apex:actionFunction name="saveBeforeSearch" action="{!saveBtn}" rerender="allForm" oncomplete="unblockUI(); checkAssetFuncJs();" />
                    <apex:actionFunction name="saveBeforeSearch2" action="{!saveBtn}" rerender="allForm" oncomplete="unblockUI(); sorTableJs2(); return false" rendered="false" />
                    <apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}" oncomplete="clearApplyValue(); return false;" rerender="allForm">
                        <apex:param name="applyMsg" value="" />
                        <apex:param name="applyMsgType" value="" />
                    </apex:actionFunction>
                    <td class="setButtonStyle" style="padding-right: 10px;"><apex:commandButton action="{!saveBtn}" value="保存" onclick="blockme();" rerender="allForm" oncomplete="unblockUI(); checkSavingJs();" disabled="{!onlyReadFlag}" /></td>
                    <!-- 批量更新 -->
                    <td class="setButtonStyle"><apex:commandButton value="批量更新" onclick="openPopup(); return false;" oncomplete="refresh" disabled="{!onlyReadFlag}" /></td>
                    <td style="width: auto"></td>
                    <script type="text/javascript">
                        var popupBox;
                        var filename = "";
                        var blobfile = "";
                        popupBox = new SimpleDialog("CSVImportDialogId", false);  // 不可拖动
                        popupBox.createDialog();
                        function openPopup() {
                            popupBox.setTitle("导入CSV文件");
                            popupBox.importContentNode(document.getElementById("{!$Component.popupBox}"));
                            // popupBox.importContentNode(document.getElementById("popupBox"));
                            popupBox.show(document.getElementById("{!$Component.popupBox}"));
                        }
                        function remoteLocationPost() {
                            var fbody = document.getElementById("file_input").files[0];
                            if (typeof fbody === "undefined") {
                                alert("请选择CSV文件");
                                return;
                            } else {
                                var reader = new FileReader();
                                reader.readAsText(fbody);
                                reader.onload = function(val) {
                                    // 判断CSV文件BOM,若包含BOM,则删除。
                                    if (this.result.charCodeAt(0) === 0xFEFF) {  // 如果第一个字符的编码为utf8
                                        this.result = this.result.substr(1);  // 在utf-8编码中,三个隐藏的字节 0xEF 0xBB 0xBF被视为一个字符 EFBBBF(UTF8) FEFF(unicode) 65279
                                    }
                                    //this.result = this.result.substr(0, 3);
                                    passToController(this.result);
                                }
                                popupBox.hide();
                            }
                        }
                    </script>
                    <apex:actionFunction name="passToController" action="{!importCSVFile}" rerender="allForm">
                        <apex:param name="csvData" value="" />
                    </apex:actionFunction>
                </tr>
            </table>
            <apex:outputPanel style="display:none">
                <apex:outputPanel id="popupBox" layout="block">
                    <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                    <center>
                        <input type="hidden" id="other_hidden"/>
                        <apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                        <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                    </center>
                </apex:outputPanel>
            </apex:outputPanel>
            <table style="width: 100%">
                <tr>
                    <!-- <td style="width: 5%"></td> -->
                    <td width="70px">显示未选中数据数量</td>
                    <!-- <td class="blankStyle"></td> -->
                    <td class="inputTextStyle" style="padding-left: 35px;">
                        <apex:selectList value="{!selRecordOption}" size="1" style="margin-top: 10px;margin-left: 5px;" onchange="searchBtnJs(); return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList>
                    </td>
                    <td width="30px"></td>
                    <td align="right" style="width: 130px">共检索出 {!totalSoqlRecordNum + totalFixDataNum} 条数据</td>
                    <td width="30px"></td>
                    <td id="checkedNumId" align="right"  style="width: 180px">本页已选中 {!totalFixDataNum} 条数据</td>
                    <td width="10px"></td>
                    <td id="uncheckedNumId" align="right" style="width: 153px"> 本页未选中 {!totalUnfixDataNum} 条数据</td>
                    <script>
                        j$(function() {
                            // 统计打勾数量
                            var totalCheckedNum = 0;
                            var productCount = j$('input#count_hidden').val();
                            for (var i = 0; i < productCount; i++) {
                                if (j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked')) {
                                    totalCheckedNum ++;
                                }
                            }
                            j$('#checkedNumId').text('其中打勾固定数据的数量为 ' + totalCheckedNum);
                            var totalUncheckedNum = productCount - totalCheckedNum;
                            j$('#uncheckedNumId').text('未打勾数据的数量为 ' + totalUncheckedNum);
                        });
                    </script>
                    <td width="45px"></td>
                    <td align="right" style="width:41px">第 {!currPage} 页</td>
                    <td width="45px"></td>
                    <td align="right" style="width:55px">共 {!totalPage} 页</td>
                    <td width="60px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="下一页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="10px"></td>
                    <td align="right" width="45px">
                        <apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="尾页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td class="blankStyle"></td>
                </tr>
            </table>
        </apex:pageBlock>
        <apex:pageMessages id="msg"  />
        <apex:pageBlock id="dataBlock" mode="maindetail">
            <!-- 检索出的数据数量 -->
            <input type="hidden" id="count_hidden" value="{!allAssetDataListSize}"/>
            <!-- 查看全部保有设备 -->
            <div id="out_Div_L" style="overflow:auto">
                <table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 40px; width: 600px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <!-- 全选 -->
                        <td style="width:20px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!leftLabelList}" var="t">
                            <td class="col_{!columnLeftCssList[cnt]}" style="word-wrap:break-word">
                                <a href="javascript:void()" onclick="saveAndSort('{!cnt + 1}'); return false;" style="text-decoration: underline;"><apex:outputText value="{!t}" /> {!sortOrderList[cnt + 1]}</a>
                            </td>
                            <apex:variable value="{!cnt + 1}" var="cnt" />
                        </apex:repeat>
                    </tr>
                </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:2660px; height: 40px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!rightLabelList}" var="t">
                            <td class="col_{!columnRightCssList[cnt]}" style="word-wrap:break-word">
                                <apex:variable value="{!leftLabelSize + cnt}" var="cnt_order" />
                                <a href="javascript:void()" onclick="saveAndSort('{!cnt_order + 1}'); return false;" style="text-decoration: underline;"><apex:outputText value="{!t}" /> {!sortOrderList[cnt_order + 1]}</a>
                            </td>
                            <apex:variable value="{!cnt + 1}" var="cnt" />
                        </apex:repeat>
                    </tr>
                </table>
            </div>
            <div id="in_Div_L" style="overflow:hidden">
                <table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:600px;" id="tableData_L">
                    <apex:variable value="{!0}" var="Cnt_L" />
                    <apex:repeat id="dataline_L" value="{!allAssetInfoList}" var="eachAssetData">
                        <tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                            <!-- 全选 -->
                            <td class="dataCellBorder1" style="width:20px" align="center">
                                <apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.assetQuertResult['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
                                <apex:inputHidden id="canChange" />
                            </td>
                            <apex:variable value="{!0}" var="cnt2" />
                            <apex:repeat id="eachdata_L" value="{!leftApiList}" var="eachLeftApi">
                                <td class="col_{!columnLeftCssList[cnt2]} dataCellBorder1 {!eachLeftApi[0]}" style="word-wrap:break-word">
                                    <!-- r -->
                                    <apex:outputPanel rendered="{!(eachLeftApi.size>1 || columnLeftRWMap[eachLeftApi[0]]=='r')}" layout="none">
                                        <!-- 若eachLeftApi为关联的,其api.spilt('.')后获得的list大于1 -->
                                        <apex:outputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" />
                                    </apex:outputPanel>
                                    <!-- w rw -->
                                    <apex:outputPanel rendered="{!(eachLeftApi.size==1 && (columnLeftRWMap[eachLeftApi[0]]=='w' || columnLeftRWMap[eachLeftApi[0]]=='wm'))}" layout="none">
                                        <apex:outputPanel id="internal_asset_location_id2" rendered="{!eachLeftApi[0]=='Internal_asset_location__c'}" layout="none">
                                            <apex:selectList value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" id="stockStorageId2" size="1" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_L}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" style="width:90%">
                                                <apex:selectOptions value="{!internalAssetDataLocationOptionList}"/>
                                            </apex:selectList>
                                        </apex:outputPanel>
                                        <apex:outputPanel rendered="{!eachLeftApi[0]<>'Internal_asset_location__c'}" layout="none">
                                            <apex:inputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_L}' + ':rowCheck')).attr('checked')) {setChangeFlg();}"  rendered="{!angecylookrole}"/>
                                            <!--20210702 you 1650 办事处只读权限 -->
                                            <apex:outputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" html-disabled="true" rendered="{!!angecylookrole}"/>
                                        </apex:outputPanel>
                                    </apex:outputPanel>
                                </td>
                                <apex:variable value="{!cnt2+1}" var="cnt2" />
                            </apex:repeat>
                        </tr>
                        <apex:variable value="{!Cnt_L+1}" var="Cnt_L" />
                    </apex:repeat>
                </table>
            </div>
            <script>
                // 统计打勾数量
                function checkboxOnclick() {
                    var totalCheckedNum = 0;
                    var productCount = j$('input#count_hidden').val();
                    for (var i = 0; i < productCount; i++) {
                        if (j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked')) {
                            totalCheckedNum ++;
                        }
                    }
                    j$('#checkedNumId').text('其中打勾固定数据数量为 ' + totalCheckedNum);
                    var totalUncheckedNum = productCount - totalCheckedNum;
                    j$('#uncheckedNumId').text('未打勾数据的数量为 ' + totalUncheckedNum);
                }
            </script>
            <div id="in_Div_R" style="overflow:auto;">
                <table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:2660px;" id="tableData_R">
                    <apex:variable value="{!0}" var="Cnt_R" />
                    <apex:repeat id="dataline_R" value="{!allAssetInfoList}" var="eachAssetData">
                        <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" >
                            <apex:variable value="{!0}" var="cnt2" />
                            <apex:repeat id="eachdata_R" value="{!rightApiList}" var="eachRightApi">
                                <td class="col_{!columnRightCssList[cnt2]} dataCellBorder1 {!eachRightApi[0]}" style="word-wrap:break-word;min-width: 100px">
                                    <!-- r -->
                                    <apex:outputPanel rendered="{!(eachRightApi.size>1 || columnRightRWMap[eachRightApi[0]]=='r')}" layout="none">
                                        <apex:outputPanel rendered="{!eachRightApi.size == 1}" layout="none">
                                            <apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
                                        </apex:outputPanel>
                                        <apex:outputPanel rendered="{!eachRightApi.size > 1}" layout="none">
                                            <apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
                                        </apex:outputPanel>
                                    </apex:outputPanel>
                                    <!-- w rw -->
                                    <apex:outputPanel rendered="{!(eachRightApi.size==1 && (columnRightRWMap[eachRightApi[0]]=='w' || columnRightRWMap[eachRightApi[0]]=='wm'))}" layout="none">
                                        <apex:outputPanel rendered="{!eachRightApi[0]=='Equipment_Type__c'}" layout="none">
                                            <apex:inputField id="equipment_Type__c_id2" value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_R}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" style="width:90%" />
                                        </apex:outputPanel>
                                        <apex:outputPanel rendered="{!eachRightApi[0]<>'Equipment_Type__c'}" layout="none">
                                            <apex:outputPanel rendered="{!eachRightApi.size == 1}" layout="none">
                                                <apex:inputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_R}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" rendered="{!angecylookrole}"/>
                                                <!--20210702 you 1650 办事处只读权限 -->
                                            <apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" html-disabled="true" rendered="{!!angecylookrole}"/>
                                            </apex:outputPanel>
                                            <apex:outputPanel rendered="{!eachRightApi.size > 1}" layout="none">
                                                <apex:outputText value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
                                            </apex:outputPanel>
                                        </apex:outputPanel>
                                    </apex:outputPanel>
                                </td>
                                <apex:variable value="{!cnt2+1}" var="cnt2" />
                            </apex:repeat>
                        </tr>
                        <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
                    </apex:repeat>
                </table>
            </div>
            <apex:inputHidden value="{!changeFlg}" id="changeFlg"/>
            <script>
                j$('div#in_Div_R').scroll(function() {
                    j$('div#out_Div_R').scrollLeft(j$(this).scrollLeft());
                });
                j$('div#in_Div_R').scroll(function() {
                    j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
                });
                windowResize();
            </script>
        </apex:pageBlock>
    </apex:form>
</apex:page>
force-app/main/default/pages/CheckAllOlympusAssetNew.page-meta.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>CheckAllOlympusAssetNew</label>
</ApexPage>
force-app/main/default/pages/DiscountProductApplication.page
@@ -5,6 +5,45 @@
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<style>
    /*信息提示颜色*/
body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
    background-color: #08107b !important;;
    color: #FFF !important;
}
body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
    background-color: #08107b !important;
}
body .message, .slds-vf-scope .message{
    background-color: #08107b !important;
}
body .errorM2 h4,body .errorM3 h4,body .errorM4 h4,.slds-vf-scope .errorM2 h4,.slds-vf-scope .errorM3 h4,.slds-vf-scope .errorM4 h4 {
    /* color: rgb(255, 255, 255)!important */
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .warningM2,body .warningM3,body .warningM4,.slds-vf-scope .warningM2,.slds-vf-scope .warningM3,.slds-vf-scope .warningM4 {
    background-color: rgb(254, 147, 57)!important;
    color: rgb(24, 24, 24)!important
}
body .confirmM2,body .confirmM3,body .confirmM4,.slds-vf-scope .confirmM2,.slds-vf-scope .confirmM3,.slds-vf-scope .confirmM4 {
    background-color: rgb(46, 132, 74)!important
}
body .pbButton{
    text-align: left;
}
.message .messageText{
    color: #FFF !important;
}
</style>
    <script>
function setFocusOnLoad() {}
function bodyOnLoad(){setFocusOnLoad();}
force-app/main/default/pages/InventoryIframe.page
@@ -1,4 +1,4 @@
<apex:page lightningStylesheets="true">
<apex:page lightningStylesheets="true" title="盘点相关">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
@@ -7,44 +7,79 @@
            flex: 2;
            padding: 20px;
        }
        .highlight {
        background-color: yellow;
        /* 添加任何其他突出显示样式 */
    }
    .you-button {
            background-color: #d9d8d8 !important;
            box-shadow: 0px 7px 2px 0px #aeacac !important;
            transition: all .5s !important;
            }
            /* .you-button:hover {
                background-color: #fcdc5e !important;
            } */
        .you-button:active {
            transform: translate(0,4px) !important;
            text-shadow: -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0) !important;
            box-shadow: 0px 1px 0px 0px #aeacac !important;
        }
    </style>
<apex:form >
    <apex:actionFunction action="{!loadPage}" name="cancel" rerender="allForm" oncomplete="unblockUI();"/>
    <div class="vf-container">
        <div style="width:9%;float:left;">
            <div>
                <apex:commandButton style="width: 99%" value="盘点" onclick="loadPage('/apex/InventoryResultRecord'); return false"/>
                <apex:commandButton styleClass="my-button you-button" style="width: 99%" value="盘点" onclick="loadPage('/apex/InventoryResultRecord'); return false"/>
            </div>
            <div>
                <apex:commandButton style="width: 99%" value="备品盘点报告" onclick="loadPage('/apex/InventoryReport'); return false"/>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="备品盘点报告" onclick="loadPage('/apex/InventoryReport'); return false"/>
            </div>
            <div>
                <apex:commandButton style="width: 99%" value="耗材盘点报告" onclick="loadPage('/apex/InventoryReport?isConsum=true'); return false"/>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="耗材盘点报告" onclick="loadPage('/apex/InventoryReport?isConsum=true'); return false"/>
            </div>
            <div>
                <apex:commandButton style="width: 99%" value="盘点表头" onclick="location.href = '/a3H/o'; return false"/>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="盘点表头" onclick="location.href = '/a3H/o'; return false"/>
            </div>
        </div>
        <div style="width:91%;float:right;" id="vf-content">
        <!-- <div style="width:90%;float:right;margin-left:5px;" id="vf-content"> -->
            <!-- VF 页面内容将在此处显示 -->
        </div>
        <!-- </div> -->
        <iframe src="/apex/InventoryResultRecord" id="iframepage" width="90%" style="margin-left:3px;" scrolling="auto" onload="changeFrameHeight()" frameborder="0"></iframe>
    </div>
</apex:form>
    
    <script>
        function loadPage(pageUrl) {
            var vfContent = "<iframe src='" + pageUrl + "' style='width: 100%; height: 1000px; border: none;'></iframe>";
            document.getElementById("vf-content").innerHTML = vfContent;
        function changeFrameHeight(){
            var ifm= document.getElementById("iframepage");
            ifm.height=document.documentElement.clientHeight-30;
        }
        window.addEventListener('load', function () {
            blockme();
            var vfContent = "<iframe src='/apex/InventoryResultRecord' style='width: 100%; height: 1000px; border: none;'></iframe>";
            document.getElementById("vf-content").innerHTML = vfContent;
            unblockUI();
        });
        window.onresize=function(){
            changeFrameHeight();
        }
        function loadPage(pageUrl) {
            var buttons = document.getElementsByClassName("my-button");
            console.log(buttons);
            for (let i = 0; i < buttons.length; i++) {
                // buttons[i].style.backgroundColor = "white";
                buttons[i].classList.remove('you-button');
            }
            var clickedButton = event.target || event.srcElement; // 获取被点击的按钮
            // clickedButton.style.backgroundColor = "silver"; // 添加突出显示的背景颜色
            clickedButton.classList.add('you-button');
            // 添加其他突出显示样式
            document.getElementById("iframepage").src = pageUrl;
        }
    </script>
</apex:page>
force-app/main/default/pages/InventoryReport.page
@@ -1,7 +1,7 @@
<apex:page extensions="InventoryReportController" standardController="Inventory_Header__c" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab"  lightningStylesheets="true" applyHtmlTag="false">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <style>
        .dateFormat  {
@@ -116,12 +116,24 @@
            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 */
@@ -159,9 +171,9 @@
            border:1px;
            background-color:black;
        }
        .datePicker {
            width: 300px;
            height: 200px;
        body .datePicker {
            width: 250px;
        /*            height: 200px;*/
        }
        /****************** 页面底部审批流css调整 *******************/
        .bRelatedList .relatedProcessHistory .extraRow td.actionColumn .actionLink, .bRelatedList .relatedProcessHistory .extraRow td, .bRelatedList .relatedProcessHistory .extraRow th {
@@ -202,6 +214,14 @@
            width: 3px;
            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;
        }
    </style>
    <style type="text/css" media="print">
@@ -256,33 +276,54 @@
        }
        // 维修记录
        function weixiu_report() {
            window.open("{!$Label.Environment_Url}{!weixiuReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!weixiuReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!weixiuReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
        // 出借记录
        function chujie_report() {
            window.open("{!$Label.Environment_Url}{!chujieReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!chujieReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!chujieReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
        // 丢失记录
        function diushi_report() {
            window.open("{!$Label.Environment_Url}{!diushiReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!diushiReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!diushiReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }  
        <!--20210525 you 1650  start-->
        // 调拨出借记录
        function transfer_chujie_report() {
            window.open("{!$Label.Environment_Url}{!transferchujieReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!transferchujieReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!transferchujieReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
        // 调拨遗失记录
        function transfer_diushi_report() {
            window.open("{!$Label.Environment_Url}{!transferdiushiReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!transferdiushiReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!transferdiushiReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
        <!--20210525 you 1650  end-->
        // 耗材出借记录
        function consum_chujie_report() {
            window.open("{!$Label.Environment_Url}{!consumChujieReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!consumChujieReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!consumChujieReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
        // 耗材消耗记录
        function consum_xiaohao_report() {
            window.open("{!$Label.Environment_Url}{!consumXiaohaoReportId}?pv1={!ihId}");
            // 20230907 ljh start
            // window.open("{!$Label.Environment_Url}{!consumXiaohaoReportId}?pv1={!ihId}");
            window.open("{!$Label.Environment_Url}lightning/r/Report/{!consumXiaohaoReportId}/view?fv1={!ihId}");
            // 20230907 ljh end
        }
    </script>
@@ -339,7 +380,7 @@
                <hr class="line" />
                <table class="inventoryReportTable">
                    <tr>
                        <td class="labelStyle">盘点地点:</td>
                        <td class="labelStyle1">盘点地点:</td>
                        <td class="labelStyle">
                            <apex:outputText id="ivLocation" value="{!ihObj.Internal_asset_location__c}" />
                        </td>
@@ -351,10 +392,10 @@
                        </td>
                    </tr>
                    <tr>
                        <td class="labelStyle">盘点时间From:</td>
                        <td class="labelStyle1">盘点时间From:</td>
                        <td class="labelStyle">
                            <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">
@@ -363,7 +404,7 @@
                        </td>
                    </tr>
                    <tr>
                        <td class="labelStyle">盘点人员:</td>
                        <td class="labelStyle1">盘点人员:</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'}" />
@@ -373,7 +414,7 @@
                <hr class="line" />
                <table class="inventoryReportTable" width="100%" >
                    <tr>
                        <td class="tdStyle-left">盘点报告提交人:</td>
                        <td class="tdStyle-left1">盘点报告提交人:</td>
                        <td class="tdStyle-left">
                            <apex:inputField id="ivsubmitPIC" value="{!ihObj.InventorySubmit_PIC__c}"
                                required="{!DESC_RW1['InventorySubmit_PIC__c'] == 'wm'}" >
@@ -384,13 +425,13 @@
</script>
                            </apex:inputField>
                        </td>
                        <td class="tdStyle-right">职位:</td>
                        <td class="tdStyle-right1">职位:</td>
                        <td class="tdStyle-left">
                            <apex:outputText id="ivsubmitPICPost" value="{!ihObj.InventorySubmit_PIC__r.Post__c}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tdStyle-left">盘点报告确认人:</td>
                        <td class="tdStyle-left1">盘点报告确认人:</td>
                        <td class="tdStyle-left">
                            <apex:inputField id="ivcheckPIC" value="{!ihObj.InventoryCheck_PIC__c}"
                                required="{!DESC_RW1['InventoryCheck_PIC__c'] == 'wm'}" >
@@ -401,7 +442,7 @@
</script>
                            </apex:inputField>
                        </td>
                        <td class="tdStyle-right">职位:</td>
                        <td class="tdStyle-right1">职位:</td>
                        <td class="tdStyle-left">
                            <apex:outputText id="ivcheckPICPost" value="{!ihObj.InventoryCheck_PIC__r.Post__c}" />
                        </td>
force-app/main/default/pages/InventoryResultRecordNew.page
New file
@@ -0,0 +1,1879 @@
<apex:page controller="InventoryResultRecordController" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" lightningStylesheets="true" applyHtmlTag="false">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style>
        .dateFormat  {
            display: none;
        }
        .requiredBlock  {
            display: none;
        }
        .message {
            margin: 0px;
            /*width: 1125px;*/
        }
        table {
            table-layout: fixed;
            border-collapse: collapse;
        }
        a {
            text-decoration: none;
        }
        /*TODO width margin-left 这里调节宽度*/
        div#out_Div_L {
            position: relative;
            overflow: hidden;
            width: 1300px;
        }
        div#out_Div_R {
            position: relative;
            overflow: hidden;
            width: 1200px;
            margin-left: 686px;
        }
        div#in_Div_L {
            position: relative;
            width: 745px;
            height: 451px;
        }
        div#in_Div_R {
            position: relative;
            overflow: auto;
            height: 451px;
            margin-left: 686px;
            margin-top: -451px;
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
        }
        /* 默认 */
        table.list td {width:100px;}
        table.list td select {width:95%;}
        table.list td input {width:95%;}
        table.list td textarea {
            height:50px;
            width:90%;
        }
        table.list .col_Internal_asset_location__c {width:130px;}
        table.list .col_Salesdepartment__c {width:110px;}
        table.list .col_SalesProvince__c {width:70px;}
        table.list .col_Asset_loaner_category__c {width:80px;}
        table.list .col_Fixture_Model_No_F__c {width:80px;}
        table.list .col_CompanyOfEquipment__c {width:60px;}
        table.list .col_Asset_name__c {width:60px;}
        table.list .col_Internal_Asset_number__c {width:80px;}
        table.list .col_Internal_Asset_number_key__c {width:80px;}
        table.list .col_SerialNumber {width:60px;}  /*机身编号*/
        table.list .col_Product_Serial_No__c {width:60px;}  /*产品 + 机体编码*/
        table.list .col_Product_category__c {width:60px;}
        table.list .col_Equipment_Type__c {width:120px;}
        table.list .col_Consumable_Guaranteen_end__c {width:70px;}
        table.list .col_Manage_type__c {width:80px;}  /*管理种类*/
        table.list .col_Loaner_accsessary__c {width:50px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:50px;}
        table.list .col_AssetManageConfirm__c {width:50px;}
        table.list .col_Fixture_QRCode__c {width:50px;}
        table.list .col_WH_location__c {width:30px;}
        table.list .col_Quantity {width:30px;}
        table.list .col_You_Xiao_Ku_Cun__c {width:30px;}
        table.list .col_Ji_Zhong_Guan_Li_Ku_Cun__c {width:30px;}
        table.list .col_Out_of_wh__c {width:30px;}
        table.list .col_Rental_Count__c {width:30px;}
        table.list .col_Frozen_Quantity__c {width:30px;}
        table.list .col_Abandoned_RealThing__c {width:30px;}
        table.list .col_Abandoned_Inventory__c {width:40px;}
        table.list .col_Repairing_Count__c {width:30px;}
        table.list .col_Fixture_Status__c {width:30px;}
        table.list .col_Main_OneToOne__c {width:40px;}
        .navigationBarBlock {
            width: 100%;
        }
        .apexp .bPageBlock.apexDefaultPageBlock .pbBody {
            margin: 0px;
        }
        .checkButtonStyle input {
            width: 100%;
            text-align: left;
        }
        .searchButtonStyle {
            width: 50%;
        }
        .searchButtonStyle input {
            width: 80%;
            background: #9BC2E6;
        }
        .setButtonStyle {
            width: 8%;
        }
        .setButtonStyle input {
            width: 100%;
            background: #9BC2E6;
        }
        .startInventoryButtonStyle {
            width: 12%;
        }
        .labelSettingStyle {
            width: 8%;
            text-align: right;
        }
        .labelStyle {
            width: 8%;
            text-align: left;
        }
        .blankStyle {
            width: 1%;
        }
        .inputTextStyle {
            width: 9%;
        }
        .inputTextStyle input {
            width: 96%;
        }
        .inputTextStyle select {
            width: 95%;
        }
        .redStyle {
            background-color: #F00;
        }
        .greyStyle {
            background-color: #AAA;
        }
        .blueStyle input {
            background: #9BC2E6;
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            padding: 10px;
            width: 100%;
            min-height: 100%;
            z-index: 9;
            background: white;
        }
        .jconfirm-holder {
            float:left !important;
        }
        .overlay td {
            word-break: break-all;
        }
        .dateFormat  {
            display: none;
        }
        .requiredBlock  {
            display: none;
        }
        .displayRow {
            display: table-row;
        }
        .hiddenRow {
            display: none;
        }
        table {
            margin: 10px 0px;
            /*float: left;*/
            table-layout: fixed;
            border-collapse: collapse;
        }
        a {
            text-decoration: none;
        }
        .navigationBarBlock {
            width: 100%;
        }
        .apexp .bPageBlock.apexDefaultPageBlock .pbBody {
            margin: 0px;
        }
        .checkButtonStyle input {
            width: 100%;
            text-align: left;
        }
        .searchButtonStyle {
            width: 10%;
        }
        .searchButtonStyle input {
            width: 80%;
            background: #9BC2E6;
        }
        /*add by rentx 20210911 start */
        .searchButtonStyle1 {
            width: 50%;
        }
        .searchButtonStyle1 input{
            width: 80%;
            background: #9BC2E6;
        }
        .model00 {
            display:none;
            position: fixed; /* Stay in place */
            z-index: 20; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
        }
        /*add by rentx 20210911 end*/
        .setButtonStyle {
            width: 8%;
        }
        .setButtonStyle input {
            width: 100%;
            background-color: #9BC2E6;
        }
        .startInventoryButtonStyle {
            margin-left: 15%;
            width: 12%;
        }
        .labelStyle {
            width: 9%;
        }
        .blankStyle {
            width: 3%;
        }
        .inputTextStyle {
            width: 9%;
        }
        .inputTextStyle input {
            width: 96%;
        }
        .inputTextStyle select {
            width: 95%;
        }
        .redStyle {
            background-color: #F00;
        }
        .greyStyle {
            background-color: #AAA;
        }
        .blueStyle {
            background-color: #9BC2E6;
        }
        .inventoryResultsTable tr td:nth-child(1) {
            border: none;
        }
        .modal {
            display:none;
            position: fixed; /* Stay in place */
            z-index: 10; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }
        .modal2 {
            display:none;
            position: fixed; /* Stay in place */
            z-index: 20; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            /*background-color: rgb(0,0,0); /* Fallback color */*/
            /*background-color: rgba(0,0,0,0.1); /* Black w/ opacity */*/
        }
        .modal3 {
            display:none;
            position: fixed; /* Stay in place */
            z-index: 10; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
        }
        /* Modal Content/Box */
        .modal-content {
            background-color: #fefefe;
            margin: auto;
            margin-top: 100px;
            padding: 20px;
            border: 1px solid #888;
            width: 265px; /* Could be more or less, depending on screen size */
        }
        .modal-content2 {
            background-color: #fefefe;
            margin: auto;
            margin-top: 110px;
            padding: 10px;
            border: 1px solid #888;
            width: 265px; /* Could be more or less, depending on screen size */
        }
        .modal-content3 {
            background-color: #fefefe;
            margin: auto;
            margin-top: 110px;
            padding: 10px;
            border: 1px solid #888;
            width: 230px; /* Could be more or less, depending on screen size */
            font-size: 18px;
        }
        .close {
            color: #aaaaaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
        }
        .close:hover,
        .close:focus {
            color: #000;
            text-decoration: none;
            cursor: pointer;
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
        }
    </style>
    <script type="text/javascript">
        sforce.connection.sessionId = "{!$Api.Session_ID}";
        var JANCODEMap = {};
        function startjs(ele) {
            if (j$("select[name$='bieCunFangDi']").val() == 'All') {
                alert("请选择备品存放地");
                return;
            }
            blockme();
            j$(ele).prop("disabled", true);
            startInventory();
        }
        function savejs() {
            j$("#myModal3").show();
        }
        function changeFullScreen(full) {
            if (full) {
                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).addClass('overlay');
                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).show();
                j$('#descdiv').hide();
                j$('.inventoryResultsTable').hide();
            } else {
                if (hasChange == false) {
                    j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                    j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide();
                    j$('.inventoryResultsTable').show();
                    j$('#descdiv').show();
                } else {
                    j$.confirm({
                        title: '确认',
                        content: "确认要返回检索画面吗?未保存的数据可能会丢失",
                        boxWidth: '80%',
                        useBootstrap: false,
                        buttons: {
                            OK: function () {
                                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide();
                                j$('.inventoryResultsTable').show();
                                j$('#descdiv').show();
                            },
                            cancel: {
                                text: '取消', // With spaces and symbols
                            }
                        }
                    });
                }
            }
            hasChange = false;
        }
        // 检索按钮
        function searchBtnJs() {
            blockme();
            searchBtnFunc();
        }
        function hasChangeFunc() {
            hasChange = true;
        }
        function refreshJs(ele) {
            refresh(j$(ele).val());
        }
        function lostGeTi(ele) {
            j$(ele).prev().prev().prop("disabled", false);
            hasChange = true;
        }
    </script>
    <div id="myModal1" class="modal">
      <!-- Modal content -->
      <div class="modal-content">
        <span class="close" onclick="stopScan()">&times;</span>
        <p>扫描中</p>
            <p>Code:<input type="text" id="qrcode"/></p>
            <p id="salesdepartment_select" style="display: none">所在地区(本部):<select></select><button onclick="checkQRCode_new(j$('input#qrcode')[0].value, 1)">确定</button></p>
        <video playsinline="true" id="preview" style="width: 100%;z-index: 20;transform: scaleX(-1);margin-top: 10px;"></video>
        扫码履历:
        <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
        </ul>
      </div>
    </div>
    <div id="myModal2" class="modal2">
      <!-- Modal content -->
      <div class="modal-content2">
        <span class="close" onclick="stopScan2()">&times;</span>
        <p>扫描一对一附属品</p>
        <apex:outputPanel layout="block" id="repeat_panel" >
        <ul>
            <apex:repeat value="{!accsessaryNameList}" var="accsessary" id="accsessaryRow">
                <li style="margin-left: -1.5em">{!accsessary}</li>
            </apex:repeat>
        </ul>
        </apex:outputPanel>
      </div>
    </div>
    <!-- //add by rentx 20210907 start -->
    <div id="myModal0" class="model00">
      <div class="modal-content">
         <span class="close" onclick="stopScan00()">&times;</span>
            <p id="salesdepartment_select1" style="display: none">所在地区(本部):<select></select><button onclick="getCodeAndDMethod()">确定</button></p>
      </div>
    </div>
    <!-- //add by rentx 20210907 end -->
    <apex:form id="allForm">
        <apex:inputHidden value="{!doneFlg}" id="doneFlg"/>
        <div id="myModal3" class="modal3">
          <!-- Modal content -->
          <div class="modal-content3">
            <p>请输入盘点人</p>
            <span>盘点人1: </span>
            <apex:selectList value="{!inventoryUser1}" size="1" id="inventoryUser1">
                <apex:selectOptions value="{!InventoryUserOps}"/>
            </apex:selectList>
            <br/>
            <br/>
            <span>盘点人2: </span>
            <apex:selectList value="{!inventoryUser2}" size="1" id="inventoryUser2">
                <apex:selectOptions value="{!InventoryUserOps}"/>
            </apex:selectList>
            <br/>
            <br/>
            <span>盘点人3: </span>
            <apex:selectList value="{!inventoryUser3}" size="1" id="inventoryUser3">
                <apex:selectOptions value="{!InventoryUserOps}"/>
            </apex:selectList>
            <br/>
            <br/>
            <apex:commandButton action="{!save}" value="确定" reRender="allForm" onclick="blockme()" oncomplete="unblockUI();j$('#myModal3').hide();changeFullScreen(true);if(j$(escapeVfId('allPage:allForm:doneFlg')).val()=='true') alert('保存完了')"/>
            <apex:commandButton style="margin-left: 60px;" value="取消" onclick="j$('#myModal3').hide();return false;"/>
          </div>
        </div>
        <apex:actionFunction name="startInventory" action="{!startInventory}" rerender="allForm" onComplete="unblockUI()" />
        <!-- update by rentx 20210827 start 耗材盘点方案 -->
        <!-- <apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI();changeFullScreen(true);" /> -->
        <apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI();changeFullScreen(true);addHistory();" />
        <!-- update by rentx 20210827 end 耗材盘点方案 -->
        <!-- <apex:actionFunction name="checkQRCode" action="{!checkQRCode}" rerender="qrType,qrError,qrId,repeat_panel" onComplete="checkQRDone()" >
            <apex:param name="qrcode" value="" />
            <apex:param name="scanType" value="" />
        </apex:actionFunction> -->
        <apex:actionFunction name="refresh" action="{!init}" rerender="allForm" >
            <apex:param name="cunFangDi" value="" />
        </apex:actionFunction>
        <!-- <apex:inputHidden value="{!qrType}" id="qrType" />
        <apex:inputHidden value="{!qrError}" id="qrError" />
        <apex:inputHidden value="{!qrId}" id="qrId" /> -->
        <apex:pageBlock id="searchBlock">
            <!-- <apex:outputPanel layout="block" style="width: 13%; float: left;">
                <apex:pageBlock mode="maindetail">
                    <table style='width:140px; height: 220px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=all'; return false"/></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看在库的保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=consumable'; return false" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看出借中保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=lending'; return false" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=repairing'; return false" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=scrapping'; return false" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" onclick="location.href='/apex/CheckAllOlympusAsset?searchType=scrapped'; return false" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton style="background: #9BC2E6;" value="盘点结果记录" action="{!URLFOR($Page.InventoryResultRecord)}" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="盘点报告" action="{!URLFOR($Page.InventoryReport)}" /></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel> -->
            <!-- <apex:outputPanel layout="block" style="width: 14%; float: left;">
                <apex:pageBlock mode="maindetail">
                    <table style='width:140px;height: 120px'>
                        <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>
                        <tr><td></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel> -->
            <!-- 右侧检索区 -->
            <apex:outputPanel layout="block">
                <apex:pageBlock mode="maindetail" id="maindetailId">
                    <table style='height: 120px'>
                        <tr>
                            <td class="labelStyle">备品存放地</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!bieCunFangDi}" size="1" id="bieCunFangDi" onchange="refreshJs(this); return false;">
                                    <apex:selectOptions value="{!bieCunFangDiOps}"/>
                                </apex:selectList></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">货架号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!whLocation}" id="shelfNumId" rendered="{!angecylookrole}"/>
                            <apex:inputText disabled="true" rendered="{!!angecylookrole}" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">货区</td>
                            <td class="inputTextStyle"><apex:inputField value="{!id_dummy.VWH_Location__c}" id="vshelfNumId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品配套明细型号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!fixtureModelNo}" id="fixtureModelNoId" /></td>
                            <td class="blankStyle"></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="10">
                                <input class="startInventoryButtonStyle blueStyle" style="margin-left: 0" type="button" value="开始盘点" onclick="startjs(this);return false;" />
                            </td>
                        </tr>
                        <!-- <tr>
                            <td class="labelStyle">备品管理编码</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.SerialNumber}" id="stockManagementCodeId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">固定资产号</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.Internal_Asset_number__c}" id="loanerAssetOrNotLoanerAssetId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.SerialNumber}" id="serialNoOrBatchNoId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">分公司号</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!financeBranchNo}" id="financeBranchNoId" size="1">
                                    <apex:selectOptions value="{!financeBranchNoOptionList}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">主体/附属品</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!bodyOrAccessory}" id="bodyOrAccessoryId" size="1">
                                    <apex:selectOptions value="{!bodyOrAccessoryOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">产品分类</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.Product_category__c}" id="productCategoryId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品分类</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.Equipment_Type__c}" id="equipmentTypeId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle"><apex:inputField value="{!assetQuery.Manage_type__c}" id="manageTypeId" /></td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                    -->
                        <tr>
                            <td class="labelStyle">所在地区(本部)</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!salesdepartment}" id="salesDepartmentId" size="1">
                                    <apex:selectOptions value="{!salesdepartmentOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">所在地区(省)</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!salesProvince}" id="salesProvinceId" size="1">
                                    <apex:selectOptions value="{!salesProvinceOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                 <apex:inputText id="consumableGuaranteenEnd" value="{!consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumableGuaranteenEnd}', false)" />
                                 <div style="display:none;">
                                    <apex:inputField value="{!inventoryHeader.Inventory_Start_Date__c}" />
                                </div>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">盘点状态</td>
                            <td class="inputTextStyle">
                                <!-- <apex:inputText value="{!assetStatus}" id="stockStateId" /> -->
                                <apex:selectList value="{!assetStatus}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle" colspan="2">
                                <!-- <div style="display: table-cell; width: 80px">
                                    <apex:commandButton value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" rendered="{!canDoFlg}"/>
                                </div> -->
                            </td>
                        </tr>
                        <tr><td style="height: 23px;"></td></tr>
                        <tr>
                            <td class="labelStyle">盘亏/盘盈</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!inventory_Deviation}" id="Inventory_Deviation" size="1">
                                    <apex:selectOptions value="{!inventory_DeviationOps}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">是否固定资产</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!internal_Asset_Flg}" id="Internal_Asset_Flg" size="1">
                                    <apex:selectOptions value="{!internal_Asset_FlgOps}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle">
                            </td>
                            <td class="blankStyle"></td>
                            <!-- <td class="blankStyle"></td> -->
                            <td class="blankStyle">
                            </td>
                            <td class="searchButtonStyle" colspan="2">
                                <div style="display: table-cell; width: 80px">
                                    <apex:commandButton value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" rendered="{!canDoFlg}"/>
                                </div>
                            </td>
                        </tr>
                        <tr><td height="23px"></td></tr>
                        <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset,'','display: none;')}">
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!assetCategory}" id="assetCategory" size="1">
                                    <apex:selectOptions value="{!assetCategoryOptionList}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel>
        </apex:pageBlock>
        <apex:pageBlock id="recordBlock">
            <div style="padding: 5px;">
                备品盘点报告书编号:
                <apex:outputText value="{!inventoryHeader.Name}"/>&nbsp;
                盘点地点: <apex:outputText value="{!inventoryHeader.Internal_asset_location__c}"/>&nbsp;
                盘点开始日:
                <apex:outputtext value="{0, date, yyyy/MM/dd}">
                    <apex:param value="{!inventoryHeader.Inventory_Start_Date__c}"></apex:param>&nbsp;
                </apex:outputtext>
            </div>
            <div style="padding: 5px;{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset,'','display:none;')}">
                耗材盘点报告书编号:
                <apex:outputText value="{!consumInventoryHeader.Name}"/>&nbsp;
                盘点地点: <apex:outputText value="{!consumInventoryHeader.Internal_asset_location__c}"/>&nbsp;
                盘点开始日:
                <apex:outputtext value="{0, date, yyyy/MM/dd}">
                    <apex:param value="{!consumInventoryHeader.Inventory_Start_Date__c}"></apex:param>&nbsp;
                </apex:outputtext>
            </div>
            <!-- 盘点结果记录 -->
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <apex:outputPanel layout="block">
                <table class="inventoryResultsTable" border="1px" style="margin-right: 5%">
                    <tr>
                        <td class="labelStyle blueStyle">整体进展</td>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">在库(含待报废)</td>
                        <td class="labelStyle">维修中</td>
                        <td class="labelStyle">出借中</td>
                        <td class="labelStyle">调拨中</td><!--20210520 you 1650  -->
                        <td class="labelStyle">遗失</td>
                        <td class="labelStyle">合计</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">合计</td>
                        <td class="labelStyle" style="border: 0px">进展率:{!sumRateMap['processRate']}<apex:outputPanel rendered="{!sumRateMap['processRate'] != null}">%</apex:outputPanel></td>
                        <td class="labelStyle" colspan="4" style="border-left: 0px">实盘率:{!sumRateMap['inventoryRate']}<apex:outputPanel rendered="{!sumRateMap['inventoryRate'] != null}">%</apex:outputPanel></td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">应盘</td>
                        <td class="labelStyle">{!unfixAssetMap['stock']+fixAssetMap['stock']+consumAssetMap['stock']}(待报废{!unfixAssetMap['abandon']+fixAssetMap['abandon']+consumAssetMap['abandon']}件)</td>
                        <td class="labelStyle">{!unfixAssetMap['repair']+fixAssetMap['repair']+consumAssetMap['repair']}</td>
                        <td class="labelStyle">{!unfixAssetMap['lend']+fixAssetMap['lend']+consumAssetMap['lend']}</td>
                        <td class="labelStyle"><!--20210520 you 1650  -->{!unfixAssetMap['transfer']+fixAssetMap['transfer']+consumAssetMap['transfer']}</td>
                        <td class="labelStyle">{!unfixAssetMap['lost']+fixAssetMap['lost']}</td>
                        <td class="labelStyle">{!unfixAssetMap['all']+fixAssetMap['all']+consumAssetMap['all']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">实盘</td>
                        <td class="labelStyle">{!unfixAssetMap['inventory']+fixAssetMap['inventory']+consumAssetMap['inventory']}</td>
                        <td class="labelStyle">{!unfixAssetMap['repair']+fixAssetMap['repair']+consumAssetMap['repair']}</td>
                        <td class="labelStyle">{!unfixAssetMap['lend']+fixAssetMap['lend']+consumAssetMap['lend']}</td>
                        <td class="labelStyle">{!unfixAssetMap['transfer']+fixAssetMap['transfer']}</td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!unfixAssetMap['lost']+fixAssetMap['lost']}</td>
                        <td class="labelStyle">{!unfixAssetMap['inventory']+fixAssetMap['inventory']+consumAssetMap['inventory']+unfixAssetMap['repair']+fixAssetMap['repair']+unfixAssetMap['lend']+fixAssetMap['lend']+consumAssetMap['lend']+unfixAssetMap['lost']+fixAssetMap['lost']+consumAssetMap['lost']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">{!fixAssetMap['panying']+unfixAssetMap['panying']+consumAssetMap['panying']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!fixAssetMap['panying']+unfixAssetMap['panying']+consumAssetMap['panying']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘亏</td>
                        <td class="labelStyle">{!fixAssetMap['pankui']+unfixAssetMap['pankui']+consumAssetMap['pankui']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!fixAssetMap['pankui']+unfixAssetMap['pankui']+consumAssetMap['pankui']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">固定资产</td>
                        <td class="labelStyle" style="border: 0px">进展率:{!fixAssetMap['percent']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                        <td class="labelStyle" colspan="4" style="border-left: 0px">实盘率:{!fixAssetMap['percent2']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">应盘</td>
                        <td class="labelStyle">{!fixAssetMap['stock']}(待报废{!fixAssetMap['abandon']}件)</td>
                        <td class="labelStyle">{!fixAssetMap['repair']}</td>
                        <td class="labelStyle">{!fixAssetMap['lend']}</td>
                        <td class="labelStyle">{!fixAssetMap['transfer']}</td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!fixAssetMap['lost']}</td>
                        <td class="labelStyle">{!fixAssetMap['all']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">实盘</td>
                        <td class="labelStyle">{!fixAssetMap['inventory']}</td>
                        <td class="labelStyle">{!fixAssetMap['repair']}</td>
                        <td class="labelStyle">{!fixAssetMap['lend']}</td>
                        <td class="labelStyle">{!fixAssetMap['transfer']}</td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!fixAssetMap['lost']}</td>
                        <td class="labelStyle">{!fixAssetMap['inventory']+fixAssetMap['repair']+fixAssetMap['lend']+fixAssetMap['lost']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">{!fixAssetMap['panying']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!fixAssetMap['panying']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘亏</td>
                        <td class="labelStyle">{!fixAssetMap['pankui']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!fixAssetMap['pankui']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">非固定资产</td>
                        <td class="labelStyle" style="border: 0px">进展率:{!unfixAssetMap['percent']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                        <td class="labelStyle" colspan="4" style="border-left: 0px">实盘率:{!unfixAssetMap['percent2']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">应盘</td>
                        <td class="labelStyle">{!unfixAssetMap['stock']}(待报废{!unfixAssetMap['abandon']}件)</td>
                        <td class="labelStyle">{!unfixAssetMap['repair']}</td>
                        <td class="labelStyle">{!unfixAssetMap['lend']}</td>
                        <td class="labelStyle">{!unfixAssetMap['transfer']}</td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!unfixAssetMap['lost']}</td>
                        <td class="labelStyle">{!unfixAssetMap['all']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">实盘</td>
                        <td class="labelStyle">{!unfixAssetMap['inventory']}</td>
                        <td class="labelStyle">{!unfixAssetMap['repair']}</td>
                        <td class="labelStyle">{!unfixAssetMap['lend']}</td>
                        <td class="labelStyle">{!unfixAssetMap['transfer']}</td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!unfixAssetMap['lost']}</td>
                        <td class="labelStyle">{!unfixAssetMap['inventory']+unfixAssetMap['repair']+unfixAssetMap['lend']+unfixAssetMap['lost']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">{!unfixAssetMap['panying']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!unfixAssetMap['panying']}</td>
                    </tr>
                    <tr>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘亏</td>
                        <td class="labelStyle">{!unfixAssetMap['pankui']}</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">0</td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!unfixAssetMap['pankui']}</td>
                    </tr>
                    <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset, '','display:none;')}">
                        <td class="labelStyle"></td>
                        <td class="labelStyle">耗材</td>
                        <td class="labelStyle" style="border: 0px">进展率:{!consumAssetMap['percent']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                        <td class="labelStyle" colspan="2" style="border-left: 0px">实盘率:{!consumAssetMap['percent2']}<apex:outputPanel rendered="{!fixAssetMap['percent'] != null}">%</apex:outputPanel></td>
                        <td class="labelStyle" colspan="1"></td>
                        <td class="labelStyle" colspan="1">已消耗</td>
                        <td class="labelStyle" colspan="1"></td>
                    </tr>
                    <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset, '','display:none;')}">
                        <td class="labelStyle"></td>
                        <td class="labelStyle">应盘</td>
                        <td class="labelStyle">{!consumAssetMap['stock']}(待报废{!consumAssetMap['abandon']}件)</td>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">{!consumAssetMap['lend']}</td>
                        <td class="labelStyle"></td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!consumAssetMap['lost']}</td>
                        <td class="labelStyle">{!consumAssetMap['all']}</td>
                    </tr>
                    <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset, '','display:none;')}">
                        <td class="labelStyle"></td>
                        <td class="labelStyle">实盘</td>
                        <td class="labelStyle">{!consumAssetMap['inventory']}</td>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">{!consumAssetMap['lend']}</td>
                        <td class="labelStyle"></td><!--20210520 you 1650  -->
                        <td class="labelStyle">{!consumAssetMap['lost']}</td>
                        <td class="labelStyle">{!consumAssetMap['inventory']+consumAssetMap['lend']+consumAssetMap['lost']}</td>
                    </tr>
                    <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset, '','display:none;')}">
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">{!consumAssetMap['panying']}</td>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle"></td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!consumAssetMap['panying']}</td>
                    </tr>
                    <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset, '','display:none;')}">
                        <td class="labelStyle"></td>
                        <td class="labelStyle">盘亏</td>
                        <td class="labelStyle">{!consumAssetMap['pankui']}</td>
                        <td class="labelStyle"></td>
                        <td class="labelStyle">0</td>
                        <td class="labelStyle"></td><!--20210520 you 1650  -->
                        <td class="labelStyle">0</td>
                        <td class="labelStyle">{!consumAssetMap['pankui']}</td>
                    </tr>
                </table>
                <div id='descdiv'>
                    <apex:outputText value="{!descStr}" escape="false"/>
                    <apex:outputText value="{!descSHStr}" rendered="{!bieCunFangDi=='上海 备品中心'}" escape="false"/>
                    <apex:outputText value="{!descNotSHStr}" rendered="{!bieCunFangDi!='上海 备品中心'}" escape="false"/>
                </div>
            </apex:outputPanel>
            <apex:outputPanel layout="block" id="overlay_div" style="display: none;">
                <div style="padding: 5px;{!IF(assetCategory!='耗材','','display: none;')}">
                    备品盘点报告书编号:
                    <apex:outputText value="{!inventoryHeader.Name}"/>&nbsp;
                    盘点地点: <apex:outputText value="{!inventoryHeader.Internal_asset_location__c}"/>&nbsp;
                    盘点开始日:
                    <apex:outputtext value="{0, date, yyyy/MM/dd}">
                        <apex:param value="{!inventoryHeader.Inventory_Start_Date__c}"></apex:param>&nbsp;
                    </apex:outputtext>
                </div>
                <div style="padding: 5px;{!IF(assetCategory!='备品'&& hasConsumAsset,'','display: none;')}">
                    耗材盘点报告书编号:
                    <apex:outputText value="{!consumInventoryHeader.Name}"/>&nbsp;
                    盘点地点: <apex:outputText value="{!consumInventoryHeader.Internal_asset_location__c}"/>&nbsp;
                    盘点开始日:
                    <apex:outputtext value="{0, date, yyyy/MM/dd}">
                        <apex:param value="{!consumInventoryHeader.Inventory_Start_Date__c}"></apex:param>&nbsp;
                    </apex:outputtext>
                </div>
                <apex:outputPanel id="message2" layout="block" style="width: 100%">
                    <apex:pageMessages />
                </apex:outputPanel>
                <div class="searchButtonStyle1" id="scanAction_div">
                    <!-- 耗材追溯方案 检索耗材时 修改"扫描"为"pad扫描" -->
                    <div style="display: table-cell; width: 18%;">
                        <apex:commandButton value="iPad扫描" rendered="{!assetCategory == '耗材'  && bieCunFangDi == '上海 备品中心'}" onclick="qrsacn();return false"/>
                        <apex:commandButton value="扫描" rendered="{!!(assetCategory == '耗材' && bieCunFangDi == '上海 备品中心') }" onclick="qrsacn();return false"/>
                    </div>
                    <div style="display: table-cell; width: 13%;"><apex:commandButton value="保存" onclick="savejs();return false"/></div>
                    <div style="display: table-cell; width: 13%;"><apex:commandButton value="返回" onclick="changeFullScreen(false); return false"/></div>
                    <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 start -->
                    <apex:outputText rendered="{!assetCategory == '耗材' && bieCunFangDi = '上海 备品中心'}">
                        <div style="display: table-cell; width: 19%;">
                            <apex:commandButton onclick="document.getElementById('maqCode').focus();return false" value="码枪扫描" />
                        </div>
                        <div style="display: table-cell; width: 500px" >
                            <input value="" autofocus="autofocus" id="maqCode" width="100%" style="background-color: #ffffff;height: 32px;" onkeypress="return onKeyPress(event)" />
                        </div>
                       <!--  <div style="display: table-cell;" >
                            <div style="float: left;display: table-cell;" class="btn" >码枪扫描 </div>
                            <div class="search_label" style="float: left;display: table-cell;" >
                                <input value="" autofocus="autofocus" id="maqCode" style="background-color: #ffffff" onkeypress="return onKeyPress(event)" />  </div>
                        </div> -->
                    </apex:outputText>
                    <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 end -->
                </div>
                <table border="1px" style="width: 95%;" >
                    <tr>
                        <td class="labelStyle">型号</td>
                        <td class="labelStyle">机身号</td>
                         <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle">货架号</td></apex:outputText>
                        <td class="labelStyle">所在地区(本部)</td>
                        <td class="labelStyle">货区</td>
                        <td class="labelStyle">在库数量</td>
                        <td class="labelStyle">盘点结果</td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">盘亏</td>
                    </tr>
                    <apex:repeat value="{!inventoryDetailList}" var="ivDetail" id="inventroyRow">
                        <tr class="{!IF(assetCategory!='耗材','displayRow','hiddenRow')}">
                            <td class="labelStyle" style="{!IF(ivDetail.OneToOne_Accsessary__c,'color:red;', IF(ivDetail.Asset_Status__c == '冻结', 'color:blue;', ''))}"><apex:outputPanel rendered="{!ivDetail.OneToOne_Accsessary__c}">└</apex:outputPanel>{!ivDetail.Fixture_Model_No__c}<apex:outputPanel rendered="{!ivDetail.Asset_Status__c == '冻结'}">(冻结)</apex:outputPanel></td>
                            <td class="labelStyle">{!ivDetail.Asset__r.SerialNumber}</td>
                             <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle">{!ivDetail.WH_Location__c}</td></apex:outputText>
                            <td class="labelStyle">{!ivDetail.Salesdepartment__c}</td>
                            <td class="labelStyle">{!ivDetail.VWH_Location__c}</td>
                            <td class="labelStyle">{!ivDetail.Amount__c}</td>
                            <td class="labelStyle">
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}"
                                            html-disabled="true" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 100%"/>
                                    <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理'}">
                                        <br/>
                                        <button onclick="lostGeTi(this);return false;">手动</button>
                                    </apex:outputPanel>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}"
                                            html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 100%" />
                                </apex:outputPanel>
                            </td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td>
                        </tr>
                    </apex:repeat>
                    <apex:repeat value="{!consumInventoryDetailList}" var="ivDetail" id="consumInventroyRow">
                        <tr class="{!IF(assetCategory!='备品','displayRow','hiddenRow')}">
                            <td class="labelStyle" style="{!IF(ivDetail.Asset_Status__c == '冻结', 'color:blue;', '')}">{!ivDetail.Fixture_Model_No__c}<apex:outputPanel rendered="{!ivDetail.Asset_Status__c == '冻结'}">(冻结)</apex:outputPanel></td>
                            <td class="labelStyle">{!ivDetail.Asset__r.SerialNumber}</td>
                            <td class="labelStyle">{!ivDetail.WH_Location__c}</td>
                            <td class="labelStyle">{!ivDetail.Salesdepartment__c}</td>
                            <td class="labelStyle"><!-- {!ivDetail.Id} --></td>
                            <td class="labelStyle">{!ivDetail.Amount__c}</td>
                            <td class="labelStyle">
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}"
                                            html-disabled="true" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 100%"/>
                                            <!-- add by rentx 20210823 start 耗材盘点时记录code -->
                                        <apex:inputHidden value="{!ivDetail.HCCodes__c}" />
                                            <!-- add by rentx 20210823 start 耗材盘点时记录code -->
                                    <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理'}">
                                        <br/>
                                        <button onclick="lostGeTi(this);return false;">手动</button>
                                    </apex:outputPanel>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()"  html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}"
                                            html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 100%" />
                                            <!-- add by rentx 20210819 start -->
                                            <apex:inputHidden value="{!ivDetail.HCCodes__c}" />
                                            <!-- add by rentx 20210819 start -->
                                </apex:outputPanel>
                            </td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td>
                        </tr>
                    </apex:repeat>
                </table>
            </apex:outputPanel>
        </apex:pageBlock>
        <!-- add by rentx 20210820 start -->
        <hidden>
            <input type="hidden" value="" id="tempcodeid" />
            <ul id="Scancodehistory" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 100px; overflow: auto">
            </ul>
            <input type="hidden" value="{!allHCCodelist}" id="allhccode" />
        </hidden>
        <!-- add by rentx 20210820 end -->
    </apex:form>
    <script type="text/javascript">
        var standalone = window.navigator.standalone,
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = '';
        if(ios) {
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
        }
        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
        var scanType = 1;
        var hasChange = false;
        var lastMainId = '';
        function filljsQR(content) {
            var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            if (type == '耗材') {
                //只能输入数字和字母
                var re;
                re = /^[a-zA-Z0-9]*$/;
                // re = ^[0-9A-Za-z]{8,16}$;
                if (re.test(content) || content == '') {
                }
                else {
                //不匹配
                    alert('请输入正确的code')
                    // console.log('请输入正确的code');
                    j$( '#maqCode' ).val("");
                    return true;
                }
                // if (content.length == 3) {
                var codearr = j$('#Scancodehistory')[0].getElementsByTagName('li');
                //如果传进来的数据为3位 则拼接上一个扫的码if
                if (codearr != null && codearr.length > 0 &&content.length == 3) {
                    var lastCode1 = codearr[codearr.length - 1];
                    var nowc = lastCode1.innerHTML;
                    //上次输入的也是小码 或者 上次输入的是盒  或者上次输入的码已经匹配好了
                    //上次输入的码是大码
                    // if (nowc.substring(nowc.length - 8,nowc.length - 5) != '250' && nowc.substring(nowc.length - 7 ,nowc.length) != ' XIAOMA') {
                    if (nowc.length == 3 || nowc.substring(nowc.length - 8,nowc.length - 5) == '250' || nowc.substring(nowc.length - 7 ,nowc.length) == ' XIAOMA' ) {
                        alert('请先扫描大码再扫描小码')
                        j$( '#maqCode' ).val("");
                        return false;
                    }else{
                        codearr[codearr.length -1 ].remove();
                        content = nowc +content + ' XIAOMA';
                    }
                }else{
                    var codearr = j$('#Scancodehistory')[0].getElementsByTagName('li');
                    //如果传进来的数据为3位 则拼接上一个扫的码if
                    if (codearr != null && codearr.length > 0) {
                        var lastCode1 = codearr[codearr.length - 1];
                        var nowc = lastCode1.innerHTML;
                        //如果当前输入的条码长度不为3 并且上次输入条码为大码
                        if (nowc.substring(nowc.length - 8,nowc.length - 5) != '250' && nowc.substring(nowc.length - 7 ,nowc.length) != ' XIAOMA'  && nowc != 'fengedian' ) {
                            alert('请先扫描大码再扫描小码')
                            //提示错误信息的话也要清 防止出现历史数据遗留问题
                            j$("#salesdepartment_select1")[0].style.display = 'none';
                            var picklist1 = j$("#salesdepartment_select1 select")[0];
                            j$(picklist1).empty();
                            codearr[codearr.length -1 ].remove();
                            j$( '#maqCode' ).val("");
                            return false;
                        }
                    }
                }
                // }
                //2.不能重复输入
                var codearr0 = j$('#Scancodehistory')[0].getElementsByTagName('li');
                //如果传进来的数据为3位 则拼接上一个扫的码if
                var hisarr = [];
                if (codearr0 != null) {
                    for (var i = 0; i < codearr0.length; i++) {
                        hisarr.push(codearr0[i].innerHTML);
                    }
                }
                var uiObj0 = j$("#Scancodehistory");
                var contentArr0 = [];
                //
                if (uiObj0[0] != null) {
                    var liArr0 =  uiObj0[0].getElementsByTagName('li');
                    if (liArr0 != null && liArr0.length > 0 ) {
                        for (var i = 0; i < liArr0.length; i++) {
                            contentArr0.push(liArr0[i].innerHTML);
                        }
                    }
                }
                if (contentArr0 != null && contentArr0.length > 0) {
                    for (var i = 0; i < contentArr0.length; i++) {
                        if (contentArr0[i] == content) {
                            alert('当前条码已经扫描过 请检查后重试');
                            //清空当前输入框内容
                            j$( '#maqCode' ).val("");
                            //提示错误信息的话也要清 防止出现历史数据遗留问题
                            j$("#salesdepartment_select1")[0].style.display = 'none';
                            var picklist1 = j$("#salesdepartment_select1 select")[0];
                            j$(picklist1).empty();
                            return false;
                        }
                    }
                }
            }
            // alert('894')
            // alert(content);
            console.error("==content=="+content+"=scanType=="+scanType);
            blockme();
            checkQRCode_new(content, scanType);
            //add  by rentx 20210823 start 扫码履历也存一下code
            j$("#Scancodehistory").append("<li>"+content+"</li>");
            j$("#Scancodehistory").animate({ scrollTop: j$("#Scancodehistory").prop("scrollHeight")}, 1000);
            var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            if (type == '耗材') {
                var aatemp = content.substring(content.length - 7   ,content.length);
                if (aatemp == ' XIAOMA') {
                    var tempstr = content;
                    //取得拼成的袋的code
                    content = tempstr.substring(0,tempstr.length - 7);
                }
            }
            //add by rentx 20210823 end 扫码履历也存一下code
            j$("#scanedqr").append("<li>"+content+"</li>");
            j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
        }
        function checkQRCode_new(content, scanType) {
            //区分备品和耗材 == 目前只有耗材有改动
            //add by rentx 20210813 start
            var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            var daicode = '';
            var aatemp = content.substring(content.length - 7   ,content.length);
            var contTemp = content;
            var tempTanSelect = '123';
            if (type == '耗材') {
                //如果扫的是袋 则直接返回 待扫到改袋的小码后再进行数量的累加
                // if (content.substring(2,3) == '0' && aatemp != ' XIAOMA') {
                // if (content.substring(content.length - 8,content.length - 5) != '250' && aatemp != ' XIAOMA') {
                //     j$( '#maqCode' ).val("");
                //     unblockUI();
                //     return;
                // }
                //判断当前输入的code是否为小码 如果是 则去掉后面加的12位
                if (aatemp == ' XIAOMA') {
                    // alert(aatemp)
                    var tempstr = content;
                    //说明扫的是小码 这时候只要将原来的提取出来就可以了
                    // alert('Content '+content );
                    //扫的是小码 不弹 大码弹
                    tempTanSelect = '';
                    content = tempstr.substring(0,tempstr.length - 10);
                    //取得拼成的袋的code
                    daicode = tempstr.substring(0,tempstr.length - 7);
                }
            }
            //add by rentx 20210813 end
            //rentx add guigenum at 20210812
            var qrType , qrError, qrId , guigenum ;
            // QR
            var amoutInput = j$("tr.displayRow input[data-qrcode='"+content+"']:not([data-frozen='true'])");
            console.error("checkQRCode_new=="+amoutInput.length+"==amoutInput"+amoutInput);
            // alert("checkQRCode_new=="+amoutInput.length+"==amoutInput"+amoutInput);
            // // alert(JSON.tostring(amoutInput));
            // alert(amoutInput.toString);
            // alert(JSON.stringify(amoutInput) );
            if (amoutInput.length > 0) {
                console.error("QR==scanType=="+scanType);
                if (scanType == 2) {
                    //一对一附属品扫描
                    amoutInput = amoutInput.filter("[data-accsessary='true']");
                    if (amoutInput.length > 0) {
                        qrType = amoutInput.prop("disabled") ? '4' : '5';
                        qrId = lastMainId + ':' + amoutInput.data("aid");
                        guigenum = lastMainId + ':' +amoutInput.data('bpguige');
                    } else {
                        qrError = "不存在此附属品";
                    }
                } else {
                    //非一对一附属品扫描
                    amoutInput = amoutInput.filter("[data-accsessary='false']");
                    console.error("3==amoutInput=="+amoutInput);
                    if (amoutInput.length > 0) {
                        lastMainId = '';
                        if (amoutInput.prop("disabled")) {
                            //是否一对一主体
                            let oto_main = amoutInput.data("main");
                            //个体管理
                            qrType = oto_main ? '2' : '3';
                            if (oto_main) {
                                lastMainId = amoutInput.data("mid");
                            }
                        } else {
                            //数量管理
                            qrType = '1';
                        }
                        qrId = amoutInput.data("aid");
                        guigenum = amoutInput.data('bpguige');
                    } else {
                        qrError = "一对一附属品请先扫描主体";
                    }
                }
            }
            // Barcode
            else {
                console.error("Barcode");
                var tracingCode = content.substr(-8);
                if (tracingCode.indexOf('250') == 0) {
                    content = content.slice(0, -8);
                }
                amoutInput = j$("tr.displayRow input[data-barcode='"+content+"']:not([data-frozen='true'])");
                // 第一条件
                if (amoutInput.length > 0) {
                }
                // 第二条件
                else {
                    var JANCODE = content.substr(3, 12);
                    var GTINCODE = content.substr(3, 12);
                    // var yyyyMMdd = "20" + content.substr(18, 6);
                    // 到2100年 就需要下面的logic了
                    // var now = new Date();
                    // var current_yyyyMMdd = now.getFullYear()
                    //         + ("0" + (now.getMonth() + 1)).slice(-2)
                    //         + ("0" + now.getDate()).slice(-2);
                    // var currentYear = new Date().getFullYear();
                    // var yyyyMMdd = Math.floor(currentYear / 100) + content.substr(18, 6);
                    // if (yyyyMMdd < currentYear) yyyyMMdd = yyyyMMdd + 1000000;   // 使用期限 应该是未来的日期
                    var result = extractDateSerial(content);
                    var yyyyMMdd = result['yyyyMMdd'];
                    var serial = result['serial'];
                    if (JANCODEMap[JANCODE]) {
                    } else {
                        var query = "Select ProductCode From Product2 WHERE JANCODE__c LIKE '" + JANCODE + "%' OR Device_GTIN_2_13_F__c = '" + GTINCODE + "' LIMIT 1";
                        var records = sforce.connection.query(query).getArray('records');
                        if (records.length > 0) {
                            JANCODEMap[JANCODE] = records[0].ProductCode;
                        }
                    }
                    if (JANCODEMap[JANCODE]) {
                        var content2 = JANCODEMap[JANCODE] + ":" + serial + "(" + yyyyMMdd + ")";
                        amoutInput = j$("tr.displayRow input[data-ProductSerialNo^='"+content2+"']:not([data-frozen='true'])");
                        // amoutInput = j$("tr.displayRow input[data-ProductSerialNo^='"+content2+"']:not([data-frozen='false'])");
                    }
                }
                if (amoutInput.length > 0) {
                    if(amoutInput.length > 1) {
                        if (!standalone && !safari && ios) {
                            let deptStr = '';
                            let aidStr = '';
                            amoutInput.each(function(){
                                deptStr += this.dataset["salesdepartment"]+';'
                                aidStr += this.dataset["aid"]+';'
                            });
                            // alert('1124')
                            // var showflag = tempTanSelect == ''? : '1' : tempTanSelect
                            // window.location.href="sfqr://selectDept?dept="+deptStr.slice(0, -1) + "&aid="+aidStr.slice(0,-1) + "&showflag="+tempTanSelect;
                            //调用iPad的接口 传递参数 dept , aid , showflag , num  iPad根据showflag判断是否弹出选择框 num为默认的值
                            //showflag为1时 弹出
                            var showflag = tempTanSelect != '' ? '1' : tempTanSelect;
                            // var showflag = tempTanSelect != '' ? 1 : 0;
                            // alert(deptStr.slice(0, -1) +' deptStr')
                            // alert(aidStr.slice(0,-1) +' aidStr')
                            // alert('showflag'+ showflag)
                            // alert('contTemp   '+contTemp + '   '+contTemp.length);
                            // window.location.href="sfqr://scan";
                            window.location.href="sfqr://selectDept?dept="+deptStr.slice(0, -1) + "&aid="+aidStr.slice(0,-1)+"&showflag="+showflag+"&code="+contTemp;
                            // if (true) {}
                            unblockUI();
                            return;
                        } else {
                           /* var picklist = j$("#salesdepartment_select select")[0];
                            if (picklist.value == "") {
                                alert("请选择备品存放地(本部)");
                                for(var i=0;i<amoutInput.length;i++) {
                                    var option = document.createElement('option');
                                    option.text = amoutInput[i].dataset["salesdepartment"];
                                    picklist.appendChild(option);
                                    j$("#salesdepartment_select")[0].style.display = 'block';
                                }
                                unblockUI();
                                return;
                            } 注释byrentx*/
                            var nowCode = j$( '#maqCode' ).val();
                            var nowCode1 = j$('#qrcode').val();
                            // alert('1062'+ nowCode + '  '+nowCode1);
                            // alert('tempTanSelect'+ tempTanSelect);
                            if (nowCode != '' && nowCode != 'undefined' && nowCode != null) {
                                // alert(tempTanSelect);
                                //是码枪输入
                                //说明扫的大码 需要展示这个框
                                if (tempTanSelect != '') {
                                    j$(".model00").show();
                                    var picklist = j$("#salesdepartment_select1 select")[0];
                                    if (picklist.value == "" ) {
                                        alert("请选择备品存放地(本部)");
                                        for(var i=0;i<amoutInput.length;i++) {
                                            var option = document.createElement('option');
                                            option.text = amoutInput[i].dataset["salesdepartment"];
                                            picklist.appendChild(option);
                                            j$("#salesdepartment_select1")[0].style.display = 'block';
                                        }
                                        j$( '#tempcodeid' ).val(contTemp);
                                        unblockUI();
                                        return;
                                    }else{
                                        for(var i=0;i<amoutInput.length;i++) {
                                            if (amoutInput[i].dataset['salesdepartment'] == picklist.value){
                                                amoutInput = j$(amoutInput[i]);
                                                break;
                                            }
                                        }
                                    }
                                }
                            }else if (nowCode1 != '' && nowCode1 != 'undefined' && nowCode1 != null) {
                            // }else if (ios) {
                                var picklist = j$("#salesdepartment_select select")[0];
                                    if (picklist.value == "") {
                                    alert("请选择备品存放地(本部)");
                                    for(var i=0;i<amoutInput.length;i++) {
                                        var option = document.createElement('option');
                                        option.text = amoutInput[i].dataset["salesdepartment"];
                                        picklist.appendChild(option);
                                        j$("#salesdepartment_select")[0].style.display = 'block';
                                    }
                                    j$( '#tempcodeid' ).val(contTemp);
                                    unblockUI();
                                    return;
                                }else{
                                    for(var i=0;i<amoutInput.length;i++) {
                                        if (amoutInput[i].dataset['salesdepartment'] == picklist.value){
                                            amoutInput = j$(amoutInput[i]);
                                            break;
                                        }
                                    }
                                }
                            }
                            //update by rentx 20210907
                            // else {
                            //     alert('12222')
                            //     for(var i=0;i<amoutInput.length;i++) {
                            //         if (amoutInput[i].dataset['salesdepartment'] == picklist.value){
                            //             amoutInput = j$(amoutInput[i]);
                            //             break;
                            //         }
                            //     }
                            // }
                        }
                    }
                    lastMainId = '';
                    qrType = '1';
                    qrId = amoutInput.data("aid");
                    guigenum = amoutInput.data('bpguige');
                } else {
                    qrError = "不存在此保有设备";
                }
            }
            console.error("3=="+qrType+"==qrError=="+qrError+"==qrId=="+qrId);
            // checkQRDone(qrType, qrError, qrId);
            //如果是 袋 的话 默认是1个 目前只有耗材有改动
            if (type == '耗材') {
                if (contTemp.substring(contTemp.length - 8,contTemp.length - 5) != '250'){
                    guigenum = 1;
                }
                //add by rentx end
                var tempInput;
                if (qrType == '1') {
                    tempInput = j$("input[data-aid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                    // alert('121');
                    //add by rentx 20210908 start
                    moveToTop(tempInput);
                    //add by rentx 20210908 end
                }else if (qrType == '2') {
                    tempInput = j$("input[data-mid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                }else if (qrType == '3') {
                    tempInput = j$("input[data-aid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                    //add by rentx 20210908 start
                    moveToTop(tempInput);
                    //add by rentx 20210908 end
                }else if (qrType == '4') {
                    //一对一个体附属品
                    let qrsplit = qrId.split(':');
                    tempInput = j$("input[data-mid='"+qrsplit[0]+"'][data-aid='"+qrsplit[1]+"']:not([data-frozen='true'])");
                }else if (qrType == '5') {
                    tempInput = j$("input[data-mid='"+qrsplit[0]+"'][data-aid='"+qrsplit[1]+"']:not([data-frozen='true'])");
                }
                if (tempInput != null && tempInput != '' && tempInput != 'undefined') {
                    if (!tempInput) return;
                    //这里只设置code的值
                    var aaa = tempInput.parent();
                    var ccc = aaa[0].children[1].value;
                    if (aatemp == ' XIAOMA') {
                        //取得拼成的袋的code
                        aaa[0].children[1].value = ccc == '' ? daicode : ccc + ',' + daicode;
                    }else{
                        if (contTemp.substring(contTemp.length - 8,contTemp.length - 5) == '250') {
                            aaa[0].children[1].value = ccc == '' ? daicode : ccc + ',' + content;
                        }
                    }
                }
                // aaa[0].children[1].val(ccc+','+content);
                if (contTemp.substring(contTemp.length - 8,contTemp.length - 5) != '250' && aatemp != ' XIAOMA') {
                    j$( '#maqCode' ).val("");
                    unblockUI();
                    return;
                }
            }
            checkQRDone(qrType, qrError, qrId, guigenum);
            j$("#salesdepartment_select")[0].style.display = 'none';
            var picklist = j$("#salesdepartment_select select")[0];
            j$(picklist).empty();
            //add by rentx start
            j$("#salesdepartment_select1")[0].style.display = 'none';
            var picklist1 = j$("#salesdepartment_select1 select")[0];
            j$(picklist1).empty();
            //add by rentx end
        }
        //update by rentx 20210914 start 判断需不需要设置值 是大码的话不设置
        // function deptDone(aid) {
        function deptDone(aid,code) {
            lastMainId = '';
            // checkQRDone('1', '', aid,'');
            checkQRDone('1', '', aid,code+'code');
        }
        function extractDateSerial(content){
            var yyyyMMdd = '';
            var noJancodeContent = content.slice(16);
            var n1 = noJancodeContent.search(/17\d{6}/);
            var n2 = noJancodeContent.slice(8).search(/17\d{6}/);
            var m1 = noJancodeContent.search(/11\d{6}/);
            var m2 = noJancodeContent.slice(8).search(/11\d{6}/);
            var k = 0;
            if(n1 % 8 == 0){
                yyyyMMdd = '20'+noJancodeContent.substr(n1+2,6);
                k += 1;
            }
            else if(n2 == 0) {
                yyyyMMdd = '20'+noJancodeContent.substr(8+2,6);
                k += 1;
            }
            if(m1 % 8 == 0 || m2 == 0){
                k += 1;
            }
            var serial = noJancodeContent.slice(k*8+2);
            var y = yyyyMMdd.substring(0, 4);
            var m = yyyyMMdd.substring(4, 6);
            var d = yyyyMMdd.substring(6);
            // 00表示月末
            if(d == '00'){
                d = '' + (new Date(y, m, d)).getDate();
            }
            yyyyMMdd = y + m + d;
            return {'yyyyMMdd':yyyyMMdd, 'serial':serial};
        }
        function promptDone(type, code1, code2, amount) {
            var asstype = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            if (type == "1") {
                var amoutInput = j$("input[data-aid='"+code1+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                if (!amoutInput) return;
                //判断amount对不对
                //add by rentx 同一设备数量累加
                // amoutInput.val(parseInt(amount) || 0);
                amoutInput.val(parseInt(amount) || '');
                moveToTop(amoutInput);
            } else {
                var amoutInput = j$("input[data-mid='"+code1+"'][data-aid='"+code2+"']:not([data-frozen='true'])");
                if (!amoutInput) return;
                // amoutInput.val(parseInt(amount) || 0);
                amoutInput.val(parseInt(amount) || '');
                amoutInput.parents("tr:first").css('background', 'lightgray');
            }
        }
        function checkQRDone(qrType, qrError, qrId,guigenum) {
            unblockUI();
            var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            // var qrType = document.getElementById("allPage:allForm:qrType").value
            // var qrError = document.getElementById("allPage:allForm:qrError").value;
            // var qrId = document.getElementById("allPage:allForm:qrId").value
            if (qrError) {
                alert(qrError);
                //add by rentx 20210827 start
                //清空当前输入框内容
                j$( '#maqCode' ).val("");
                // //删除上个条码
                var uiObj = j$("#Scancodehistory");
                if (uiObj[0] != null) {
                    var liArr =  uiObj[0].getElementsByTagName('li');
                    liArr[liArr.length-1].remove();
                }
                //add by rentx 20210827 end
                return;
            }
            if (qrType == '1') {
                //数量管理
                //update by rentx 20210910 start 掉iOS代码时直接传累加后的值
                // if (!standalone && !safari && ios) {
                //     window.location.href="sfqr://prompt?type=1&qrId="+qrId;
                // } else {
                //     var amount = prompt("数量管理备品请输入数量", guigenum);
                //     amoutInput.val(parseInt(amount) || 0);
                //     moveToTop(amoutInput);
                // }
                var allnum;
                var amoutInput = j$("input[data-aid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                if (!amoutInput) return;
                //add by rentx 20210914 start
                //判断guigenum是不是上次传入的code
                var guigestr = guigenum.toString();
                if (guigestr != '' && guigestr.substring(guigestr.length - 4,guigestr.length) == 'code') {
                    //截掉后4位取前面的code吗
                    guigestr = guigestr.substring(0,guigestr.length-4);
                    if (guigestr.substring(guigestr.length - 8,guigestr.length - 5) == '250') {
                        guigenum = amoutInput.data('bpguige');
                    }else if (guigestr.substring(guigestr.length - 7 ,guigestr.length) == ' XIAOMA') {
                        guigenum = 1;
                    }else{
                        //说明是盒 这时置顶即可
                        guigenum = 0;
                    }
                }
                // if (guigestr.substring(guigestr.length - 4,guigestr.length) == 'code') {
                //     //说明是选中了营业本部后掉的 需要判断是盒还是个 并且
                //     if (code != '') {
                //     }
                // }
                //add by rentx 20210914 end
                //add by rentx 同一设备数量累加
                if (type == '耗材') {
                    // var nownum = parseInt(amoutInput.val()) || 0;
                    var nownum = parseInt(amoutInput.val()) || '';
                    allnum = nownum + parseInt(guigenum);
                    // amoutInput.val(parseInt(guigenum) + nownum || 0 );
                }else{
                    // alert('1438888')
                    // amoutInput.val(parseInt(amount) || 0);
                    var amount = prompt("数量管理备品请输入数量", "1");
                    allnum = amoutInput.val(parseInt(amount) || 0);
                }
                if (!standalone && !safari && ios) {
                    // alert('num  '+allnum)
                    //update by rentx 20210909 start 调iOS代码时 判断是否为耗材
                    // window.location.href="sfqr://prompt?type=1&qrId="+qrId + "&num="+allnum+"&cotype="+type;
                    if (type == '耗材') {
                        window.location.href="sfqr://prompt?type=1&qrId="+qrId + "&num="+allnum+"&cotype="+0;
                    }else{
                        window.location.href="sfqr://prompt?type=1&qrId="+qrId + "&num="+allnum+"&cotype="+1;
                    }
                    //update by rentx 20210909 end 调iOS代码时 判断是否为耗材
                } else {
                    amoutInput.val(allnum);
                    moveToTop(amoutInput);
                }
            } else if (qrType == '2') {
                //一对一主体
                var amoutInput = j$("input[data-mid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                if (!amoutInput) return;
                amoutInput.val(1);
                // moveToTop(amoutInput);
                moveToTopR(amoutInput.parents("tr:first"));
                amoutInput.parents("tr:first").css('background', 'lightgray');
                j$("html, body").animate({ scrollTop: 0 }, "fast");
                scanType = 2;
                if (!standalone && !safari && ios) {
                    window.location.href="sfqr://accsessaryScan";
                } else {
                    j$(".modal2").show();
                }
            } else if (qrType == '3') {
                //个体管理
                var amoutInput = j$("input[data-aid='"+qrId+"']:not([data-accsessary='true']):not([data-frozen='true'])");
                if (!amoutInput) return;
                amoutInput.val(1);
                moveToTop(amoutInput);
            } else if (qrType == '4') {
                //一对一个体附属品
                let qrsplit = qrId.split(':');
                var amoutInput = j$("input[data-mid='"+qrsplit[0]+"'][data-aid='"+qrsplit[1]+"']:not([data-frozen='true'])");
                if (!amoutInput) return;
                amoutInput.val(1);
                amoutInput.parents("tr:first").css('background', 'lightgray');
                // moveToTop(amoutInput);
            } else if (qrType == '5') {
                //一对一数量附属品
                let qrsplit = qrId.split(':');
                //update byr entx 20210910 start
                /*if (!standalone && !safari && ios) {
                    window.location.href="sfqr://prompt?type=2&mid="+qrsplit[0]+"&aid="+qrsplit[1];
                } else {
                    var amount = prompt("数量管理备品请输入数量", guigenum);
                    amoutInput.val(parseInt(amount) || 0);
                    amoutInput.parents("tr:first").css('background', 'lightgray');
                }*/
                //add start == by rentx
                var allnum;
                var amoutInput = j$("input[data-mid='"+qrsplit[0]+"'][data-aid='"+qrsplit[1]+"']:not([data-frozen='true'])");
                if (!amoutInput) return;
                //add by rentx 同一设备数量累加
                if (type == '耗材') {
                    // var nownum = parseInt(amoutInput.val()) || 0;
                    var nownum = parseInt(amoutInput.val()) || '';
                    allnum = nownum + parseInt(guigenum);
                    // amoutInput.val(parseInt(guigenum) + nownum || 0 );
                }else{
                    // amoutInput.val(parseInt(amount) || 0);
                    var nownum = parseInt(amoutInput.val()) || '';
                    allnum = nownum;
                }
                if (!standalone && !safari && ios) {
                    if (type == '耗材') {
                        window.location.href="sfqr://prompt?type=2&mid="+qrsplit[0]+"&aid="+qrsplit[1]+"&num="+allnum+"&cotype="+0;
                    }else {
                        window.location.href="sfqr://prompt?type=2&mid="+qrsplit[0]+"&aid="+qrsplit[1]+"&num="+allnum+"&cotype="+1;
                    }
                } else {
                    amoutInput.val(allnum);
                    //update by rentx 数量累加 end
                    amoutInput.parents("tr:first").css('background', 'lightgray');
                }
                //add by rentx end-----==
                // moveToTop(amoutInput);
            }
        }
        function moveToTopR(row) {
            if (row.next().find('input[data-accsessary = "true"]').length > 0) {
                moveToTopR(row.next());
            }
            let toprow = row.parent().children('tr:first');
            row.insertAfter(toprow);
        }
        function moveToTop(obj) {
            let row = obj.parents("tr:first");
            let toprow = row.parent().children('tr:first');
            row.css('background', 'lightgray');
            row.insertAfter(toprow);
            j$("html, body").animate({ scrollTop: 0 }, "fast");
            //add by rentx 20210812 start 清空输入框的信息
            j$( '#maqCode' ).val("");
        }
        scanner.addListener('scan', function (content) {
            // alert("1000");
            filljsQR(content)
        });
        function qrsacn() {
            if (!standalone && !safari && ios) {
                window.location.href="sfqr://scan";
                // alert('pad');
            } else {
                // alert('浏览器');
                j$(".modal").show();
                Instascan.Camera.getCameras().then(function (cameras) {
                  if (cameras.length > 0) {
                    if (ver >= 13) {
                        scanner.start(cameras[1]);
                    } else {
                        scanner.start(cameras[0]);
                    }
                  } else {
                    console.error('No cameras found.');
                  }
                }).catch(function (e) {
                  console.error(e);
                });
            }
        }
        function stopScan() {
            scanner.stop().then(function () {
                j$(".modal").hide();
            });
            //注释 by rentx 20210812 start
            var type = document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value;
            if (type != '耗材') {
                j$("#scanedqr").children().remove();
                j$("#salesdepartment_select")[0].style.display = 'none';
                var picklist = j$("#salesdepartment_select select")[0];
                j$(picklist).empty();
                j$("#salesdepartment_select1")[0].style.display = 'none';
                var picklist1 = j$("#salesdepartment_select1 select")[0];
                j$(picklist1).empty();
            }
            // amoutInput.val(parseInt(amount) || 0);
            //add by rentx 同一设备数量累加
            // j$("#scanedqr").children().remove();
            // j$("#salesdepartment_select")[0].style.display = 'none';
            // var picklist = j$("#salesdepartment_select select")[0];
            // j$(picklist).empty();
            //注释by rentx 20210812 end
        }
        function stopScan2() {
            j$(".modal2").hide();
            j$( '#qrcode' ).unbind();
            scanType = 1;
        }
        j$(document).ready(function(){
            j$( '#qrcode' ).unbind();
            j$( '#qrcode' ).keypress( function ( e ) {
                // alert(e.which)
                if ( e.which == 13 ) {
                    // alert('1579')
                    console.error("ready=="+j$( '#qrcode' ).val());
                    // alert('1479')
                    filljsQR(j$( '#qrcode' ).val());
                    return false;
                }
            });
        });
        //耗材追溯方案 add by rentx 20210812 start
        //1. 所有的修改只针对上海 备品中心 耗材 部分
        //1.1 扫描变为IPAD扫描
        //1.2 新增输入框码枪输入 该输入框绑定码枪
        //1.3 码枪输入后
            //2.1 区分 盒 和 袋  盒 -> 输入条码后8位以250开头
            //2.2 盒的个数为产品上的备品规格  袋的个数默认1
            //2.3 用户扫码点击保存后 需要将对应的code保存到对应的明细上
            //3.3 去重 包括之前的已保存的code
        function onKeyPress(e) {
            // alert('111111111111111111');
            // alert( j$( '#maqCode' ).val())
            var keyCode = null;
            if(e.which)
                keyCode = e.which;
            else if(e.keyCode)
                keyCode = e.keyCode;
            if(keyCode == 13) {
                //拿到当前输入code
                var nowCode = j$( '#maqCode' ).val();
                filljsQR(nowCode);
                nowCode = '';
                return false;
            }
            return true;
        }
        function addHistory() {
            j$("#maqCode").focus();
            // body...
            var allHCCodestr = j$( '#allhccode' ).val();
            if (allHCCodestr.length != 0) {
                //添加到历史中
                var arrlist = allHCCodestr.substring(1,allHCCodestr.length - 1).split(',');
                for (var i = 0; i < arrlist.length; i++) {
                    j$("#Scancodehistory").append("<li>"+arrlist[i]+"</li>");
                }
                j$("#Scancodehistory").append("<li>fengedian</li>");
            }
        }
        function getCodeAndDMethod() {
            // alert('1590')
            // body...
            j$("#maqCode").focus();
            var nowCode = j$( '#tempcodeid' ).val();
            checkQRCode_new(nowCode,1);
            j$(".model00").hide();
            scanType = 1;
            // //点确定的时候需要判断该不该清  1.扫的是大码的话不能清 扫的是小码或者是盒可以清
            if (nowCode.substring(nowCode.length - 7   ,nowCode.length) == ' XIAOMA' || nowCode.substring(nowCode.length - 8,nowCode.length - 5) == '250') {
                j$("#salesdepartment_select1")[0].style.display = 'none';
                var picklist1 = j$("#salesdepartment_select1 select")[0];
                j$(picklist1).empty();
            }
        }
        function stopScan00() {
            j$(".model00").hide();
        }
        //只有上海备品中心的有下拉框(下拉框默认耗材) 1.1 其他默认为耗材且不可编辑
        //获取页面上现在选中的备品存放地
        /*var aaa = document.getElementById("allPage:allForm:searchBlock:maindetailId:bieCunFangDi").value;
        if (aaa == '上海 备品中心') {
            //获取备品类别下拉框 设置默认下拉框的值为"耗材"
            document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value = '耗材';
        }else{
            document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").value = '备品';
            document.getElementById("allPage:allForm:searchBlock:maindetailId:assetCategory").disabled = true;
        }*/
        //耗材追溯方案 add by rentx 20210812 end
    </script>
</apex:page>
force-app/main/default/pages/InventoryResultRecordNew.page-meta.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>InventoryResultRecordNew</label>
</ApexPage>
force-app/main/default/pages/MaintenanceProductData.page
@@ -4,6 +4,43 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<style type="text/css">
/*信息提示颜色*/
body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
    background-color: #08107b !important;;
    color: #FFF !important;
}
body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
    background-color: #08107b !important;
}
body .message, .slds-vf-scope .message{
    background-color: #08107b !important;
}
body .errorM2 h4,body .errorM3 h4,body .errorM4 h4,.slds-vf-scope .errorM2 h4,.slds-vf-scope .errorM3 h4,.slds-vf-scope .errorM4 h4 {
    /* color: rgb(255, 255, 255)!important */
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .warningM2,body .warningM3,body .warningM4,.slds-vf-scope .warningM2,.slds-vf-scope .warningM3,.slds-vf-scope .warningM4 {
    background-color: rgb(254, 147, 57)!important;
    color: rgb(24, 24, 24)!important
}
body .confirmM2,body .confirmM3,body .confirmM4,.slds-vf-scope .confirmM2,.slds-vf-scope .confirmM3,.slds-vf-scope .confirmM4 {
    background-color: rgb(46, 132, 74)!important
}
body .pbButton{
    text-align: left;
}
.message .messageText{
    color: #FFF !important;
}
    .bPageBlock .detailList .dataCol{
    width:100%
    }
@@ -908,8 +945,8 @@
                <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'GuranteePrice'|| RecordTypeName ='GuranteeMain', false,true)}">
                <tr>
                    <td align="right" style="width: 100px;">第1分类</td>
                    <td>
                        <apex:selectList id="Category1" value="{!category1}" size="1">
                    <td align="right" style="width: 110px;">
                        <apex:selectList style="width: 100px" id="Category1" value="{!category1}" size="1">
                            <apex:selectOption itemValue="" itemLabel="-无-"/>
                            <apex:selectOption itemValue="GI" itemLabel="GI"/>
                            <apex:selectOption itemValue="ET" itemLabel="ET"/>
@@ -920,13 +957,13 @@
                        </apex:selectList>
                    </td>
                    <td align="right" style="width: 100px;" >第2分类</td>
                    <td><apex:inputText id="Category2" value="{!category2}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="Category2" value="{!category2}" style="width:100px"/></td>
                    <td align="right" style="width: 100px;" >第3分类</td>
                    <td><apex:inputText id="Category3" value="{!category3}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="Category3" value="{!category3}" style="width:100px"/></td>
                    <td align="right" style="width: 100px;" >第4分类</td>
                    <td><apex:inputText id="Category4" value="{!category4}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="Category4" value="{!category4}" style="width:100px"/></td>
                    <td align="right" style="width: 100px;" >第5分类</td>
                    <td><apex:inputText id="Category5" value="{!category5}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="Category5" value="{!category5}" style="width:100px"/></td>
                    <!-- <td colspan="10"></td> -->
                    <!-- <td align="right"></td>     -->
                </tr>
@@ -939,19 +976,20 @@
                <tr>
                    <td align="right" style="width: 100px;">产品名称</td>
                    <!-- ProductDateSearch -->
                    <td><apex:inputText id="CateName" value="{!searchCateName}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="CateName" value="{!searchCateName}" style="width:100px"/></td>
                    <td align="right" style="width: 100px;">产品编码</td>
                    <td><apex:inputText id="ProductCodeExt" value="{!searchProductCodeExt}" style="width:100px"/></td>
                    <td align="right" style="width: 110px;"><apex:inputText id="ProductCodeExt" value="{!searchProductCodeExt}" style="width:100px"/></td>
                    <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'GuranteePrice'|| RecordTypeName ='GuranteeMain', true,false)}">
                    <td align="right" style="width: 100px;">多年保修类型</td>
                    <td>
                        <apex:selectList id="GuranteeType" value="{!searchGuranteeType}" size="1">
                    <td align="right" style="width: 110px;">
                        <apex:selectList style="width:100px" id="GuranteeType" value="{!searchGuranteeType}" size="1">
                            <apex:selectOption itemValue="" itemLabel="-无-"/>
                            <apex:selectOption itemValue="市场" itemLabel="市场"/>
                            <apex:selectOption itemValue="服务" itemLabel="服务"/>
                        </apex:selectList>
                    </td>
                    </apex:outputPanel>
                    <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>
@@ -1025,12 +1063,12 @@
                <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'GuranteeMain',true , false)}">
                <tr>
                    <td>
                        <apex:selectList id="GuranteeMain1"  size="1">
                        <apex:selectList style="width:100px" id="GuranteeMain1"  size="1">
                            <apex:selectOptions value="{!GuranteeTypeOps}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="GuranteeMain2"  size="1">
                        <apex:selectList style="width:100px" id="GuranteeMain2"  size="1">
                            <apex:selectOptions value="{!EntendGuranteePeriodOps}"/>
                        </apex:selectList>
                    </td>
@@ -1045,6 +1083,10 @@
                        </span>
                    </td>
                    <td><input type="checkbox" id="GuranteeMain8" /></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <!-- <td></td>
                    <td>
                        <input  name="Intra_Trade_Service_RMB" id="GuranteeMain5" size="20" type="number" value="" disabled="true" />
@@ -1076,13 +1118,13 @@
                <tr>
                    <td>
                        <input name="RepairListPriceLevelA"  id="RepairInfo1" size="10" type="number" value="" style="width:100px;" />
                        <input name="RepairListPriceLevelA"  id="RepairInfo1" size="10" type="number" value="" style="width:100px;height:32px" />
                    </td>
                    <td>
                        <input name="RepairListPriceLevelB"  id="RepairInfo2" size="10" type="number" value="" style="width:100px;"/>
                        <input name="RepairListPriceLevelB"  id="RepairInfo2" size="10" type="number" value="" style="width:100px;height:32px"/>
                    </td>
                    <td>
                        <input name="RepairListPriceLevelC"  id="RepairInfo3" size="10" type="number" value="" style="width:100px;"/>
                        <input name="RepairListPriceLevelC"  id="RepairInfo3" size="10" type="number" value="" style="width:100px;height:32px"/>
                    </td>
                    <td>
                        <input type="checkbox"   id="RepairInfo4" />
@@ -1091,7 +1133,7 @@
                        <input name="Repair_Product_Code"  id="RepairInfo5" size="20" type="text" value="" style="width:100px;"/>
                    </td>
                    <td>
                        <input name="Maintenance_Price_Year"  id="RepairInfo6" size="20" type="number" style="width:100px;"/>
                        <input name="Maintenance_Price_Year"  id="RepairInfo6" size="20" type="number" style="width:100px;height:32px"/>
                    </td>
                    <td>
                        <span class="dateInput dateOnlyInput">
@@ -1100,32 +1142,32 @@
                    </td>
                    <!-- LJPH-C6A3DF 【委托】 【重要】产品主数据中增加服务用产品分类 liuyan 20210908 Star -->
                    <td>
                        <apex:selectList id="RepairInfo8"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo8"  size="1">
                            <apex:selectOptions value="{!CanRepairOps}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="RepairInfo9"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo9"  size="1">
                            <apex:selectOptions value="{!ServiceCategory1}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="RepairInfo10"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo10"  size="1">
                            <apex:selectOptions value="{!ServiceCategory2}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="RepairInfo11"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo11"  size="1">
                            <apex:selectOptions value="{!ServiceCategory3}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="RepairInfo12"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo12"  size="1">
                            <apex:selectOptions value="{!ServiceCategory4}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:selectList id="RepairInfo13"  size="1">
                        <apex:selectList style="width: 100%" id="RepairInfo13"  size="1">
                            <apex:selectOptions value="{!ServiceCategory5}"/>
                        </apex:selectList>
                    </td>
@@ -1159,7 +1201,7 @@
                        <apex:inputField id="EquipmentInfo5" value="{!EquipmentInfo[0].Default_Fixture_Arrival_Product__c}"/>
                    </td>
                    <td>
                        <apex:selectList id="EquipmentInfo6"  size="1">
                        <apex:selectList id="EquipmentInfo6"  size="1" style="width: 100%">
                            <apex:selectOptions value="{!DefaultFixtureArrivalProcessOps}"/>
                        </apex:selectList>
                    </td>
force-app/main/default/pages/MaintenanceProductData.page-meta.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <apiVersion>56.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>MaintenanceProductData</label>
force-app/main/default/pages/PCLLostReportPageLwc.page
New file
@@ -0,0 +1,36 @@
<apex:page lightningStylesheets="true">
    <apex:includeLightning />
    <div id="vfContainer"></div>
    <script>
        init();
        function init(){
            var oppId = getParam('oppId');
            var pageStatus = getParam('pageStatus');
            var lostType = getParam('lostType');
            var lostReportId = getParam('reportId');
            $Lightning.use("c:PCLLostReportPageLwcAura", function() {
            $Lightning.createComponent(
                "c:lexPCLLostReportPage",
                {
                    "oppId": oppId, // 替换为您要传递的参数值
                    "pageStatus": pageStatus,
                    "lostType": lostType,
                    "reportId": lostReportId
                },
                "vfContainer",
                function(cmp) {
                }
            );
            });
        }
        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>
force-app/main/default/pages/PCLLostReportPageLwc.page-meta.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>PCLLostReportPageLwc</label>
</ApexPage>
force-app/main/default/pages/QLMAttachmentPreview1.page
@@ -73,7 +73,7 @@
      <!-- 标题 -->
      <div style="height: 40px;background-color:#0f218b;width: 100%;text-align: center;">
          <h1 style="color: white;font-size: 24px;">
              查看附件
              查看文件
          </h1>
      </div>
force-app/main/default/pages/SolApproval.page
@@ -1,38 +1,40 @@
<apex:page sidebar="true" standardController="Solution_Programme__c" lightningStylesheets="true">
   <!-- <apex:relatedList list="ProcessSteps" ></apex:relatedList>-->
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <script type="text/javascript">
       $(function(){
           //添加新按钮隐藏老按钮
           // alert($('input[name="piSubmit"]').val());
           if($('input[name="piSubmit"]').val()=='Submit for Approval')
           {
                   // ($('input[name="piSubmit"]').hide()).parent().append($('input[name="submit_for_approval"]'));
                   //  $('input[name="piSubmit"]').next().hide();
            }
            else
            {
                  // alert($('input[name="piSubmit"]').val());
                  //   $('input[name="submit_for_approval"]').hide();
                    //替换HistoryList中的审批链接
                   var SolId = ('{!Solution_Programme__c.Id}').substring(0,15);
                   var ApprovalListID = SolId + '_RelatedProcessHistoryList_body';
                   // alert(ApprovalListID);
                   var Approvalprocessdiv=document.getElementById(ApprovalListID);
                   // alert(Approvalprocessdiv.getAttribute('class'));
                   if(Approvalprocessdiv!=null)
                   {
                       var originalHTML=Approvalprocessdiv.innerHTML;
                       var newHtml=originalHTML.replace('/p/process/ProcessInstanceWorkitemWizardStageManager?','/apex/ProcessInstance?SolId='+SolId+'&');
                       Approvalprocessdiv.innerHTML=newHtml;
                   }else{
                           var originalHTML=Approvalprocessdiv.innerHTML;
                           var newHtml=originalHTML.replace('/apex','');
                           Approvalprocessdiv.innerHTML=newHtml;
                   }
            }
       });
    <script type="text/javascript">
       document.addEventListener("DOMContentLoaded", function(event) {
            $(function(){
                //添加新按钮隐藏老按钮
                // alert($('input[name="piSubmit"]').val());
                if($('input[name="piSubmit"]').val()=='Submit for Approval')
                {
                        // ($('input[name="piSubmit"]').hide()).parent().append($('input[name="submit_for_approval"]'));
                        //  $('input[name="piSubmit"]').next().hide();
                }
                else
                {
                    // alert($('input[name="piSubmit"]').val());
                    //   $('input[name="submit_for_approval"]').hide();
                        //替换HistoryList中的审批链接
                        var SolId = ('{!Solution_Programme__c.Id}').substring(0,15);
                        var ApprovalListID = SolId + '_RelatedProcessHistoryList_body';
                        // alert(ApprovalListID);
                        var Approvalprocessdiv=document.getElementById(ApprovalListID);
                        // alert(Approvalprocessdiv.getAttribute('class'));
                        if(Approvalprocessdiv!=null)
                        {
                            var originalHTML=Approvalprocessdiv.innerHTML;
                            var newHtml=originalHTML.replace('/p/process/ProcessInstanceWorkitemWizardStageManager?','/apex/ProcessInstance?SolId='+SolId+'&');
                            Approvalprocessdiv.innerHTML=newHtml;
                        }else{
                                var originalHTML=Approvalprocessdiv.innerHTML;
                                var newHtml=originalHTML.replace('/apex','');
                                Approvalprocessdiv.innerHTML=newHtml;
                        }
                }
            });
        });
    </script>
    <apex:detail relatedList="true" title="true"/>
</apex:page>
force-app/main/default/pages/SpecialPrice.page
@@ -5,6 +5,45 @@
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<style>
    /*信息提示颜色*/
body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
    background-color: #08107b !important;;
    color: #FFF !important;
}
body .infoM2, body .infoM3, body .infoM4, .slds-vf-scope .infoM2, .slds-vf-scope .infoM3, .slds-vf-scope .infoM4 {
    background-color: #08107b !important;
}
body .message, .slds-vf-scope .message{
    background-color: #08107b !important;
}
body .errorM2 h4,body .errorM3 h4,body .errorM4 h4,.slds-vf-scope .errorM2 h4,.slds-vf-scope .errorM3 h4,.slds-vf-scope .errorM4 h4 {
    /* color: rgb(255, 255, 255)!important */
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .errorM2,body .errorM3,body .errorM4,.slds-vf-scope .errorM2,.slds-vf-scope .errorM3,.slds-vf-scope .errorM4 {
    background-color: rgb(234, 0, 30)!important
}
body .warningM2,body .warningM3,body .warningM4,.slds-vf-scope .warningM2,.slds-vf-scope .warningM3,.slds-vf-scope .warningM4 {
    background-color: rgb(254, 147, 57)!important;
    color: rgb(24, 24, 24)!important
}
body .confirmM2,body .confirmM3,body .confirmM4,.slds-vf-scope .confirmM2,.slds-vf-scope .confirmM3,.slds-vf-scope .confirmM4 {
    background-color: rgb(46, 132, 74)!important
}
body .pbButton{
    text-align: left;
}
.message .messageText{
    color: #FFF !important;
}
</style>
<script>
// window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
function onLoad() {
force-app/main/default/pages/SubAuthorizedCreate.page
@@ -14,7 +14,7 @@
                str += '&CF00N10000008qp8Z_lkid='+getParam('CF00N10000008qp8Z_lkid');
            }
            str += '&nooverride=1';
            window.open(str,'_self');
            window.location.href = str;
        }
        function getParam(paramName) {
            paramValue = "", isFound = !1;
force-app/main/default/pages/TenderAttachment.page
@@ -58,7 +58,7 @@
    <input id="btn2" type="button" value="缩小" onclick="ImageChange('j_id0:testImg',false)" />
    <br/>  -->
     <div style="height: 40px;background-color:#0f218b;width: 100%; ">
        <h1 style="color: white;margin-left: 45%;font-size: 24px;">查看附件</h1>
        <h1 style="color: white;margin-left: 45%;font-size: 24px;">查看文件</h1>
      </div>
        <div id="pandiv" style="margin-left: 24%; margin-top: 6%; text-align: center;">
            <apex:image alt="此处的图像描述" id="testImg" value="" style="display: none;">
@@ -88,7 +88,7 @@
        <script>
            //接收url上的参数
            var queryVal=GetQueryValue('id');
            var url='/servlet/servlet.FileDownload?file='+queryVal;
            var url='/sfc/servlet.shepherd/version/download/'+queryVal;
            //20201221 liying end
            //document.getElementById("j_id0:testImg").value=url;
            //js动态赋值
@@ -266,14 +266,14 @@
             mouseDownLocation = windowToCanvas(canvas, event.clientX, event.clientY);
             if (isPointInImageArea(mouseDownLocation)) {
              isMouseDown = true;
              document.title = '查看附件';
              document.title = '查看文件';
             }
            }
            /**鼠标弹起*/
            document.body.onmouseup = function() {
             isMouseDown = false;
             canvas.style.cursor = "default";
             document.title = '查看附件';
             document.title = '查看文件';
            }
            /**鼠标移动*/
            pandiv.onmousemove = function(event) {
force-app/main/default/triggers/ContentDocumentLink.trigger
@@ -1,8 +1,6 @@
trigger ContentDocumentLink on ContentDocumentLink (before insert,after insert,before delete,after delete, before update, after update) {
trigger ContentDocumentLink on ContentDocumentLink (before insert,after insert,after delete, before update, after update) {
    List<String> rentalIds = new List<String>();
    List<String> attIds = new List<String>();
    List<String> rentaldelIds = new List<String>();
    List<String> attdelIds = new List<String>();
    List<String> rentalApplyIds = new List<String>();
    List<String> accIds = new List<String>();
    //20221014 yc 医院审批优化 start
@@ -10,7 +8,6 @@
    //20221014 yc 医院审批优化 end
    // LHJ CHAN-BCLD4P 20190618 Start
    List<String> specIds = new List<String>();
    List<String> specDelIds = new List<String>();
    // LHJ CHAN-BCLD4P 20190618 End
    // MZY SWAG-BXXBKA  2021-02-19 start
@@ -50,13 +47,17 @@
    //CHAN-BCNCRB ---XHL----End-----
    if (Trigger.isAfter && Trigger.isInsert) {
        List<Id> idList = new List<Id>();
        for (ContentDocumentLink link : Trigger.new) {
            ContentVersion version = [select Id,Title from ContentVersion where ContentDocumentId =: link.ContentDocumentId];
            idList.add(link.ContentDocumentId);
        }
        List<ContentVersion> version = [select Id,Title from ContentVersion where ContentDocumentId in: idList];
        for (ContentDocumentLink link : Trigger.new) {
            //if (att.Name.toUpperCase() == '合同书.PDF' && String.valueOf(att.ParentId).startsWith('a0t')) {
            // 添付した契約書のファイル名は指定できない
            if (String.valueOf(link.LinkedEntityId).startsWith('a2K')) {
                rentalIds.add(link.LinkedEntityId);
                attIds.add(version.Id);
                attIds.add(version[0].Id);
            }
            if (String.valueOf(link.LinkedEntityId).startsWith('a0t')) {
                rentalApplyIds.add(link.LinkedEntityId); 
@@ -69,6 +70,7 @@
                accAppIds.add(link.LinkedEntityId);
            }
            //20221014 yc 医院审批优化 end
            System.debug(link.LinkedEntityId +'陈京武');
            if(String.valueOf(link.LinkedEntityId).startsWith(System.Label.Oppor_sepKey)){
                OpporFileIds.add(link.LinkedEntityId);
            }
@@ -81,7 +83,7 @@
            // MZY SWAG-BXXBKA  2021-02-19 start 
            if(String.valueOf(link.LinkedEntityId).startsWith('a3E')){
                opdIds.add(link.LinkedEntityId);
                opdMap.put(link.LinkedEntityId,version.Title);
                opdMap.put(link.LinkedEntityId,version[0].Title);
             }
            // MZY SWAG-BXXBKA  2021-02-19 end
@@ -96,10 +98,10 @@
            if(parentLabel.equals('Rental_Apply_Fault__c')){
                rentalApplyFaultIds.add(link.LinkedEntityId);
                if(trentalImages.containskey(link.LinkedEntityId)){
                    trentalImages.get(link.LinkedEntityId).add(version.Id);
                    trentalImages.get(link.LinkedEntityId).add(version[0].Id);
                }else{
                    List<Id> temp = new List<Id>();
                    temp.add(version.Id);
                    temp.add(version[0].Id);
                    trentalImages.put(link.LinkedEntityId,temp);
                }
            }
@@ -165,13 +167,6 @@
    //2023-2-10  sx备品 备品检测分析报告 end
    if (rentaldelIds.size() > 0) {
        List<Consumable_accessories_invoice__c> rentaldelList = new List<Consumable_accessories_invoice__c>();
        for (Consumable_accessories_invoice__c ra : [select Id from Consumable_accessories_invoice__c where Invoice_code__c in :rentaldelIds and Attachment_ID__c in :attdelIds]) {
            rentaldelList.add(ra);
        }
        ControllerUtil.delConsumableAccessoriesInvoiceSet(rentaldelList);
    }
    
    if (rentalIds.size() > 0) {
        List<Consumable_order__c> rentalList = new List<Consumable_order__c>();
@@ -272,7 +267,12 @@
            //20221207 lt 医院审批优化 end
            
        }
        if (updAccAppList.size() > 0) update updAccAppList;
        try {
            if (updAccAppList.size() > 0) update updAccAppList;
        } catch (Exception e) {
            linkList[0].addError(e.getMessage());
        }
    }
    //20221014 yc 医院审批优化 end
@@ -354,12 +354,13 @@
    if(Trigger.isInsert){
        for(ContentDocumentLink link : Trigger.new){
            if(OpporFileUndeleteMap.containsKey(link.LinkedEntityId)){
                ContentDocument doc = [select Id from ContentDocument where Id =: link.ContentDocumentId];
                doc.addError('备货已审批,不可删除附件');
                // ContentDocument doc = [select Id from ContentDocument where Id =: link.ContentDocumentId];
                link.addError('备货已审批,不可删除附件');
                // link.addError('备货已审批,不可删除附件');
                System.debug(Trigger.isBefore+'陈京武');
                return;
            }else{
                System.debug(Trigger.isBefore+'武');
                DeleteReIds.add(link.LinkedEntityId);
            }
        }
@@ -403,7 +404,10 @@
                ofc.Last_upload_user__c = OppordeleteReUserMap.get(ofc.id);
                System.debug(ofc+'233333333');
            }
            update reDateList;
            if(Trigger.isInsert && Trigger.isAfter){
                update reDateList;
            }
        }
    }else{
        List<Opportunity_File__c> reDateList = [select id,Last_upload_time__c,
@@ -513,16 +517,11 @@
        }                                            
    }
    // DB202304087063 SFDC系统附件上传自动通知功能开发需求 start
    if (Trigger.isInsert && Trigger.isAfter && false) {
        AttachmentReQisHandler handler = new AttachmentReQisHandler();
        handler.run();
    if (Trigger.isInsert && Trigger.isAfter) {
            NotetoPdfHandler handler = new NotetoPdfHandler();
            handler.run();
    }
    // DB202304087063 SFDC系统附件上传自动通知功能开发需求 end
force-app/main/default/triggers/ContentDocumentTrigger.trigger
@@ -1,55 +1,82 @@
trigger ContentDocumentTrigger on ContentDocument (before delete) {
    List<String> rentalIds = new List<String>();
    List<String> attIds = new List<String>();
    if((!Test.isRunningTest())&&UserInfo.getUserId()==System.Label.ByPassTrigger){
        return;
    }
    System.debug('enter ContentDocumentTrigger');
    List<String> rentaldelIds = new List<String>();
    List<String> attdelIds = new List<String>();
    List<String> rentalApplyIds = new List<String>();
    List<String> accIds = new List<String>();
    //20221014 yc 医院审批优化 start
    List<String> accAppIds = new List<String>();
    //20221014 yc 医院审批优化 end
    // LHJ CHAN-BCLD4P 20190618 Start
    List<String> specIds = new List<String>();
    List<String> specDelIds = new List<String>();
    // LHJ CHAN-BCLD4P 20190618 End
    // MZY SWAG-BXXBKA  2021-02-19 start
    List<String> opdIds = new List<String>();
    Map<String,String> opdMap = new Map<String,String>();
    // MZY SWAG-BXXBKA  2021-02-19 end
    List<String> OpporFileIds = new List<String>();
    Map<String,String> OpporFileUndeleteMap = new Map<String,String>();
    List<String> DeleteReIds = new List<String>();
    Map<String,String> OppordeleteReUserMap = new Map<String,String>();
    Map<String,Datetime> OppordeleteReTimeMap = new Map<String,Datetime>();
    //CHAN-BCNCRB ---XHL----Start-----
    List<String> opportunity_FileIds = new List<String>();
    List<String> opportunityFileOrderIds = new List<String>();
    List<String> oFOrderIds = new List<String>();
    Map<String,Boolean> oFOrderIdMap = new Map<String,Boolean>();
    // sx 20230210start 备品借出申请故障报告附件提取
    List<String> rentalApplyFaultIds = new List<String>();
    Map<String,List<Id>> trentalImages = new Map<String,List<Id>>();
    List<String> rentaldeleteApplyFaultIds = new List<String>();
    Map<String,List<Id>> deleteImages = new Map<String,List<Id>>();
    // sx 20230210end 备品借出申请故障报告附件提取
    //deloitte-zhj 发票附件删除 20230901 start
    String invoiceStart = System.Label.invoiceStart;
    List<String> rentaldelIdsZhj = new List<String>();
    List<String> attdelIdsZhj = new List<String>();
    if (Trigger.isBefore && Trigger.isDelete) {
        for (ContentDocument cd : Trigger.old) {
            System.debug('cd.Id = ' + cd.Id);
            List<ContentDocumentLink> cdlList = [SELECT id, LinkedEntityId FROM ContentDocumentLink WHERE ContentDocumentId = :cd.Id];
            System.debug('cdlList = ' + cdlList);
            System.debug('cd.Id = ' + cd.Id);
            for (ContentDocumentLink cdl : cdlList) {
                if (String.valueOf(cdl.LinkedEntityId).startsWith(invoiceStart)) {
                    System.debug('String.valueOf(cdl.LinkedEntityId).startsWith(invoiceStart)');
                    rentaldelIdsZhj.add(cdl.LinkedEntityId);
                    attdelIdsZhj.add(cd.Id);
                }
            }
        }
    }
    if (rentaldelIdsZhj.size() > 0) {
        System.debug('rentaldelIdsZhj = ' + rentaldelIdsZhj);
        System.debug('attdelIdsZhj = ' + attdelIdsZhj);
        List<Consumable_accessories_invoice__c> rentaldelList = new List<Consumable_accessories_invoice__c>();
        for (Consumable_accessories_invoice__c ra : [
            SELECT Id
            FROM Consumable_accessories_invoice__c
            WHERE Invoice_code__c IN :rentaldelIdsZhj AND Attachment_ID__c IN :attdelIdsZhj
        ]) {
            rentaldelList.add(ra);
        }
        System.debug('rentaldelList = ' + rentaldelList);
        ControllerUtil.delConsumableAccessoriesInvoiceSet(rentaldelList);
    }
    //deloitte-zhj 发票附件删除 20230901 end
    //CHAN-BCNCRB ---XHL----End-----
   
    if (Trigger.isBefore && Trigger.isDelete) {
        // List<Attachment> attDeleteList = new List<Attachment>();
        List<ContentDocumentLink> conDeleteList = new List<ContentDocumentLink>();
        List<Id> idList = new List<Id>();
        for (ContentDocument doc : Trigger.old) {
            List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: doc.Id limit 1];
            idList.add(doc.Id);
        }
        List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList limit 1];
        List<ContentVersion> version = [select Id from ContentVersion where ContentDocumentId in: idList];
        for (ContentDocument doc : Trigger.old) {
            //if (att.Name.toUpperCase() == '合同书.PDF' && String.valueOf(att.ParentId).startsWith('a0t')) {
            // 添付した契約書のファイル名は指定できない
            ContentVersion version = [select Id from ContentVersion where ContentDocumentId =: doc.Id];
            if (String.valueOf(link[0].LinkedEntityId).startsWith('a2K')) {
                rentaldelIds.add(link[0].LinkedEntityId);
                attdelIds.add(version.Id);
                attdelIds.add(version[0].Id);
            }
            if(String.valueOf(link[0].LinkedEntityId).startsWith(System.Label.Oppor_sepKey)){
                OpporFileIds.add(link[0].LinkedEntityId);
@@ -69,11 +96,11 @@
            if(parentLabel.equals('Rental_Apply_Fault__c')){
                rentaldeleteApplyFaultIds.add(link[0].LinkedEntityId);
                conDeleteList.add(link[0]);
                if(deleteImages.containskey(version.Id)){
                    deleteImages.get(link[0].LinkedEntityId).add(version.Id);
                if(deleteImages.containskey(version[0].Id)){
                    deleteImages.get(link[0].LinkedEntityId).add(version[0].Id);
                }else{
                    List<Id> temp = new List<Id>();
                    temp.add(version.Id);
                    temp.add(version[0].Id);
                    deleteImages.put(link[0].LinkedEntityId,temp);
                }
            }
@@ -82,10 +109,10 @@
        //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 = '已反馈')];
        for (Rental_Apply_Fault__c raf : rafList) {
            for (ContentDocumentLink link : conDeleteList) {
                if (link.LinkedEntityId == raf.Id) {
                    ContentDocument doc = [select Id from ContentDocument where Id =: link.ContentDocumentId];
                    doc.addError('非草案中的检测分析报告不允许删除已上传的故障图片');
            for (ContentDocumentLink link1 : conDeleteList) {
                if (link1.LinkedEntityId == raf.Id) {
                    // ContentDocument doc = [select Id from ContentDocument where Id =: link.ContentDocumentId];
                    link1.addError('非草案中的检测分析报告不允许删除已上传的故障图片');
                }
            }
        }
@@ -96,22 +123,6 @@
    //20221207 lt 医院审批优化 start
    //2023-2-10  sx备品 备品检测分析报告 start
    if(rentalApplyFaultIds.size() > 0){
        List<Rental_Apply_Fault__c> renList = [SELECT Id,AttachmentId1__c,AttachmentId2__c from Rental_Apply_Fault__c where Id in :rentalApplyFaultIds];
        system.debug('updrentalApplyFaultList====='+renList);
        for(Rental_Apply_Fault__c ren : renList){
            if(trentalImages.containskey(ren.Id)){
                if (ren.AttachmentId1__c == null) {
                    ren.AttachmentId1__c = trentalImages.get(ren.id)[0];
                } else if(ren.AttachmentId2__c == null) {
                    ren.AttachmentId2__c = trentalImages.get(ren.id)[0];
                }
            }
        }
        system.debug('updrentalApplyFaultList====='+renList);
        UPDATE renList;
    }
    if(rentaldeleteApplyFaultIds.size() > 0){
        List<Rental_Apply_Fault__c> renList = [SELECT Id,AttachmentId1__c,AttachmentId2__c from Rental_Apply_Fault__c where Id in :rentaldeleteApplyFaultIds];
@@ -142,157 +153,7 @@
        ControllerUtil.delConsumableAccessoriesInvoiceSet(rentaldelList);
    }
    
    if (rentalIds.size() > 0) {
        List<Consumable_order__c> rentalList = new List<Consumable_order__c>();
        for (Consumable_order__c ra : [select Id from Consumable_order__c where Id in :rentalIds]) {
            ra.Consumable_pdf_insert_day__c = Date.today();
            ra.Order_Attachment__c = attIds[0];
            //ra.Order_status__c = '录入完成';
            //ra.Contract_pdf_updated__c = true;
            rentalList.add(ra);
        }
        ControllerUtil.updRentalApplyList(rentalList);
    }
     if (rentalApplyIds.size() > 0) {
        List<Rental_Apply__c> rentalApplyList = new List<Rental_Apply__c>();
        for (Rental_Apply__c ra : [select Id from Rental_Apply__c where Id in :rentalApplyIds]) {
            ra.Contract_pdf_update_day__c = Date.today();
            ra.Contract_pdf_updated__c = true;
            rentalApplyList.add(ra);
        }
        ControllerUtil.updRentalApplyList(rentalApplyList);
    }
    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.isDelete && (Trigger.isBefore || Trigger.isAfter)){
                        for(ContentDocument doc : Trigger.old){
                            // if(attMap.containsKey(att.ParentID) && acc.Is_Active__c != '草案中'){
                            if(acc.Is_Active__c != '草案中'){
                                doc.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;
    }
    //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<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.isDelete){
                        for(ContentDocument doc : Trigger.old){
                            // if(attMap.containsKey(att.ParentID) && accapp.Is_Active__c != '草案中'){
                            if(accapp.Is_Active__c != '草案中'){
                                doc.addError('非草案中,附件不允许删除。');
                                return;
                            }
                        }
                    }
                    accapp.Is_upload_file__c = attMap.containsKey(accappid);
                    updAccAppList.add(accapp);
                }
            }
            //20221207 lt 医院审批优化 end
        }
        if (updAccAppList.size() > 0) update updAccAppList;
    }
    //20221014 yc 医院审批优化 end
    // LHJ CHAN-BCLD4P 20190618 Start
    if (specIds.size() > 0) {
        Map<String, String> attMap = new Map<String, String>();
        // List<Attachment> attList = [select Id, ParentId from Attachment where ParentId = :specIds order by ParentId];
        List<ContentDocumentLink> linkList = [select LinkedEntityId from ContentDocumentLink where LinkedEntityId =: specIds order by LinkedEntityId];
        for (ContentDocumentLink link : linkList) {
            attMap.put(link.LinkedEntityId, link.LinkedEntityId);
        }
        List<OpportunitySpecialApply__c> updSpecList = new List<OpportunitySpecialApply__c>();
        for (String specId : specIds) {
            OpportunitySpecialApply__c spec = new OpportunitySpecialApply__c(Id = specId);
            spec.Is_upload_file__c = attMap.containsKey(specId);
            updSpecList.add(spec);
        }
        if (updSpecList.size() > 0) update updSpecList;
    }
    // LHJ CHAN-BCLD4P 20190618 End
    
    // MZY SWAG-BXXBKA  2021-02-19 start
    System.debug('SWAG-BXXBKA start');
    if (opdIds.size()>0) {
        List<OPDPlan__c> updateOPDs = new List<OPDPlan__c>();
        OPDPlan__c tempOPD = new OPDPlan__c();
        for (String i :opdIds ) {
            tempOPD.id = i;
            tempOPD.AttachmentCertificate__c = opdMap.get(i);
            updateOPDs.add(tempOPD);
        }
        System.debug('临时OPD :'+tempOPD);
        if (updateOPDs.size()>0){
            update updateOPDs;
        }
    }
    System.debug('SWAG-BXXBKA end');
    // MZY SWAG-BXXBKA  2021-02-19 end
    if(OpporFileIds.size()>0){
        List<Opportunity_File__c> OpporList = [select id,Last_upload_time__c,
@@ -323,8 +184,12 @@
    if(Trigger.isDelete && Trigger.isBefore){
        List<Id> idList = new List<Id>();
        for(ContentDocument doc : Trigger.old){
            List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: doc.Id];
            idList.add(doc.Id);
        }
        List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId in: idList];
        for(ContentDocument doc : Trigger.old){
            if(OpporFileUndeleteMap.containsKey(link[0].LinkedEntityId)){
                doc.addError('备货已审批,不可删除附件');
                return;
@@ -333,10 +198,15 @@
        }
    }
    if(Trigger.isDelete && Trigger.isAfter){
        List<Id> idList = new List<Id>();
        for(ContentDocument doc : Trigger.old){
            List<ContentDocumentLink> link = [select LinkedEntityId from ContentDocumentLink where ContentDocumentId =: doc.Id];
            idList.add(doc.Id);
        }
        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)){
                doc.addError('备货已审批,不可删除附件');
                link[0].addError('备货已审批,不可删除附件');
                return;
            }else{
                DeleteReIds.add(link[0].LinkedEntityId);
@@ -403,72 +273,6 @@
        }
    }
    
    //CHAN-BCNCRB ---XHL----Start-----
    if (opportunity_FileIds.size() > 0) {
        List<Opportunity_File__c> opporList = [select id,Last_upload_time__c,
                                                            Is_Locked__c,
                                                            Last_upload_user__c,
                                                            Stock_apply_time__c,
                                                            Oppor_File_Stage__c
                                                        from Opportunity_File__c
                                                        where id in:opportunity_FileIds And Oppor_File_Stage__c = 'G'];
        List<String>  ofIds = new  List<String>();
        if (opporList.size() > 0) {
            for (Opportunity_File__c oppf : opporList) {
                ofIds.add(oppf.Id);
            }
            if (ofIds.size() > 0 ) {
                //  List<Attachment> atcList = [select id,ParentId,createddate,createdbyid from Attachment where ParentId in:ofIds];
                List<ContentDocumentLink> linkList = [select ContentDocumentId from ContentDocumentLink where LinkedEntityId in: ofIds];
                List<Id> idList = new List<Id>();
                for (ContentDocumentLink link : linkList) {
                    idList.add(link.ContentDocumentId);
                }
                List<ContentDocument> docList = [select Id from ContentDocument where Id in: idList];
                if (docList.size() > 0) {
                    delete docList;
                }
            }
        }
    }
    //CHAN-BCNCRB ---XHL----End-----
    if (opportunityFileOrderIds.size() > 0) {
        List<OpportunityFileOrder__c> ofoList = [select id,
                                                            OpporFileStage__c
                                                        from OpportunityFileOrder__c
                                                        where Id in:opportunityFileOrderIds And OpporFileStage__c = 'G'];
        List<String>  ofoIds = new  List<String>();
        if (ofoList.size() > 0) {
            for (OpportunityFileOrder__c ofo : ofoList) {
                ofoIds.add(ofo.Id);
            }
            if (ofoIds.size() > 0 ) {
                //  List<Attachment> atcList = [select id,ParentId,createddate,createdbyid from Attachment where ParentId in:ofoIds];
                List<ContentDocumentLink> linkList = [select ContentDocumentId from ContentDocumentLink where LinkedEntityId in:ofoIds];
                List<Id> idList = new List<Id>();
                for (ContentDocumentLink link : linkList) {
                    idList.add(link.ContentDocumentId);
                }
                List<ContentDocument> docList = [select Id from ContentDocument where Id in: idList];
                if (docList.size() > 0) {
                    delete docList;
                }
            }
        }
    }
    if (oFOrderIdMap.size() > 0) {