unknown
2023-08-23 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6
Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
96个文件已修改
61个文件已添加
15733 ■■■■ 已修改文件
force-app/main/default/classes/ESignController.cls 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/EquipmentRentalCancelController.cls 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/EquipmentRentalCancelController.cls.bak 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/EquipmentSetShippmentReceived4Controller.cls 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureRentalPDFController.cls.bak 833 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureSetDetailHandler.cls 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureSetDetailHandler.cls.bak 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureSetHandler.cls 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureSetHandler.cls.bak 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MainFixtureSelectController.cls 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MainFixtureSelectController.cls.bak 2259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewLeadFromContact2.cls 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NewLeadFromContact2.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SetFrameNumManageWebService.cls 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SetFrameNumManageWebService.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/TenderingButtonController.cls 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexBatchSelectRepairLWCController.cls 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexBatchSelectRepairLWCControllerTest.cls 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexBatchSelectRepairLWCControllerTest.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/components/RelationListPagingCmp.component 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/components/RelationListPagingCmp.component.bak 483 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.html 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.js 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.js-meta.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromAccount/lexConsumApply_FromAccount.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromAccount/lexConsumApply_FromAccount.js-meta.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.js 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromOPDPlan/lexConsumApply_FromOPDPlan.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromOPDPlan/lexConsumApply_FromOPDPlan.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromQIS/lexConsumApply_FromQIS.js 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromQIS/lexConsumApply_FromQIS.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.js 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexConsumFixtureSetSelect/lexConsumFixtureSetSelect.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.html 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.js 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexEquipmentRentalApply_FromQIS2/lexEquipmentRentalApply_FromQIS2.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexEquipmentRentalApply_FromQIS2/lexEquipmentRentalApply_FromQIS2.js 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.css 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.js 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.js 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.js 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.html 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AgencyGoTo.page 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AgencyGoTo.page-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Agencytransfer.page 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Agencytransfer.page-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/BusinessCenter.page 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/BusinessCenter.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/BusinessManagements.page 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumApplySplit.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumAssignCancel.page 206 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumDefaultSelect.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumEquipmentSetReceived.page 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumEquipmentSetReturn.page 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumFixtureSetSelect.page 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumReassign.page 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumSelect.page 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumTrial.page 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumTrialDis.page 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumTrialUpdate.page 740 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ConsumUploadPicture.page 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CustomPageItem.page 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CustomPageItem.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/DealerEnquiry.page 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/DealerEnquiry.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentManage.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentRentalResponsePopUp.page 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived1.page 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived2.page 118 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived3.page 1112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived4.page 538 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived5.page 261 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/EquipmentSetShippmentReceived6.page 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/FixtureSetManage.page 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Lost_Return_DeliverySlip.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MainFixtureSelect.page 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MainFixtureSelect.page.bak 695 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NotReceivingNoteListFirst.page 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/NotReceivingNoteWaitingReceipt.page 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/QueuePageByAssetId.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/QueuePageByAssetId.page.bak 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReantalApplySeriesNo.page 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReantalApplySeriesNo.page.bak 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteAcceptance.page 183 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteDetailSelect.page 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteExamination.page 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteList.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteListFirst.page 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNotePDF.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteQRScan.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteStockIn.page 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteStockInRequest.page 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteSummarySelect.page 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ReceivingNoteWaitingReceipt.page 227 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalAgencyReceived.page 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplyCancel.page 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplyExtensions.page 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplyExtensions.page.bak 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplyJump.page 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplyList.page 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplySequence.page 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplySequence.page.bak 452 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplySplit.page 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalApplySplit.page.bak 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalFixtureSetAssign.page 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalFixtureSetAssign.page.bak 642 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalFixtureSetAssignAgency.page 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak 558 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalTransfer.page 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/RentalTransfer.page-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ServiceList.page 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/ServiceList.page-meta.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived1.page 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived2.page 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived3.page 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived4.page 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived5.page 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/TransferShippmentReceived6.page 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/ConsumTrialPageCss.css 118 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/ReceivingNotePageCss.css 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/ReceivingNotePageCss.css.bak 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RelationListPagingCmpCss.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RelationListPagingCmpJS.js 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/StyleUtilCss.css 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/StyleUtilCss.css.bak 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/TransferShippmentReceivedcss.css 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ESignController.cls
@@ -1,9 +1,16 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-17 10:21:05
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-07 19:44:59
 *
 */
public class ESignController {
    @AuraEnabled
    public static InitData ESignController (String recordId){
        InitData res = new initData();
        try{
            eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c,agencyAutoSignUpStatus__c,agencySignUpDate__c  FROM eSignForm__c WHERE Id = :recordId LIMIT 1];
            eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c,agencyAutoSignUpStatus__c,agencySignUpDate__c,Statu_Achievements_DN__c  FROM eSignForm__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.GrouppurchasePCL = report.Group_purchase_PCL__c;
            res.OCMManProvinceCus = report.OCM_man_province_cus__c;
@@ -16,6 +23,7 @@
            res.userId = UserInfo.getUserId();
            res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
            res.OBA4_sinFor = getProfileIdByName(LightingButtonConstant.OBA4_sinFor);
            res.StatuAchievementsDNId = report.Statu_Achievements_DN__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -75,5 +83,7 @@
        public String systemProfileId;
        @AuraEnabled
        public String OBA4_sinFor;
        @AuraEnabled
        public String StatuAchievementsDNId;
    }
}
force-app/main/default/classes/EquipmentRentalCancelController.cls
@@ -141,7 +141,10 @@
            //}
            if (line.isSelect == true) {
                Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c();
                upd = line.raes;
                // 20230706 ljh DB202306220097 start
                // upd = line.raes;
                upd.Id = line.raes.Id;
                // 20230706 ljh DB202306220097 end
                upd.Cancel_Select__c = true;
                upd.Cancel_Date__c = Date.today();
                upd.Cancel_Time__c = MainFixtureSelectController.getCurrentTime();
force-app/main/default/classes/EquipmentRentalCancelController.cls.bak
New file
@@ -0,0 +1,241 @@
//TestClass: RentalFixtureManage5Test, RentalFixtureManage2Test
public with sharing class EquipmentRentalCancelController {
    // 备品申请书
    public Rental_Apply__c rentalApply { get; set; }
    // 明细行项目
    public List<LineInfo> lineInfoList { get; set; }
    //备品申请书ID
    public String rentalApplyId { get; private set; }
    public Boolean hasError { get; private set; }
    public Boolean saveBtn { get; private set; }
    //现有备品数量(基于备品一览数量)
    public Integer EquipmentSetCnt{get;set;}
    public EquipmentRentalCancelController() {
        //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
        rentalApplyId = ApexPages.currentPage().getParameters().get('raid');
    }
    // 画面初始化
    public PageReference init() {
        saveBtn = false;
        hasError = false;
        rentalApply = new Rental_Apply__c();
        lineInfoList = new List<LineInfo>();
        if (rentalApplyId != null && rentalApplyId.length() > 0) {
            // 备品借出申请取得
            List<Rental_Apply__c> raList = [
                select Id, Status__c, RA_Status__c
                  from Rental_Apply__c
                 where Id = :rentalApplyId];
            if (raList.size() > 0) {
                rentalApply = raList[0];
            } else {
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '备品申请书不存在,请确认。'));
                saveBtn = true;
                return null;
            }
        } else {
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '备品申请书不存在,请确认。'));
            saveBtn = true;
            return null;
        }
        // 备品借出备品set一览取得
        List<Rental_Apply_Equipment_Set__c> raesList = [
            select id, Name, Fixture_Set__c, Fixture_Set__r.Name, Fixture_Set__r.Loaner_code__c, RAES_Status__c, Rental_Start_Date__c, Final_reply_day__c, Yi_StockDown__c,
                   StockDown_time__c, Shippment_loaner_time2__c, Cancel_Select__c, Cancel_Reason__c, Cancel_Mem__c, Loaner_cancel_Remarks__c, Fixture_Set__r.Loaner_name__c,
                   First_RAESD__r.Asset__c,Loaner_cancel_reason__c //20210708 SFDC-C448KZ you start
              from Rental_Apply_Equipment_Set__c
             where Rental_Apply__c = :rentalApply.Id
               and Cancel_Select__c = false
               and Yi_loaner_arranged__c = 0];
        if (raesList.size() == 0) {
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '备品申请书未分配明细,不能取消分配。'));
            saveBtn = true;
            return null;
        }else{
            EquipmentSetCnt = raesList.size();
        }
        // 明细行做成
        for (Rental_Apply_Equipment_Set__c raes : raesList) {
            LineInfo lineInfo = new LineInfo(raes);
            lineInfoList.add(lineInfo);
        }
        return null;
    }
    // 保存按钮
    // https://sohobb.backlog.jp/view/OLY_OCM-152#comment-20041467
    // TODO OLY_OCM-206 select from 一対一Link, 把 分配数 清 0
    public PageReference saveBtn() {
        List<Rental_Apply_Equipment_Set__c> delList = new List<Rental_Apply_Equipment_Set__c>();
        List<Rental_Apply_Equipment_Set__c> updList = new List<Rental_Apply_Equipment_Set__c>();
        Set<Id> esIdSet = new Set<Id>();
        // 明细行check
        Integer cntSelect = 0;
        hasError = false;
        for (LineInfo line : lineInfoList) {
            if (line.isSelect == true) {
                // 入力規則を利用した
                //String reason = line.raes.Cancel_Reason__c;
                //if (line.status == 'canCancel' && (reason == null || reason.length() == 0)) {
                //    line.raes.Cancel_Reason__c.addError('必须输入取消理由。');
                //    hasError = true;
                //}
                //20210708 SFDC-C448KZ you start
                if (String.isBlank(line.raes.Cancel_Reason__c)) {
                      line.raes.Cancel_Reason__c.addError('请输入取消理由');
                      hasError = true;
                  }
                  if (String.isBlank(line.raes.Loaner_cancel_reason__c)) {
                      line.raes.Loaner_cancel_reason__c.addError('请输入一览取消理由');
                      hasError = true;
                  }
                  if (String.isNotBlank(line.raes.Loaner_cancel_reason__c) && line.raes.Loaner_cancel_reason__c=='其他' && String.isBlank(line.raes.Loaner_cancel_Remarks__c)) {
                     line.raes.Loaner_cancel_Remarks__c.addError('请输入取消理由备注');
                      hasError = true;
                  }
                //20210708 SFDC-C448KZ you end
                cntSelect += 1;
            }
        }
        if (cntSelect == 0) {
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '未选择取消分配的明细。'));
            hasError = true;
        }
        if (hasError == true) {
            system.debug('=====hasError');
            return null;
        }
        Set<Id> raesdIdSet = new Set<Id>();
        // 保存逻辑
        for (LineInfo line : lineInfoList) {
            //if (line.isSelect == true && line.status == 'canCancel') {
            //    Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c(Id = line.raes.Id);
            //    // delList.add(del);
            //    // esIdSet.add(line.raes.Fixture_Set__c);
            //    upd.Cancel_Select__c = true;
            //    upd.Cancel_Date__c = Date.today();
            //    upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
            //    upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c;
            //    updList.add(upd);
            //}
            //if (line.isSelect == true && line.status == 'OnStock_Pre_Inspection') {
            //    Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c(Id = line.raes.Id);
            //    //upd.OnStock_Pre_Inspection__c = true;
            //    upd.Cancel_Select__c = true;
            //    upd.Cancel_Date__c = Date.today();
            //    upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
            //    upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c;
            //    updList.add(upd);
            //    //esIdSet.add(line.raes.Fixture_Set__c);
            //}
            if (line.isSelect == true) {
                Rental_Apply_Equipment_Set__c upd = new Rental_Apply_Equipment_Set__c();
                upd = line.raes;
                upd.Cancel_Select__c = true;
                upd.Cancel_Date__c = Date.today();
                upd.Cancel_Time__c = MainFixtureSelectController.getCurrentTime();
                upd.Cancel_Reason__c = line.raes.Cancel_Reason__c;
                //20210708 SFDC-C448KZ you start
                upd.Loaner_cancel_reason__c = line.raes.Loaner_cancel_reason__c;
                upd.Loaner_cancel_Remarks__c = line.raes.Loaner_cancel_Remarks__c==null ? line.raes.Loaner_cancel_reason__c : line.raes.Loaner_cancel_Remarks__c;
                //20210708 SFDC-C448KZ you end
                if (String.isNotBlank(upd.First_RAESD__r.Asset__c)) {
                    raesdIdSet.add(upd.First_RAESD__r.Asset__c);
                }
                updList.add(upd);
            }
        }
        // 保存
        Savepoint sp = Database.setSavepoint();
        try {
            // if  (   delList.size()  >   0   )   delete  delList;
            if (!raesdIdSet.isEmpty()) {
                List<Fixture_OneToOne_Link__c> fotos = [Select Id From Fixture_OneToOne_Link__c
                        Where Main_Asset__c =: raesdIdSet
                        for update];
                if (!fotos.isEmpty()) {
                    for (Fixture_OneToOne_Link__c foto : fotos) {
                        foto.Select_Accessory_Asset_Cnt__c = 0;
                    }
                    FixtureUtil.withoutUpdate(fotos);
                }
            }
            if  (   updList.size()  >   0   ) {
                Set<Id> assetIdSet = new Set<Id>();
                for (Rental_Apply_Equipment_Set_Detail__c raesd : [SELECT Id, Asset__c
                                                                     FROM Rental_Apply_Equipment_Set_Detail__c
                                                                    WHERE Rental_Apply_Equipment_Set__c = :updList FOR UPDATE]
                ) {
                    if (String.isNotBlank(raesd.Asset__c)) {
                        assetIdSet.add(raesd.Asset__c);
                    }
                }
                if (assetIdSet.size() > 0) {
                    List<Asset> assetList = [SELECT Id
                             FROM Asset
                            WHERE Id = :assetIdSet FOR UPDATE];
                }
                FixtureUtil.withoutUpdate(updList);
            }
            // system.debug(EquipmentSetCnt+'2223333'+updList.size()   );
            // if  ((  updList.size()  ==  EquipmentSetCnt ||
            //         delList.size()  ==  EquipmentSetCnt ||
            //         delList.size()  +   updList.size()  ==  EquipmentSetCnt )
            //         &&  EquipmentSetCnt !=  0
            //         &&  (   rentalApply.Status__c =='引当完了'
            //             ||  rentalApply.Status__c =='出库指示完了'      )){
            //     Rental_Apply__c RaUpdate    =   new Rental_Apply__c();
            //     RaUpdate.id =   rentalApplyId;
            //     RaUpdate.Status__c  =   '已批准';
            //     update  RaUpdate;
            // }
//bp2            ControllerUtil.setEquipmentSetProvisionFlg(esIdSet);
        }   catch (Exception ex)    {
            system.debug('=====' + ex.getMessage());
            hasError = true;
            ApexPages.addMessages(ex);
            Database.rollback(sp);
            return null;
        }
        return null;
    }
    @TestVisible
    class LineInfo {
        // 选择
        public boolean isSelect { get; set; }
        // 借出备品set一览
        public Rental_Apply_Equipment_Set__c raes { get; set; }
        // 状态:可以删除、可以取消、不能取消
        //public String status { get; private set; }
        public String esName { get; private set; }
        public String loanerCode { get; private set; }
        public LineInfo(Rental_Apply_Equipment_Set__c r) {
            isSelect = false;
            raes = r;
            loanerCode = r.Fixture_Set__r.Loaner_name__c;
            ////cancel
            //if (r.Yi_StockDown__c > 0) {
            //    status = 'canCancel';
            ////下架以后改成待上架的checkbox
            ////cancel
            //} else {
            //    status = 'OnStock_Pre_Inspection';
            //}
            esName = r.Fixture_Set__r.Name;
        }
    }
}
force-app/main/default/classes/EquipmentSetShippmentReceived4Controller.cls
@@ -549,11 +549,14 @@
            }
            searchSlip();
            if (!showTab2) {
                done_flg = true;
            } else {
                done_flg = false;
            }
            // 20230722 ljh
            // if (!showTab2) {
            //     done_flg = true;
            // } else {
            //     done_flg = false;
            // }
            done_flg = true;
            // 20230722 ljh
        } catch (Exception ex) {
            system.debug('=====' + ex.getMessage());
            String msg = ex.getMessage();
force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls
@@ -123,8 +123,9 @@
                select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
                       Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
                       Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c
                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name,
                       Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c,
                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c
                  from Rental_Apply_Equipment_Set_Detail__c
                 where Rental_Apply_Equipment_Set__c in :esIds
                   and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '修理完毕')
@@ -232,6 +233,17 @@
        // 回库はSet単位で、明細一つ一つのquickCheck要らない
        public boolean quickCheck { get; set; }
        public boolean editable { get; set; }
        // 备品借出申请故障报告 按钮显示逻辑
        public boolean showFaultRepor { get; set;}
        public String faultReportFlag { get; set;}
        public String personInChargeId { get; set;}
        public String personInChargeName { get; set;}
        public String demoPurpose2 { get; set;}
        public String raName { get; set;}
        public String hospitalId { get; set;}
        public String hospitalName { get; set;}
        public String workPlace { get; set;}
        public String deptCategory { get; set;}
        public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) {
            this.rec = rec;
@@ -249,6 +261,28 @@
            if (rec.Asset__r.ImageSerialUploadedTime__c != null) {
                imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm');
            }
            //当明细 设备为主体 且 NG时 显示按钮
            if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){
                showFaultRepor = true;
            }
            List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1];
            if( rafList != null && rafList.size() > 0 ){
                this.faultReportFlag = rafList[0].Id;
            }else {
                this.faultReportFlag = '不存在故障报告单';
            }
            personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c;
            personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name;
            demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c;
            raName = rec.Rental_Apply__r.Name;
            hospitalId = rec.Rental_Apply__r.Hospital__c;
            hospitalName = rec.Rental_Apply__r.Hospital__r.Name;
            workPlace = rec.Rental_Apply__r.WorkPlace__c;
            deptCategory = rec.Rental_Apply__r.OCM_dept_category__c;
        }
    }
}
force-app/main/default/classes/EquipmentSetShippmentReceived5Controller.cls.bak
New file
@@ -0,0 +1,254 @@
// xudan 20160106 Arrival_wh_time__c -> Arrival_wh_time2__c(回库はSet単位なので、積み上げ項目使わず)
public without sharing class EquipmentSetShippmentReceived5Controller {
    public Rental_Apply_Equipment_Set__c es { get; set; }
    public String crossRegion {get;set;}
    private Map<String, String> roleRegionMap {get;set;}
    public List<EsdInfo> esdList { get; set; }
    public boolean done_flg {get;set;}
    public Boolean saveBtnDisabled { get; private set; }
    public boolean ReturnRefuse {get;private set;}
    public String ErrorMessage {get; set;}
    public String CDSFinished {get;set;}
    public boolean LostFlg {get;set;}
    public String SR_status { get; private set; }
    public String Step_status { get; private set; }
    public Boolean needCDS { get; private set; }
    public String open_type { get; private set; }
    public String Raid {get;set;}
    private String Id;
    public Integer getEsdListSize() {
        return esdList.size();
    }
    public EquipmentSetShippmentReceived5Controller() {
//        Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
        Id = ApexPages.currentPage().getParameters().get('id');
        if (SR_status == null) {
            SR_status = ApexPages.currentPage().getParameters().get('type');
        }
        if (Step_status == null) {
            Step_status = ApexPages.currentPage().getParameters().get('step');
        }
        if (open_type == null) {
            open_type = ApexPages.currentPage().getParameters().get('open');
        }
        roleRegionMap = new Map<String, String> {
            '备品中心北方管理成员' => '北京 备品中心',
            '备品中心华东管理成员' => '上海 备品中心',
            '备品中心南方管理成员' => '广州 备品中心'
        };
    }
    // 画面初始化
    public PageReference init() {
        done_flg = false;
        es = new Rental_Apply_Equipment_Set__c();
        esdList = new List<EsdInfo>();
        Set<Id> esIds = new Set<Id>();
        saveBtnDisabled = false;
        ReturnRefuse = true;
        ErrorMessage = '';
        crossRegion = '';
        if (Id != null) {
            List<String> ids = Id.split(',');
            // 当前User
            String userid = Userinfo.getUserId();
            User user = [select Id,Name,UserRole.Name from User where Id = :userid];
            // 备品set
            List<Rental_Apply_Equipment_Set__c> esList = [select Rental_Apply__c, Id, RAES_Status__c, Name, Shippment_loaner_time2__c
                                                               , Rental_Apply__r.Cross_Region_Assign__c
                                            from Rental_Apply_Equipment_Set__c
                                           where (Rental_Apply__r.Name in :ids or Id in :ids)
                                             //and Cancel_Select__c = False
                                             ];
            //List<Fixture_Set__c> esList = [select Id, Name, CDS_staff__c, Shippment_loaner_time__c, Received_loaner_time__c,
            //                                       delivery_company__c, Return_to_wh_staff__c, Return_to_wh_staff__r.Name, Fedex_number__c, Distributor_method__c,
            //                                       Return_delivery_company__c,Return_wh_chenk_staff__c, Received_confirmation_staff__c, Received_confirmation_staff__r.Name, Return_Fedex_number__c, Return_Distributor_method__c,
            //                                       Arrival_wh_time2__c, Asset_return_time__c,
            //                                       CDS_complete__c, Arrival_in_wh__c, StockDown__c,
            //                                       Lost_item_check_time__c,Last_Reserve_Rental_Apply_Fixture_Set__c,
            //                                       StockDown_time__c
            //                                  from Fixture_Set__c where Name = :Id];
            if (esList.size() > 0) {
                //es = esList[0];
                for (Rental_Apply_Equipment_Set__c raes : esList) {
                    esIds.add(raes.Id);
                    Raid = raes.Rental_Apply__c;
                    if(String.isNotBlank(raes.Rental_Apply__r.Cross_Region_Assign__c)){
                        crossRegion = raes.Rental_Apply__r.Cross_Region_Assign__c;
                        if(roleRegionMap.containsKey(user.UserRole.Name)
                            && roleRegionMap.get(user.UserRole.Name) == raes.Rental_Apply__r.Cross_Region_Assign__c) {
                                crossRegion = '';
                        }
                    }
                }
            } else {
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '备品不存在'));
                saveBtnDisabled = true;
                return null;
            }
            //检查验证规则修理最终检测日
            /*   todo
            List<Rental_Apply_Equipment_Set__c> CheckRAES = [select id,Name,RAES_Status__c,Rental_Apply__c,Rental_Apply__r.Repair__c,Cancel_Date__c,Fixture_Set__c
                    from Rental_Apply_Equipment_Set__c where id=:es.Last_Reserve_Rental_Apply_Equipment_Set__c];
            Rental_Apply_Equipment_Set__c Ra_c = new Rental_Apply_Equipment_Set__c();
            Rental_Apply__c Rac = new Rental_Apply__c();
            if(CheckRAES.size()>0){
                Ra_c = CheckRAES[0];
                Raid = Ra_c.Rental_Apply__c;
            }
            system.debug(Ra_c.Rental_Apply__r.Repair__c );
            List<Rental_Apply__c> CheckError = new List<Rental_Apply__c>();
            CheckError = [Select id,name,repair__c,repair__r.Return_Without_Repair_Date__c,repair__r.Repair_Final_Inspection_Date__c,repair__r.Repair_Shipped_Date__c,
                                Campaign__c,Campaign__r.Status
                                            from Rental_Apply__c where id=:Ra_c.Rental_Apply__c
                                            and RA_Status__c !='取消'
                                            and RA_Status__c !='删除'];
            if(CheckError.size()>0){
                Rac = CheckError[0];
            }
            */
            //system.debug('All::::'+Rac.repair__r.Repair_Final_Inspection_Date__c);
            // system.debug('All::::'+Rac.repair__c);
            //  system.debug('All::::'+Ra_c.RAES_Status__c);
            // 本番暂不上线该功能,启用后不能入库操作感觉不对
        }
        // 备品set明细
        List<Rental_Apply_Equipment_Set_Detail__c> eList = [
                select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c,
                       Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c,
                       Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c,
                       Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c,
                       Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c
                  from Rental_Apply_Equipment_Set_Detail__c
                 where Rental_Apply_Equipment_Set__c in :esIds
                   and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '修理完毕')
                 order by Rental_Apply_Equipment_Set__r.Name, Rental_Apply_Equipment_Set__c, Name
        ];
        for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
            EsdInfo ei = new EsdInfo(esd);
            if ((esd.Check_lost_Item_F__c == 'OK' || esd.Repair_Status_F__c == '修理完毕')
                    && !esd.Arrival_in_wh__c) {
                ei.editable = true;
            }
            esdList.add(ei);
        }
        if (esdList.size() <= 0) {
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '没有备品set明细'));
            saveBtnDisabled = true;
            return null;
        }
        Step_status = '回收后检测';
        SR_status = 'Shippment';
        system.debug('=====' + Step_status);
        system.debug('=====' + open_type);
        return null;
    }
    // Step 切り替えボタン、发货前-检测
    public PageReference Shippment1() {
        Step_status = '发货前';
        return new PageReference('/apex/EquipmentSetShippmentReceived2?id=' + this.Id + '&type=' + this.SR_status + '&step=' + this.Step_status + '&open=' + this.open_type);
    }
    // Step 切り替えボタン、发货-发货运输单号 等
    public PageReference Shippment2() {
        Step_status = '发货';
        return new PageReference('/apex/EquipmentSetShippmentReceived6?id=' + this.Id);
    }
    // 保存按钮
    public PageReference save() {
        String userid = Userinfo.getUserId();
        List<Rental_Apply_Equipment_Set_Detail__c> eList = new List<Rental_Apply_Equipment_Set_Detail__c>();
        for (EsdInfo esdInfo : esdList) {
            Rental_Apply_Equipment_Set_Detail__c esd = esdInfo.rec;
            if (esdInfo.editable) {
                eList.add(esd);
            }
        }
        Boolean needSaveSet = false;
        Boolean needSaveDetail = false;
        // TODO 没变化不存
        if (Step_status == '回收后检测') {
            for (Rental_Apply_Equipment_Set_Detail__c esd : eList) {
                if (String.isNotBlank(esd.Inspection_result_after_Final__c)) {
                    //esd.After_Inspection_time_Final__c = System.now();
                    //esd.Inspection_staff_After_Final__c = userid;
                } else {
                    esd.After_Inspection_time_Final__c = null;
                    esd.Inspection_staff_After_Final__c = null;
                    if (String.isNotBlank(esd.Inspection_result_after__c)) {
                        //esd.After_Inspection_time__c = System.now();
                        //esd.Inspection_staff_After__c = userid;
                    } else {
                        esd.After_Inspection_time__c = null;
                        esd.Inspection_staff_After__c = null;
                    }
                }
            }
            needSaveDetail = true;
        }
        Savepoint sp = Database.setSavepoint();
        try {
            //if (needSaveSet) ControllerUtil.upRAdEquipmentSet(es);
            //if (needSaveDetail) ControllerUtil.updRAEquipmentSetDetail(eList);
            if (needSaveDetail) FixtureUtil.withoutUpsertObjects(eList);
            //PageReference ref = new Pagereference('/apex/EquipmentSetShippmentReceived5?id=' + Id + '&type=' + SR_status + '&step=' + this.Step_status + '&open=' + this.open_type);
            //ref.setRedirect(true);
            //return ref;
            done_flg = true;
            return null;
        } catch (Exception ex) {
            system.debug('=====' + ex.getMessage());
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getDmlMessage(0)));
            //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ex.getDmlMessage(0)+'( '+Step_status+' )'));
            Database.rollback(sp);
            done_flg = false;
            return null;
        }
        return null;
    }
    public class EsdInfo {
        public Rental_Apply_Equipment_Set_Detail__c rec { get; set; }
        public String imageAssetUploadedTime { get; set; }
        public String imageSerialUploadedTime { get; set; }
        // 回库はSet単位で、明細一つ一つのquickCheck要らない
        public boolean quickCheck { get; set; }
        public boolean editable { get; set; }
        public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) {
            this.rec = rec;
            this.editable = false;
            if (rec.Asset__r.Pre_Reserve_RAES_Detail__c != null && rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c != null) {
                this.quickCheck = Datetime.now() < rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c + 30 ? true : false;
            } else {
                this.quickCheck = false;
            }
            if (rec.Asset__r.ImageAssetUploadedTime__c != null) {
                imageAssetUploadedTime = rec.Asset__r.ImageAssetUploadedTime__c.format('yyyy/MM/dd HH:mm');
            }
            if (rec.Asset__r.ImageSerialUploadedTime__c != null) {
                imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm');
            }
        }
    }
}
force-app/main/default/classes/FixtureRentalPDFController.cls.bak
New file
@@ -0,0 +1,833 @@
public without sharing class FixtureRentalPDFController {
    private static Integer MAXLINEHRIGHT = 25;
    private static Integer MAXPAGECOUNT = 22; //32
    private String rentalApplyIdIMG;
    // private String rentalApplyId;//20201120 ljh
    private List<String> rentalApplyId;
    // private List<String> raesidList;  確認
    public List<PDFInfo> records { get; set; }
    public Integer pageCnt { get; set; }
    public Integer pageNum { get; set; }
    public integer AllSum {get;set;}
    public String RentalApplyName  { get; set; }
    public String BorrowTimeString { get; set; }
    public Rental_Apply__c ApplyHeadShow { get; set; }
    public List<lineInfo> DetailsAllList { get; set;}
    public Map<String,String> AssetModelNoMap {get;set;}
    public List<PDFInfoIMG> recordsIMG { get; set; }
    public List<PDFInfoIMG> recordsIMGfist { get; set; }
    public Integer pageCntIMG { get; set; }
    public String headerLength {get;set;}
    public List<List<String>> PageCutList { get; set; }
    public String HospitalName { get; set;}//医疗机构
    public String Shippmentadress { get; set;}//发货地址
    public Integer mainCnt { get; private set;}//主体件数
    public Integer accessoryCnt { get; private set;}//附属品件数
    public String centreAddress { get; set; }
    public Boolean IsShowLU { get; set; } //是否显示签收单左上角文字 true显示 20201119 LJH OCSM_BP5-61 add
    public Boolean IsMain; //是否是现地分配的主单 20201120 LJH OCSM_BP5-61 add
    public string staticResource { get; private set; }
    public string staticResourceFile { get; private set; }
    public Boolean addFlag { get; private set; }//敏感地址使用标记
    public String qrcode { get; private set; }
    public String barcode { get; private set; }
    // 20220413 ljh 抬头显示 add start
    public String AgencyAddressName { get; private set; }
    public Boolean isAgencyOrCenter { get; private set; }
    public String AgencyOrCenterAddress { get; private set; }
    // 20220413 ljh 抬头显示 add end
    public FixtureRentalPDFController() {
        pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page'));
        rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid');
        //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
        // rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh
        String tempStr = ApexPages.currentPage().getParameters().get('raid');
        addFlag = false;
        rentalApplyId = new List<String>();
        if(tempStr != null){
           rentalApplyId.add(tempStr);
        }
        ApplyHeadShow = new Rental_Apply__c();
        IsShowLU = true;//20201119 LJH OCSM_BP5-61 add
        IsMain = false;//20201123 LJH OCSM_BP5-61 add
    }
    // 画面初始化
    public void init() {
        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
        staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
        // 新规奥林巴斯备品签收单PDF画面初始化
        PageCutList = new List<List<String>>();
        List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>();
        Map<String,String>  AgencyAddressIdMap = new Map<String,String>(); //20201124 LJH OCSM_BP5-61 add 出借Id,地址Id
        if(rentalApplyId!=null){
            ApplyList = [select id,
                                name,
                                Name_No__c, // 20211209 ljh SFDC-C923SR add
                                Shippment_loaner_time__c,
                                WorkPlace__c,
                                Salesdept__c,
                                Demo_purpose1__c,
                                Demo_purpose2__c,
                                Bollow_Date__c,
                                Campaign__r.EndDate,
                                Follow_UP_Opp__c,
                                Repair__r.Repair_Shipped_Date__c,
                                Return_dadeline_final__c,
                                Shipment_address__r.Post_Code__c,
                                Person_In_Charge__r.Name,Post_Code__c,
                                Shippment_adress_detail__c,
                                Person_In_Charge__r.Phone,
                                Phone_number__c,
                                Hospital__r.Name,Account__r.Department_name__c,
                                Account__r.Name,
                                Direct_shippment_address__c,
                                Dealer__r.Postal_Code__c,
                                ApplyUser__r.Name,
                                applyUser__r.Phone,
                                Loaner_medical_Staff__r.Name,
                                Loaner_medical_Staff__r.Phone,
                                Loaner_received_staff__c,
                                Loaner_received_staff_phone__c,
                                Asset_loaner_start_date__c,
                                Asset_loaner_start_day__c,
                                ApplyPerson_Phone__c,
                                Loaner_centre_mail_address__c,
                              // Main_Cnt__c,
                              // Accessory_Cnt__c,
                                Old_Rental_Apply__c,//20201120 LJH OCSM_BP5-61 add
                                Split_Apply_Reason__c,//20201120 LJH OCSM_BP5-61 add
                                RecordType.DeveloperName,//20201120 LJH OCSM_BP5-61 add
                                Request_shipping_day__c,//20201120 LJH OCSM_BP5-61 add
                                ToAgency__c,//20201123 LJH OCSM_BP5-61 add
                                Agency_Address_Id__c,//20201124 LJH OCSM_BP5-61 add
                                Root_Rental_Apply__c,//20210617 ljh 1732 add
                                BRId__c, // 20211209 ljh SFDC-C923SR add
                                 direct_send__c,
                                QRImg__c,
                                QRId__c,
                                AWS_Data_Id__c,//20220304
                                Direct_Shippment_Address_Encrypt__c,//20220304
                                Phone_Number_Encrypt__c//20220304
                        from  Rental_Apply__c
                        where id = :rentalApplyId];
        }
        if(ApplyList.size()>0){
            ApplyHeadShow = ApplyList[0];
            qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
            barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
        }
        //增加借出备品SET一览List,为了获取借出备品SET一览明细
        List<String> RAESSearchList = New List<String>();
        //20201201 ljh  OCSM_BP5-76 add start
        String centerAddressInfo;
        bp3_Setting__c conf = bp3_Setting__c.getOrgDefaults();
        //20201201 ljh  OCSM_BP5-76 add end
        //根据备品中心邮箱判断备品中心
        if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_Asset@olympus.com.cn'){
          centreAddress = '请将备品回寄至北京备品中心';
          centerAddressInfo = 'BeiJingCenter';
        }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetSH@olympus.com.cn'){
          centreAddress = '请将备品回寄至上海备品中心';
          centerAddressInfo = 'ShangHaiCenter';
        }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetGZ@olympus.com.cn'){
          centreAddress = '请将备品回寄至广州备品中心';
          centerAddressInfo = 'GuangZhouCenter';
        }
        //20201120 LJH OCSM_BP5-61 add start
        //现地管理分单 主单&从单
        //20210617 ljh 1732 update start
        if(ApplyHeadShow.RecordType.DeveloperName == 'AgencyRequest'){
            //记录类型办事处
            IsShowLU = false;
            String tempStr = ApplyHeadShow.Agency_Address_Id__c;
            if(String.isNotBlank(tempStr)){
                AgencyAddressIdMap.put(ApplyHeadShow.Id,tempStr.substring(0,15));
            }
            if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){
                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where Root_Rental_Apply__c = :ApplyHeadShow.id  and Split_Apply_Reason__c = '现地管理分单']; //20210611 ljh 1732 update Root_Rental_Apply__c
                if(ApplyCopyList.size()>0){
                    for(Rental_Apply__c ac:ApplyCopyList){
                        String tempId = ac.Id;
                        rentalApplyId.add(tempId);
                    }
                }
            }else{
                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where ((Root_Rental_Apply__c = :ApplyHeadShow.Root_Rental_Apply__c and id != :ApplyHeadShow.id and Split_Apply_Reason__c = '现地管理分单')  OR id = :ApplyHeadShow.Root_Rental_Apply__c) ]; //20210611 ljh 1732 update Root_Rental_Apply__c
                if(ApplyCopyList.size()>0){
                    for(Rental_Apply__c ac:ApplyCopyList){
                        String tempId = ac.Id;
                        rentalApplyId.add(tempId);
                    }
                }
            }
        }else{
            if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){
                //是否 现地管理分单 主单
                List<Rental_Apply__c> ApplyCopyList = [select Id, Name from  Rental_Apply__c where Root_Rental_Apply__c = :ApplyList[0].id  and Split_Apply_Reason__c = '现地管理分单']; //20210611 ljh 1732 update Root_Rental_Apply__c
                if(ApplyCopyList.size()>0){
                    IsShowLU = false;
                    IsMain = true;
                    for(Rental_Apply__c ac:ApplyCopyList){
                        String tempId = ac.Id;
                        rentalApplyId.add(tempId);
                    }
                }
            }
        }
        List<Shipment_address__c> ShipmentAddressList = [select Id,Name,Address__c from Shipment_address__c where Id in :AgencyAddressIdMap.values()];
        Map<String,String> ShipmentAddressMap = new Map<String,String>();
        for(Shipment_address__c sa : ShipmentAddressList){
            String tempStr = sa.Id;
            ShipmentAddressMap.put(tempStr.substring(0,15),sa.Address__c);
        }
        Set<String> keySet = AgencyAddressIdMap.keySet();
        for(String ks:keySet){
            AgencyAddressIdMap.put(ks,ShipmentAddressMap.get(AgencyAddressIdMap.get(ks)));
        }
        //20201120 LJH OCSM_BP5-61 add end
        //医疗机构名分行显示
        if(ApplyHeadShow.Hospital__r.Name != null){
            String HospOrgan = ApplyHeadShow.Hospital__r.Name;
            Integer HospSize = HospOrgan == null ? 0 : HospOrgan.length();
            if(HospSize <=19){
                HospitalName = HospOrgan;
            }else{
                HospitalName = HospOrgan.substring(0,19)+'\n'+HospOrgan.substring(19,HospSize);
            }
        }
        //发货地址分行显示
        String ShippMentAdr = null;
        if (ApplyHeadShow.Shippment_adress_detail__c != null) {
            ShippMentAdr = ApplyHeadShow.Shippment_adress_detail__c;
        } else {
            ShippMentAdr = ApplyHeadShow.Direct_shippment_address__c;
            addFlag = true;
        }
        Integer ShipAdrSize = ShippMentAdr == null ? 0 : ShippMentAdr.length();
        if (ShipAdrSize <= 26) {
            Shippmentadress = ShippMentAdr;
        } else if (ShipAdrSize > 26 && ShipAdrSize <= 52) {
            Shippmentadress = ShippMentAdr.substring(0,26)+ '\n' +ShippMentAdr.substring(26,ShipAdrSize);
        } else {
            Shippmentadress = ShippMentAdr.substring(0,26)+'\n'+ShippMentAdr.substring(26,52) + '\n'+ShippMentAdr.substring(52,ShipAdrSize);
        }
        // 增加医院借用期限,输出字段格式化
        if (ApplyHeadShow.Asset_loaner_start_date__c != null) {
            if (ApplyHeadShow.Demo_purpose2__c      == '产品试用'
                ||  ApplyHeadShow.Demo_purpose2__c  ==  '新产品评价'
                ||  ApplyHeadShow.Demo_purpose2__c  ==  FixtureUtil.raDemo_purpose2MAP.get('shiyongwuxunjia')
                ||  ApplyHeadShow.Demo_purpose2__c  ==  FixtureUtil.raDemo_purpose2MAP.get('shiyongyouxunjia')
                ||  ApplyHeadShow.Demo_purpose2__c  ==  '其他'
                ||  ApplyHeadShow.Demo_purpose2__c  ==  '协议借用') {
                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
                                 + String.valueOf(ApplyHeadShow.Return_dadeline_final__c)
                                 + '前到达奥林巴斯备品中心';
            } else if (ApplyHeadShow.Demo_purpose2__c == '学会展会') {
                if (ApplyHeadShow.Campaign__r.EndDate != null){
                    BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
                                     + String.valueOf(ApplyHeadShow.Campaign__r.EndDate.addDays(5))
                                     + '前到达奥林巴斯备品中心';
                                     // 2018年7月31日 SWAG-B36CY6 by 张玉山 start
                    } else if (ApplyHeadShow.Campaign__r.EndDate == null) {
                       // 2018年7月31日 SWAG-B36CY6 by 张玉山 end
                        BorrowTimeString = '学会结束日为空,无法确定医院借用期限';
                    }else{
                        BorrowTimeString = 'ApexClass104:无法获取数据,请联系开发组';
                    }
            } else if (ApplyHeadShow.Demo_purpose2__c == '已购待货') {
                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
                                 + '新品发货日起14天内'
                                 + '到达奥林巴斯备品中心';
            } else if (ApplyHeadShow.Demo_purpose2__c == '故障排查') {
                BorrowTimeString = '判定有故障时,' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c)
                                 + '~修理品返送日起14天内到达奥林巴斯备品中心\n'
                                 + '判定无故障时,' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c)
                                 + '~出库日起10个工作日内到达奥林巴斯备品中心';
            } else if (ApplyHeadShow.Demo_purpose1__c == '维修代用') {
                BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ '
                                 + '修理品返送日起14天内'
                                 + '到达奥林巴斯备品中心';
            } else {
                BorrowTimeString = '未设定归还期限';
            }
        } else {
            BorrowTimeString = '备品预计出货日为空,无法确定医院借用期限';
        }
        system.debug(' ApplyHeadShow.Demo_purpose1__c'+ ApplyHeadShow.Demo_purpose1__c);
        // 增加医院借用期限,输出字段格式化
        // system.debug('测试位置1+raesidList'+raesidList);
        records = new List<PDFInfo>();
        List<Rental_Apply_Equipment_Set__c> raesList = new List<Rental_Apply_Equipment_Set__c>();
        // List<String> esidList = new List<String>();
        //ToDo Where 確認
        String soql =  'select Id, Name, Rental_Apply__c, Fixture_Set__r.Name'
               + ', Rental_Apply__r.Name, Request_owner__c, Rental_Apply__r.Salesdept__c'
               + ', Rental_Apply__r.WorkPlace__c, Account__c, Rental_Apply__r.Campaign__r.Name'
               + ', Rental_Apply__r.Request_shipping_day__c, Rental_Apply__r.Loaner_received_staff__c'
               + ', Rental_Apply__r.Loaner_received_staff_phone__c, Rental_Apply__r.Shippment_adress_detail__c'
               + ', Rental_End_Date__c, Rental_Apply__r.direct_shippment_address__c'
               + ' from Rental_Apply_Equipment_Set__c'
               + ' where Rental_Apply__c = :rentalApplyId'
               + ' AND Cancel_Select__c = false'
               + ' AND Yi_Shipment_request__c > 0';
        //ToDo条件確認
        //soql += 'and RAES_Status__c != \'引当済\' and RAES_Status__c != \'取消分配\'';
        //今回個別の表示はしないのでコメントアウトします
        // if (raesidListIMG.size() > 0) {
        //     soql += ' AND Id in : raesidListIMG ';
        // }
        // if(ApplyHeadShow.Shippment_loaner_time__c != null) {
        //     soql += ' AND Shippment_loaner_time__c != null';
        // }
        soql += ' order by Name';
        raesList = Database.query(soql);
        //20201120 LJH OCSM_BP5-61 add start
        //申请单-申请一览List
        Map<Id,List<Rental_Apply_Equipment_Set__c>> raRaesMap = new  Map<Id,List<Rental_Apply_Equipment_Set__c>>();
        //20201120 LJH OCSM_BP5-61 add end
        if (raesList.size() > 0) {
            for (Rental_Apply_Equipment_Set__c raes : raesList) {
                //ToDo RentalApplyName取り方が変
                //RentalApplyName = raes.Rental_Apply__r.Name;
                //循环获得RAES_id
                RAESSearchList.add(raes.id);
                //20201120 LJH OCSM_BP5-61 add start
                if(!raRaesMap.containsKey(raes.Rental_Apply__c)){
                    raRaesMap.put(raes.Rental_Apply__c,new Rental_Apply_Equipment_Set__c[]{raes});
                }else{
                    raRaesMap.get(raes.Rental_Apply__c).add(raes);
                }
                //20201120 LJH OCSM_BP5-61 add end
            }
            RentalApplyName = raesList[0].Rental_Apply__r.Name;
        }
        Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> raesdMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>();
        String NextName = '';
        if(RAESSearchList.size()>0){
            List<Rental_Apply_Equipment_Set_Detail__c> RAESDLine = New List<Rental_Apply_Equipment_Set_Detail__c>();
            RAESDLine = [
                    select id, Equipment_SetD_Borrowed__c,
                        EquipmentSet_Managment_Code_formula__c,
                        Rental_Apply_Equipment_Set__c,
                        Rental_Apply_Equipment_Set__r.Name,
                        Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name,
                        Rental_Apply_Equipment_Set__r.Loaner_code__c,
                        FSD_Name_CHN__c,
                        Fixture_Name_text__c,
                        Fixture_Model_No_F__c,
                        Fixture_Model_No_text__c,
                        Loaner_asset_no__c,
                        Internal_Asset_number_c__c,
                        ProductName__c,
                        Asset__r.Product2.Image_DocumentID__c,
                        Asset__r.OwnershipMachine_No__c,
                        Asset__r.Name,
                        Asset__r.Loaner_accsessary__c,
                        Asset__r.WH_location__c,
                        SerialNumber__c,
                        SerialNumber_text__c,
                        Is_Body__c,
                        // Rental_Apply_Equipment_Set__r.SerialNumber_text__c,
                        Rental_Apply_Equipment_Set__r.Loaner_code_text__c
                    from Rental_Apply_Equipment_Set_Detail__c
                    where Rental_Apply_Equipment_Set__r.Id in :RAESSearchList
                and Cancel_Select__c = False
                AND asset__c != null
                AND Cancel_Select__c = false
                AND Shipment_request_time2__c != null
                    order by Rental_Apply_Equipment_Set__c, Name, ProductName__c asc nulls last, Asset__r.Loaner_accsessary__c];
            mainCnt = 0;
            accessoryCnt = 0;
            for (Rental_Apply_Equipment_Set_Detail__c ra : RAESDLine) {
                if (ra.Is_Body__c) {
                    mainCnt += 1;
                } else {
                    accessoryCnt += 1;
                }
                if (raesdMap.containsKey(ra.Rental_Apply_Equipment_Set__c)) {
                    raesdMap.get(ra.Rental_Apply_Equipment_Set__c).add(ra);
                } else {
                    List<Rental_Apply_Equipment_Set_Detail__c> rsd = new List<Rental_Apply_Equipment_Set_Detail__c>();
                    rsd.add(ra);
                    raesdMap.put(ra.Rental_Apply_Equipment_Set__c,rsd);
                }
            }
            //20201125 LJH OCSM_BP5-61 add start
            raesList = null;
            raesList = raRaesMap.get(rentalApplyId[0]);
            //20201125 LJH OCSM_BP5-61 add end
        }
        DetailsAllList = new List<lineInfo>();
        recordsIMG = new List<PDFInfoIMG>();
        //计算行高总数,用于分页
        integer LineNum = 0;
        System.debug('raesListsize is' + raesList.size());
        for (Integer i = 0; i < raesList.size(); i++) {
            Rental_Apply_Equipment_Set__c raes = raesList[i];
            Map<String,integer> DLSM = new Map<String,integer>();
            Map<String,String> LoanerCodeSM = new Map<String,String>();
            Map<String,String> DetailsLineMap = new Map<String,String>();
            Set<String> AllSet = new Set<String>();
            String DetailsLine = '';
            List<Rental_Apply_Equipment_Set_Detail__c> LineOrderList = raesdMap.get(raes.Id);
            // system.debug('LineOrderList测试'+LineOrderList.size());
            if (LineOrderList!=null) {
                boolean LotFlag = true;
                for (Rental_Apply_Equipment_Set_Detail__c Ec : LineOrderList) {
                    // LoanerCodeSM.put(Ec.Equipment_Set__r.Loaner_code__c, Ec.Equipment_Set__r.Loaner_code__c);
                    system.debug('LoanerCodeSM显示'+LoanerCodeSM);
                    //先数出来有多少重复的
                    //DetailsLine = DetailsLine + Ec.Asset__r.OwnershipMachine_No__c+' ; ';
                    if (DLSM.containsKey(Ec.Asset__r.OwnershipMachine_No__c)) {
                       //OCM内部产品型号 OwnershipMachine_No__c
                       integer j = DLSM.get(Ec.Asset__r.OwnershipMachine_No__c)+1;
                       DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, j);
                    } else {
                       DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, 1);
                    }
                    if (Ec.Asset__r.Loaner_accsessary__c == false) {
                       //有主机
                       LotFlag = false;
                    }
                    //去掉重复的 ToDo条件确认
                    // if (Ec.Asset__r.Loaner_accsessary__c == true) {
                        //if(Ec.SerialNumber__c == ''||Ec.SerialNumber__c==null){
                       AllSet.add(Ec.Asset__r.OwnershipMachine_No__c);
                    // }
                }
                system.debug('DLSM:::::'+DLSM);
                system.debug('AllSet:::::'+AllSet);
                for (String Ecc : AllSet) {
                    //然后做成字符串
                    if (LotFlag) {
                        //都为附属品
                        if(DLSM.get(Ecc)==1) {
                            DetailsLine = DetailsLine + Ecc + ' ; ';
                        } else {
                            DetailsLine = DetailsLine + Ecc + '*' + DLSM.get(Ecc) + ' ; ';
                        }
                    } else {
                        if (DLSM.get(Ecc)==1&&!LoanerCodeSM.containsKey(Ecc)) {
                            DetailsLine = DetailsLine + Ecc+' ; ';
                        } else if (DLSM.get(Ecc)!=1) {
                            DetailsLine = DetailsLine + Ecc+'*'+DLSM.get(Ecc)+' ; ';
                        }
                    }
                }
                if (DetailsLine.length()>0) {
                    DetailsLine = DetailsLine.substring(0, DetailsLine.length()-2);
                }
                // List<Rental_Apply_Equipment_Set_Detail__c> LinJar = raesdMap.get(raes.Equipment_Set__c);
                // Rental_Apply_Equipment_Set_Detail__c LineOrder = new Rental_Apply_Equipment_Set_Detail__c();
                // if (LinJar.size()>0) {
                Integer k = i;
                for (Rental_Apply_Equipment_Set_Detail__c LineOrder : LineOrderList) {
                        // LineOrder = raesdMap.get(raes.Equipment_Set__c)[0];
                        // system.debug('LineOrder::::::'+LineOrder);
                        lineInfo Li = new lineInfo(LineOrder, LotFlag, k);
                        Li.AssetModelNo = DetailsLine;
                        //载入行高 每行44
                        if (DetailsLine.length() != 0) {
                            Li.LineHeight = (DetailsLine.length()/44) + (Math.mod(DetailsLine.length(), 44) > 0 ? 1 : 0);
                        } else {
                            Li.LineHeight = 1;
                        }
                        Li.height = Li.LineHeight * MAXLINEHRIGHT;
                        LineNum = LineNum + Li.LineHeight;
                        DetailsAllList.add(Li);
                        k = null;
                }
                // }
                // for (Rental_Apply_Equipment_Set_Detail__c raesd : LineOrderList) {
                    PDFInfoIMG infoIMG = new PDFInfoIMG(raes, LineOrderList);
                    recordsIMG.add(infoIMG);
                // }
            }
        }
  //      //分页 15行一页,实际显示14行,判断第14行是否为双倍高度
  //      //明细总页数
        integer PageAllNum = integer.valueOf(Math.ceil( LineNum / (MAXPAGECOUNT+1))+1+'');
        pageCnt = integer.valueOf(Math.ceil( DetailsAllList.size() / 17 ) +1+'');
        //for(Integer j = 0 ; j< PageAllNum ;j++){
        //新建一页
        PDFInfo info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
        // 20220413 ljh  抬头显示 update start
        //20201120 LJH OCSM_BP5-61 update start
        // if(!IsShowLU){
        //     if(!IsMain){
        //         info.isAgencyOrCenter = true;//办事处
        //         info.AgencyAddressName = '请将备品回寄至';
        //         info.AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
        //         info.AgencyAddressName += '办事处';
        //         info.AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
        //     }else{
        //         info.isAgencyOrCenter = false;//备品中心
        //         info.AgencyOrCenterAddress = centerAddressInfo;
        //     }
        // }else{
        //     info.isAgencyOrCenter = false;//备品中心
        //     info.AgencyOrCenterAddress = centerAddressInfo;
        // }
        //20201120 LJH OCSM_BP5-61 update  end
        if(!IsShowLU){
            if(!IsMain){
                isAgencyOrCenter = true;//办事处
                AgencyAddressName = '请将备品回寄至';
                AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c;
                AgencyAddressName += '办事处';
                AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id);
            }else{
                isAgencyOrCenter = false;//备品中心
                AgencyOrCenterAddress = centerAddressInfo;
            }
        }else{
            isAgencyOrCenter = false;//备品中心
            AgencyOrCenterAddress = centerAddressInfo;
        }
        // 20220413 ljh  抬头显示 update end
        integer PageCut = 0;
        if (PageAllNum>=7) {
           PageAllNum=7;
        }
        Integer count = DetailsAllList.size() / MAXPAGECOUNT;
        if (Math.mod(DetailsAllList.size(), MAXPAGECOUNT) > 0) {
        count += 1;
        }
        for (Integer K = 0; K < count*MAXPAGECOUNT ; K++) {
            if (DetailsAllList.size()>k) {
               info.lineList.add(DetailsAllList[K]);
               PageCut = PageCut +DetailsAllList[K].LineHeight-1;
            } else {
               info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null));
            }
            System.debug('info.lineList is' + info.lineList);
            if (records.size() < PageAllNum) {
               PageCut = PageCut+1;
            }
            system.debug('PageCut[K]' + PageCut);
            if (info.lineList.size() >= MAXPAGECOUNT) {
               records.add(info);
               system.debug('records内容::::::::'+records);
               info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
               List<String> G = new List<String>();
               G.add('ANY element');
               PageCutList.add(G);
               PageCut=0;
            }
        }
       // for (Integer K = 0; K < PageAllNum*MAXPAGECOUNT ; K++) {
       //     if (DetailsAllList.size()>k) {
       //         info.lineList.add(DetailsAllList[K]);
       //         PageCut = PageCut +DetailsAllList[K].LineHeight-1;
       //     } else {
       //         info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null));
       //     }
       //     System.debug('info.lineList is' + info.lineList);
       //     if (records.size() < PageAllNum) {
       //         PageCut = PageCut+1;
       //     }
       //     system.debug('PageCut[K]' + PageCut);
       //     if (PageCut >= MAXPAGECOUNT) {
       //         records.add(info);
       //         system.debug('records内容::::::::'+records);
       //         info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>());
       //         List<String> G = new List<String>();
       //         G.add('ANY element');
       //         PageCutList.add(G);
       //         PageCut=0;
       //     }
       // }
  //      system.debug('records内容'+records);
        pageCnt = records.size();
        AllSum = DetailsAllList.size();
  //      //pageNum
        recordsIMGfist = new List<PDFInfoIMG>();
        for (integer J = pageNum * 10; J<pageNum * 10 +10; J++) {
            if (J < recordsIMG.size()) {
               recordsIMGfist.add(recordsIMG.get(J));
            }
        }
        pageCntIMG = recordsIMGfist.size();
    }
    // Data Bean
    class PDFInfo {
        public String eSetName { get; private set; } //备品中心管理单号
        // 20220413 ljh  抬头显示 update start
        // public String AgencyAddressName { get; private set; } //回寄地址 20201123 LJH OCSM_BP5-61 add
        // public Boolean isAgencyOrCenter { get; private set; } //备品中心?办事处 20201123 LJH OCSM_BP5-61 add
        // public String AgencyOrCenterAddress { get; private set; }//20201124 LJH OCSM_BP5-61 add
        // 20220413 ljh  抬头显示 update end
        public String requestOwner { get; private set; } //申请人
        public String salesDept { get; private set; } //所属本部
        public String workPlace { get; private set; } //所属办事处
        public String acc { get; private set; } //借用单位
        public String shippingDay { get; private set; } //希望到货日
        public String receivedStaff { get; private set; } //收件人
        public String receivedStaffPhone { get; private set; } //收件人电话
        public String shippmentAdress { get; private set; } //发送地址
        public String HospitalEndDate { get; private set; } //在医院使用期限
        public String LoanerCode {get;private set;} //備品型番
        public List<lineInfo> lineList { get; private set; }
        public String AssetModelNo {get;private set;} //OCM内部产品型号(略称)
        public PDFInfo(Rental_Apply__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdList) {
            eSetName = raes.Name;
            requestOwner = raes.Person_In_Charge__c;
            salesDept = raes.Salesdept__c;
            workPlace = raes.WorkPlace__c;
            acc = raes.Account__c == null && raes.Campaign__c != null ? raes.Campaign__c : raes.Account__c;
            shippingDay = raes.Request_shipping_day__c == null ? '' : raes.Request_shipping_day__c.format();
            receivedStaff = raes.Loaner_received_staff__c;
            receivedStaffPhone = raes.Loaner_received_staff_phone__c;
            shippmentAdress = raes.Shippment_adress_detail__c == null ? raes.direct_shippment_address__c : raes.Shippment_adress_detail__c;
            if (raesdList == null) {
                raesdList = new List<Rental_Apply_Equipment_Set_Detail__c>();
            }
            lineList = new List<lineInfo>();
        }
    }
    class lineInfo {
        //bp2
        public String index { get; private set; }  //  序号
        public String setName { get; private set; }  //  备品set型号
        public String dModelNo { get; private set; }  //  备品配套明细型号
        public String dChinaName { get; private set; }  //  中文名称
        public String dSerialNumber { get; private set; }  //  机身号
        public String dLoaner_asset_no { get; private set; }  //  固定资产号码
        public String dManagementnumber { get; private set; }  //  管理号码
        public String dQRCode { get; private set; }  //  二维码
        private Integer maxLineContact;
        public String wh_location { get; private set; }  //  货位号
        public String name1 { get; private set; }
        public String productName1 { get; private set; }
        public String serialNumber1 { get; private set; }
        public String name2 { get; private set; }
        public String productName2 { get; private set; }
        public String serialNumber2 { get; private set; }
        public String LoanerCode {get;private set;} //備品型番
        public String AssetModelNo {get;private set;} //OCM内部产品型号(略称)
        public List<String> AssetModelNoList {get;private set;}//OCM内部产品型号(略称) 集合
        public integer LineHeight {get;private set;} //记录行高
        public integer height {get;private set;}
        // public lineInfo(Equipment_Set_Detail__c esd1, Equipment_Set_Detail__c esd2) {
        //    AssetModelNoList = new List<String>();
        //    name1 = esd1.Equipment_Set__r.Name == null ? ' ' : esd1.Equipment_Set__r.Name;
        //    productName1 = esd1.Asset__r.Name;
        //    serialNumber1 = esd1.SerialNumber__c;
        //    name2 = esd2.Name == null ? ' ' : esd2.Name;
        //    productName2 = esd2.Asset__r.Name;
        //    serialNumber2 = esd2.SerialNumber__c;
        //    height = height ==null ? 25: height;
        //    LoanerCode = esd1.Equipment_Set__r.Loaner_code__c;
        // }
// MAXINDEXCOUNT = 26;
// MAXDCHINNAMECOUNT = 2
// MAXDMODELNOCOUNT = 26
// MAXDSERIALNUMBERCOUNT
// MAXDLANCOUNT = 26;
// MAXDMMCOUNT = 26;
        public lineInfo(Rental_Apply_Equipment_Set_Detail__c raesd, boolean LotFlag, Integer inde) {
           AssetModelNoList = new List<String>();
            //bp2
            maxLineContact = 0;
            index = inde == null ? '' : String.valueOf(inde + 1);
            dChinaName = raesd.Fixture_Name_text__c;
            // dChinaName = '457100: 孔口探头,COTTLE型,带工业金刚石,20.5 cm(工业金刚石研磨表面取代了传统的钢纹,这使得操作省力,更简易,同时获得了更高的精确度。它能以极高的精准度切割或研磨较大骨组织)。';
            // dChinaName = '孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口';
            dModelNo = raesd.Fixture_Model_No_text__c;
            dSerialNumber = raesd.SerialNumber_text__c;
            // dLoaner_asset_no = raesd.Loaner_asset_no__c;
            // OLY_OCM-321 发货确认单:固定资产号字段修改显示为固定资产编号(Key) _c__c?
            dLoaner_asset_no = raesd.Internal_Asset_number_c__c;
            dManagementnumber = raesd.EquipmentSet_Managment_Code_formula__c == null ? ' ' : raesd.EquipmentSet_Managment_Code_formula__c;
           name1 = raesd.Equipment_SetD_Borrowed__c == null ? ' ' : raesd.Equipment_SetD_Borrowed__c;
           productName1 = raesd.Asset__r.Name;
           setName = raesd.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name;
           if(LotFlag){
               serialNumber1 = ' ';
               LoanerCode = ' ';
           }else{
               // serialNumber1 = raesd.Rental_Apply_Equipment_Set__r.SerialNumber_text__c;
               LoanerCode = raesd.Rental_Apply_Equipment_Set__r.Loaner_code_text__c;
           }
           //name2 = esd2.Name == null ? ' ' : esd2.Name;
           //productName2 = esd2.Asset__r.Name;
           //serialNumber2 = esd2.SerialNumber__c;
           height = height ==null ? MAXLINEHRIGHT: height;
           wh_location = raesd.Asset__r.WH_location__c;
        }
    }
    // Data Bean
    class PDFInfoIMG {
        public String eSetName { get; private set; }
        // public Equipment_Set__c es { get; private set; }
        public Fixture_Set__c es { get; private set; }
        public Rental_Apply_Equipment_Set__c raesc { get; private set; }
        public List<lineInfoIMG> lineList { get; private set; }
        public List<lineInfoIMGrase> lineListIMG { get; private set; }
        //public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Equipment_Set_Detail__c> esdl) {
        //    eSetName = raes.Equipment_Set__r.Name;
        //    es = raes.Equipment_Set__r;
        //    raesc = raes;
        //    if (esdl == null) {
        //        esdl = new List<Equipment_Set_Detail__c>();
        //    }
        //    lineList = new List<lineInfoIMG>();
        //    if (esdl.Size() >= 20) {
        //        for (Integer i = 0; i < 5; i++) {
        //            lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3]));
        //        }
        //    } else {
        //        Integer size = esdl.Size();
        //        for (Integer i = 0; i < 20 - size; i++) {
        //            esdl.add(new Equipment_Set_Detail__c(Name=' '));
        //        }
        //        for (Integer i = 0; i < 5; i++) {
        //            lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3]));
        //        }
        //    }
        // }
        public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdcl) {
           eSetName = raes.Fixture_Set__r.Name;
           es = raes.Fixture_Set__r;
           if (raesdcl == null) {
               raesdcl = new List<Rental_Apply_Equipment_Set_Detail__c>();
           }
           lineListIMG = new List<lineInfoIMGrase>();
           if (raesdcl.Size() >= 20) {
               for (Integer i = 0; i < 5; i++) {
                   lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3]));
               }
           } else {
               Integer size = raesdcl.Size();
               for (Integer i = 0; i < 20 - size; i++) {
                   raesdcl.add(new Rental_Apply_Equipment_Set_Detail__c());
               }
               for (Integer i = 0; i < 5; i++) {
                   lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3]));
               }
           }
        }
    }
    class lineInfoIMG {
        //public List<esdInfo> esdl { get; private set; }
        //public lineInfoIMG(Equipment_Set_Detail__c e1, Equipment_Set_Detail__c e2, Equipment_Set_Detail__c e3, Equipment_Set_Detail__c e4) {
        //    esdl = new List<esdInfo>();
        //    esdl.add(new esdInfo(e1));
        //    esdl.add(new esdInfo(e2));
        //    esdl.add(new esdInfo(e3));
        //    esdl.add(new esdInfo(e4));
        //    //esdl.add(e5);
        //}
    }
    class lineInfoIMGrase {
        public List<esdInfo> esdl { get; private set; }
        public lineInfoIMGrase(Rental_Apply_Equipment_Set_Detail__c e1, Rental_Apply_Equipment_Set_Detail__c e2, Rental_Apply_Equipment_Set_Detail__c e3, Rental_Apply_Equipment_Set_Detail__c e4) {
           esdl = new List<esdInfo>();
           esdl.add(new esdInfo(e1));
           esdl.add(new esdInfo(e2));
           esdl.add(new esdInfo(e3));
           esdl.add(new esdInfo(e4));
           //esdl.add(e5);
        }
    }
    class esdInfo {
        // public Rental_Apply_Equipment_Set_Detail__c esd { get; private set; }
        public Rental_Apply_Equipment_Set_Detail__c raesl { get; private set; }
        public Integer nameLength { get; private set; }
        public String ProductName { get; private set; }
        public esdInfo(Rental_Apply_Equipment_Set_Detail__c e) {
            raesl = e;
            String name = e.ProductName__c;
            nameLength = name == null ? 0 : name.length();
            if(nameLength <= 21){
               //一行
               ProductName = name;
            }else if(nameLength > 21 && nameLength <= 74){
               //两行
               if(nameLength <= 42){
                   //7px
                   //for(Integer i = 0; i < 2 ; i++){
                       ProductName = name.substring(0,21)+'<br/>'+name.substring(21,nameLength);
                   //}
               }else{
                   //4px
                   //for(Integer i = 0; i < 2 ; i++){
                       ProductName = name.substring(0,37)+'<br/>'+name.substring(37,nameLength);
                   //}
               }
            }else{
               //三行
               //for(Integer i = 0; i < 3 ; i++){
                       ProductName = name.substring(0,37)+'<br/>' + name.substring(37,74)+'<br/>'+name.substring(74,nameLength);
               //}
            }
        }
    }
}
force-app/main/default/classes/FixtureSetDetailHandler.cls
@@ -19,8 +19,37 @@
    }
    private void beforeSetValue() {
        Map<String,Fixture_Set_Detail__c> fsdMap = new Map<String,Fixture_Set_Detail__c>();
        for (Fixture_Set_Detail__c nObj : newList) {
            nObj.Name_CHN_Created__c = nObj.Name_CHN__c;
            // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
            if(nObj.Loaner_category__c){
                fsdMap.put(nObj.Fixture_Model_No_F__c,nObj);
            }
        }
        // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
        if(fsdMap.size() > 0){
            List<Product2>  Product2List = [SELECT Id,Fixture_Model_No_T__c,Loaner_categoryI__c,Loaner_categoryII__c
                                                 FROM Product2
                                                WHERE Fixture_Model_No_T__c IN :fsdMap.keySet()];
            if(Product2List.size() > 0){
                Map<String,Product2> updateMap = new Map<String,Product2>();
                for(Product2 pro:Product2List){
                    Product2 p2 = new Product2();
                    p2.Id = pro.Id;
                    p2.Loaner_categoryI__c = fsdMap.get(pro.Fixture_Model_No_T__c).Loaner_categoryI__c;
                    p2.Loaner_categoryII__c =fsdMap.get(pro.Fixture_Model_No_T__c).Loaner_categoryII__c;
                    if(((String.isNotBlank(p2.Loaner_categoryI__c) && p2.Loaner_categoryI__c.equals(pro.Loaner_categoryI__c)) || (String.isBlank(p2.Loaner_categoryI__c)&&String.isBlank(pro.Loaner_categoryI__c)))
                        && ((String.isNotBlank(p2.Loaner_categoryII__c) && p2.Loaner_categoryII__c.equals(pro.Loaner_categoryII__c)) || (String.isBlank(p2.Loaner_categoryII__c)&&String.isBlank(pro.Loaner_categoryII__c)))){
                        continue;
                    }
                    updateMap.put(pro.Id,p2);
                }
                if(updateMap.size() > 0){
                    update updateMap.values();
                }
            }
        }
        // 20230727 ljh 备品类型I和备品类型II放到保有设备上显示 start
    }
}
force-app/main/default/classes/FixtureSetDetailHandler.cls.bak
New file
@@ -0,0 +1,26 @@
public without sharing class FixtureSetDetailHandler extends Oly_TriggerHandler {
    private Map<Id, Fixture_Set_Detail__c> newMap;
    private Map<Id, Fixture_Set_Detail__c> oldMap;
    private List<Fixture_Set_Detail__c> newList;
    private List<Fixture_Set_Detail__c> oldList;
    public FixtureSetDetailHandler() {
        this.newMap = (Map<Id, Fixture_Set_Detail__c>) Trigger.newMap;
        this.oldMap = (Map<Id, Fixture_Set_Detail__c>) Trigger.oldMap;
        this.newList = (List<Fixture_Set_Detail__c>) Trigger.new;
        this.oldList = (List<Fixture_Set_Detail__c>) Trigger.old;
    }
    protected override void beforeInsert() {
        beforeSetValue();
    }
    protected override void beforeUpdate() {
        beforeSetValue();
    }
    private void beforeSetValue() {
        for (Fixture_Set_Detail__c nObj : newList) {
            nObj.Name_CHN_Created__c = nObj.Name_CHN__c;
        }
    }
}
force-app/main/default/classes/FixtureSetHandler.cls
@@ -1,3 +1,4 @@
// FixtureSetHandlerTest
public without sharing class FixtureSetHandler extends Oly_TriggerHandler {
    private Map<Id, Fixture_Set__c> newMap;
    private Map<Id, Fixture_Set__c> oldMap;
@@ -16,6 +17,7 @@
    }
    protected override void beforeUpdate() {
        beforeSetValue();
        upToAsset();// 20230719 ljh DB202306212211 p9
    }
    private void beforeSetValue() {
@@ -23,4 +25,59 @@
            nObj.Loaner_code__c = nObj.Name;
        }
    }
    /**
     * @Author: [lijinhuan]
     * @description: 备品类型I和备品类型II放到保有设备上显示
     * @return {*}
     */
    private void upToAsset() {
        Map<String,Fixture_Set__c> fsMap= new Map<String,Fixture_Set__c>();
        // Set<String> ModelNoSet = new  Set<String>();
        for (Fixture_Set__c nObj : newList) {
            Fixture_Set__c oObj;
            if (Trigger.isUpdate) {
                oObj = oldMap.get(nObj.Id);
            }
            // 发生改变
            if( (String.isNotBlank(nObj.Loaner_categoryI__c) && nObj.Loaner_categoryI__c != oObj.Loaner_categoryI__c)
                || (String.isBlank(nObj.Loaner_categoryI__c) && String.isNotBlank(oObj.Loaner_categoryI__c))
                || (String.isNotBlank(nObj.Loaner_categoryII__c) && nObj.Loaner_categoryII__c != oObj.Loaner_categoryII__c)
                || (String.isBlank(nObj.Loaner_categoryII__c) && String.isNotBlank(oObj.Loaner_categoryII__c))
            ){
                if(String.isNotBlank(nObj.Fixture_Set_Body_Model_No__c)){
                    String model = nObj.Fixture_Set_Body_Model_No__c.toUpperCase();
                    fsMap.Put(model,nObj);
                }
            }
            // if(Trigger.isDelete && String.isNotBlank(oObj.Fixture_Set_Body_Model_No__c ) && (String.isNotBlank(oObj.Loaner_categoryI__c)||String.isNotBlank(oObj.Loaner_categoryII__c))){
            //     ModelNoSet.add(oObj.Fixture_Set_Body_Model_No__c);
            // }
        }
        // if(fsMap.size() > 0 || ModelNoSet.size() > 0){
        if(fsMap.size() > 0){
            // 查询这个配套的产品,赋值给产品
            List<Product2>  Product2List = [SELECT Id,Fixture_Model_No_T__c,Loaner_categoryI__c,Loaner_categoryII__c
                                                 FROM Product2
                                                // WHERE Fixture_Model_No_T__c IN :fsMap.keySet() OR Fixture_Model_No_T__c IN :ModelNoSet ];
                                                WHERE Fixture_Model_No_T__c IN :fsMap.keySet() ];
            if(Product2List.size() > 0){
                Map<String,Product2> updateMap = new Map<String,Product2>();
                for(Product2 pro:Product2List){
                    Product2 p2 = new Product2();
                    p2.Id = pro.Id;
                    p2.Loaner_categoryI__c = fsMap.get(pro.Fixture_Model_No_T__c.toUpperCase()).Loaner_categoryI__c;
                    p2.Loaner_categoryII__c = fsMap.get(pro.Fixture_Model_No_T__c.toUpperCase()).Loaner_categoryII__c;
                    if(((String.isNotBlank(p2.Loaner_categoryI__c) && p2.Loaner_categoryI__c.equals(pro.Loaner_categoryI__c)) || (String.isBlank(p2.Loaner_categoryI__c)&&String.isBlank(pro.Loaner_categoryI__c)))
                        && ((String.isNotBlank(p2.Loaner_categoryII__c) && p2.Loaner_categoryII__c.equals(pro.Loaner_categoryII__c)) || (String.isBlank(p2.Loaner_categoryII__c)&&String.isBlank(pro.Loaner_categoryII__c)))){
                        continue;
                    }
                    updateMap.put(pro.Id,p2);
                }
                if(updateMap.size() > 0){
                    update updateMap.values();
                }
            }
        }
    }
}
force-app/main/default/classes/FixtureSetHandler.cls.bak
New file
@@ -0,0 +1,26 @@
public without sharing class FixtureSetHandler extends Oly_TriggerHandler {
    private Map<Id, Fixture_Set__c> newMap;
    private Map<Id, Fixture_Set__c> oldMap;
    private List<Fixture_Set__c> newList;
    private List<Fixture_Set__c> oldList;
    public FixtureSetHandler() {
        this.newMap = (Map<Id, Fixture_Set__c>) Trigger.newMap;
        this.oldMap = (Map<Id, Fixture_Set__c>) Trigger.oldMap;
        this.newList = (List<Fixture_Set__c>) Trigger.new;
        this.oldList = (List<Fixture_Set__c>) Trigger.old;
    }
    protected override void beforeInsert() {
        beforeSetValue();
    }
    protected override void beforeUpdate() {
        beforeSetValue();
    }
    private void beforeSetValue() {
        for (Fixture_Set__c nObj : newList) {
            nObj.Loaner_code__c = nObj.Name;
        }
    }
}
force-app/main/default/classes/MainFixtureSelectController.cls
@@ -141,7 +141,7 @@
    public Set<String> benbuSet;
    public Set<String> cunfangdiSet;
    public static String wrapperStr{set;get;}
    public String QueueNumber { set; get; }  //排队
    public MainFixtureSelectController() {
        //isNeedCheckEvent = true;
@@ -205,7 +205,10 @@
                    parentObj = parentObjs.get(0);
                    // 已排队的情况下,初始化时加载排队画面
                    if (sonObj.ExternalKey__c != null) {
                    // 20230610 ljh 判断页面显示 start
                    QueueNumber = String.valueOf(sonObj.Queue_Number__c);
                    // if (sonObj.ExternalKey__c != null) {
                    if (String.isNotBlank(QueueNumber)) {
                        // QueuePageByAssetId的URL, 加载排队画面用
                        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
                    }
@@ -1378,9 +1381,11 @@
                        viewList[viewList.size() - 1].canEdit = false;
                    }
                    groupByTargetList.add(rsdObj);
                    // QueuePageByAssetId的URL, 加载排队画面用
                    queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
                    // 20230610 ljh 判断页面显示
                    if (String.isNotBlank(QueueNumber)) {
                        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
                    }
                    assetId  = rsdObj.Asset__c;
                    rentalId = rsdObj.Rental_Apply_Equipment_Set__c;
                    modelNo  = rsdObj.Fixture_Model_No_text__c;
force-app/main/default/classes/MainFixtureSelectController.cls.bak
New file
@@ -0,0 +1,2259 @@
/**
 * 主体备品选择の設定
 * TestClass
 * MainFixtureSelectControllerTest
 * RentalFixtureManage1Test
 * RentalFixtureManage4Test
 */
global without sharing class MainFixtureSelectController extends CreateRelationListPagingCtrlBase {
    public override Integer getSearchNumMax() {
        //各ページに制御あれば、最大件数を指定する
        // searchNumMax = Integer.valueOf(Label.Product_Select_Limit);
        // searchNumMax = 20;
        pagesize = '20';
        return searchNumMax;
    }
    /* 選択されたデータ取得用Soql Fromから*/
    public override String getSelectedDataSql() {
        // オブジェクトAPI名
        selectedDataSql = ' From Rental_Apply_Equipment_Set_Detail__c';
        selectedDataSql += ' where Rental_Apply_Equipment_Set__c = \'' + String.escapeSingleQuotes(parentId) + '\'';
        selectedDataSql += '   and Is_Body__c = true';
        selectedDataSql += '   and Cancel_Select__c = false';
        selectedDataSql += '   and ApplyPersonAppended_F__c = false';
        selectedDataSql += ' order by Equipment_Type__c DESC  nulls last, FSD_Fixture_Model_No__c ASC nulls last';
        return selectedDataSql;
    }
    public override String getOriginObjName() {
        // オブジェクトAPI名
        originObjName = 'Asset';
        return originObjName;
    }
    public override String getOriginObjColumns() {
        // 項目セット
        originObjColumns = 'Id, Last_Reserve_RAES_Detail__c, Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c';
        return originObjColumns;
    }
    public override String getObjName() {
        // オブジェクトAPI名
        objName = 'Rental_Apply_Equipment_Set_Detail__c';
        return objName;
    }
    public override String getColumnLeftFieldSetName() {
        // 左の項目セット
        columnLeftFieldSetName = 'MainFixtureSelect_LeftFieldSet';
        return columnLeftFieldSetName;
    }
    public override String getColumnRightFieldSetName() {
        // 右の項目セット
        columnRightFieldSetName = 'MainFixtureSelect_RightFieldSet';
        return columnRightFieldSetName;
    }
    public override List<String> getColumnFieldList() {
        // strColumus 里加 field
        // FixtureUtil#raesdGroupByAssetId()の項目も必要
        return new List<String>{'Id', 'Rental_Apply_Equipment_Set__c', 'FSD_Id__c', 'Select_Time__c', 'Rental_Apply_Equipment_Set__r.Final_reply_day_text__c',
                'IndexFromUniqueKey__c', 'Queue_Number__c', 'SalesProvince__c', 'Fixture_Model_No_text__c', 'DeliverySlip__c', 'StockDown__c', 'Fixture_Model_No_F__c',
                'Rental_Apply__r.Internal_asset_location_F__c', 'Rental_Apply__r.Salesdept__c', 'Rental_Apply__r.Equipment_Type_F__c', 'Rental_Apply__r.Salesdepartment__c',
                'RAESD_Status__c', 'FSD_Fixture_Model_No__c', 'Is_Body_F__c', 'FSD_OneToOneAccessory_Cnt__c', 'Internal_asset_location__c',
                'Asset__r.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c', 'Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c',
                'Asset__r.Fixture_Status__c', 'Asset__r.Last_Reserve_RAES_Detail__c', 'Asset__r.Main_OneToOne__c', 'Asset__r.You_Xiao_Ku_Cun__c',
                'Rental_Apply__r.demo_purpose2__c','Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c',
                'Rental_Apply__r.next_action__c','Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c', 'ExternalKey__c'
        };
    }
    public override String getFKColumnField() {
        // getObjName 连 getOriginObjName 的 FK
        return 'Asset__c';
    }
    public override String getRecordTypeId() {
        //ページレイアウトを収得するのレコードタイプ
        recordTypeId = '';
        return recordTypeId;
    }
    // ページコントローラに検索処理は、WhereSoql作成のみ、パラメータとして、コンポーネントに渡される
    public override String getSqlWhereStr() {
        sqlWhereStr = '';
        if (getIsNeedRunSearch()) {
            sqlWhereStr = this.makeSoql(keywdSort);
        }
        return sqlWhereStr;
    }
    public override String getOrderbyStr() {
        String ordStr = '';
        if (isFirstTime) {
            ordStr = ', Equipment_Type__c DESC  nulls last';
            isFirstTime = false;
        }
        return 'order by Ji_Zhong_Guan_Li_Ku_Cun__c DESC, Pre_Arrival_wh_time__c ASC NULLS FIRST, Last_Reserve_RAES_Detail__r.Asset_return_Day__c ASC' + ordStr;
    }
    public override Boolean getIsNeedRunSearch() {
        return true;
    }
    // ClickEvent用URL
    public String queueByAsset {
        get {
            return queueByAsset;
        }
        set;
    }
    /*****************検索用******************/
    /*****************ソート時再検索条件(画面からの入力条件を無視するため)******************/
    private String keywdSort = null;
    public String keyword { get; set; }
    public String assetId { get; set; }
    public String rentalId { get; set; }
    public String raesdId { get; set; }
    public String modelNo { get; set; }
    public String saveType { get; set; }
    public Rental_Apply_Equipment_Set__c parentObj { get; private set; }
    public Rental_Apply_Equipment_Set_Detail__c sonObj { get; set; }
    public Boolean bieField { get; set; }   //别省、别本部、别存放地、别用途
    public String bieCunFangDi { get; set; }     //别存放地
    public String bieBenBu { get; set; }         //别本部
    public String bieChanPinFenLei { get; set; } //产品分类 Test用
    public String campaignType { get; set; } //学会类型
    public String bieBeiPinFenLei { get; set; }  //别备品分类
    public Boolean changeCampaignType { set; get; }  //学会类型改变Flag
    //public List<String> bieBeiPinFenLeiList { get; set; }  //别备品分类
    public Boolean isFirstTime = true;
    public Boolean is2B1 = true;
    public String pCunFangDi;
    public Set<String> benbuSet;
    public Set<String> cunfangdiSet;
    public static String wrapperStr{set;get;}
    public MainFixtureSelectController() {
        //isNeedCheckEvent = true;
        parentId = ApexPages.currentPage().getParameters().get('pt_recid');
        //bieBeiPinFenLeiList = new List<String>();
        is2B1 = UserInfo.getProfileId() == System.Label.ProfileId_EquipmentCenter;
        benbuSet = new Set<String>();
        cunfangdiSet = new Set<String>();
        this.bieField = true;
        changeCampaignType = false;
        //借出备品一览の情報を取得
        if (!String.isBlank(this.parentId)) {
            List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
                    SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
                           FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
                           Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
                           Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
                           Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
                           Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
                           Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                           Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
                     FROM Rental_Apply_Equipment_Set_Detail__c
                    WHERE Rental_Apply_Equipment_Set__c = :parentId
                      and Is_Body__c = true
                      and Cancel_Select__c = false];
            if (!raesdObjs.isEmpty()) {
                sonObj = raesdObjs[0];
                List<Rental_Apply_Equipment_Set__c> parentObjs = [
                        SELECT Id, Rental_Apply__r.Name,
                               Rental_Apply__r.Owner.Name,
                               Rental_Apply__r.Owner.Profile.Name,
                               Rental_Apply__r.Salesdept__c,
                               Rental_Apply__r.WorkPlace__c,
                               Rental_Apply__r.Request_shipping_day__c,
                               Fu_Shu_Pin_Fen_Pei_Jia__c,
                               Rental_Apply__r.Demo_purpose1__c,
                               Rental_Apply__r.demo_purpose2__c,
                               Rental_Apply__r.CampaignType__c,
                               Fixture_Set__r.Product_Category_GI_SP__c,
                               Fixture_Set__r.Equipment_Type__c,
                               Rental_Apply__r.Request_return_day__c,
                               Rental_Apply__r.Salesdepartment__c,
                               Rental_Apply__r.Equipment_Type_F__c,
                               Rental_Apply__r.Internal_asset_location_F__c,
                               Fixture_Set__r.Fixture_Set_Body_Model_No__c,
                               Rental_Apply__r.Product_category__c,
                               Rental_Apply__r.Loaner_centre_mail_address__c,
                               First_RAESD__r.Is_Body__c,
                               Irreplaceable_flag__c,
                               Rental_Start_Date__c,
                               Rental_End_Date__c,
                               Rental_Apply__c,
                               Fixture_Set__c,
                               RequestNoJoinStr2__c
                        FROM Rental_Apply_Equipment_Set__c
                        where Id = :parentId];
                if (!parentObjs.isEmpty()) {
                    parentObj = parentObjs.get(0);
                    // 已排队的情况下,初始化时加载排队画面
                    if (sonObj.ExternalKey__c != null) {
                        // QueuePageByAssetId的URL, 加载排队画面用
                        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
                    }
                    bieCunFangDi = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
                    pCunFangDi = bieCunFangDi;
                    // 本部初始值
                    bieBenBu = parentObj.Rental_Apply__r.Salesdepartment__c;
                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Salesdepartment_before__c)) {
                        bieBenBu = sonObj.Salesdepartment_before__c;
                    } else {
                        bieBenBu = parentObj.Rental_Apply__r.Salesdepartment__c;
                    }*/
                    // 备品分类初始值
                    bieBeiPinFenLei = parentObj.Rental_Apply__r.Equipment_Type_F__c;
                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Equipment_Type_text__c)) {
                        bieBeiPinFenLei = sonObj.Equipment_Type_text__c;
                    } else {
                        bieBeiPinFenLei = parentObj.Rental_Apply__r.Equipment_Type_F__c;
                    }*/
                    // 产品分类初始值
                    bieChanPinFenLei = parentObj.Rental_Apply__r.Product_category__c;
                    /*if (String.isNotBlank(sonObj.QuenType__c) && String.isNotBlank(sonObj.Product_category_text__c)) {
                        if (sonObj.Product_category_text__c == 'GI,SP') {
                            bieChanPinFenLei = '';
                        } else {
                            bieChanPinFenLei = sonObj.Product_category_text__c;
                        }
                    } else {
                        bieChanPinFenLei = parentObj.Rental_Apply__r.Product_category__c;
                    }*/
                    // bieBeiPinFenLeiList = FixtureUtil.setAssetRAESEquipment_Type(parentObj.Rental_Apply__r.demo_purpose2__c);
                    //if (bieBeiPinFenLeiList.size() == 0 && String.isNotBlank(parentObj.Rental_Apply__r.Equipment_Type_F__c)) {
                    //    for (String et : parentObj.Rental_Apply__r.Equipment_Type_F__c.split(',')) {
                    //        bieBeiPinFenLeiList.add(et);
                    //    }
                    //}
                    // benbuList = FixtureUtil.setAssetRAESSalesdepartment(parentObj.Rental_Apply__r.demo_purpose2__c);
                    // fenleiList = FixtureUtil.setAssetRAESEquipment_Type(parentObj.Rental_Apply__r.demo_purpose2__c);
                    // System.debug(fenleiList);
                    campaignType = parentObj.Rental_Apply__r.CampaignType__c;
                }
                if (String.isBlank(bieCunFangDi)) {
                    throw new ControllerUtil.myException('不能明确存放地, 请确认数据。');
                }
            } else {
                throw new ControllerUtil.myException('没有可以操作的主体备品或者主体数据不正确。');
            }
        } else {
            // OLY_OCM-721 Bug fix 选择配套时报错: null point
            // 追加parentId是否为空的检查,如果URL参数的parentId为空就报错: 参数错误:请指定Id。。
            throw new ControllerUtil.myException('参数错误:请指定Id。');
        }
    }
    public void init() {
        isNeedSearchFirst = true;
        //isNeedCheckEvent = true;
        searchOppSetParam();
        getSqlWhereStr();
    }
    //别存放地 SelectOption
    public List<SelectOption> getbieCunFangDiOps() {
        //备品存放地(现在)
        // return FixtureUtil.bieCunFangDiOpsMap.get(sonObj.Internal_asset_location__c);
        // return new List<SelectOption>{
        //     new SelectOption(sonObj.Rental_Apply__r.Internal_asset_location_F__c, sonObj.Rental_Apply__r.Internal_asset_location_F__c)
        // };
        cunfangdiSet = new Set<String>();
        List<SelectOption> opList;
        if (UserInfo.getProfileId() == System.Label.ProfileId_SystemAdmin
                || System.Label.ProfileId_EquCenAdmin.contains(UserInfo.getProfileId())
                || is2B1) {
            opList = FixtureUtil.bieCunFangDiOpsMap.get('备品管理中心');
        } else {
            if (String.isBlank(bieCunFangDi)) {
                opList = FixtureUtil.bieCunFangDiOpsMap.get('备品管理中心');
            } else {
                opList = new List<SelectOption>{
                    new SelectOption(bieCunFangDi, bieCunFangDi)
                };
            }
        }
        for (SelectOption op : opList) {
            if (String.isNotBlank(op.getValue())) {
                cunfangdiSet.add(op.getValue());
            }
        }
        return opList;
    }
    //别本部 SelectOption
    public List<SelectOption> getbieBenBuOps() {
        //所在地区(本部) 现在
        // return FixtureUtil.bieBenBuOpsMap.get(sonObj.Salesdepartment__c);
        benbuSet = new Set<String>();
        List<SelectOption> opList;
        List<SelectOption> retList = new List<SelectOption>();
        if (String.isBlank(bieCunFangDi)) {
            opList = FixtureUtil.bieBenBuOpsMap.get('All');
        } else {
            opList = FixtureUtil.bieBenBuOpsMap.get(bieCunFangDi);
        }
        retList.add(new SelectOption('全部', '--全部--'));
        for (SelectOption op : opList) {
            if (String.isNotBlank(op.getValue())) {
                benbuSet.add(op.getValue());
                retList.add(new SelectOption(op.getValue(),op.getLabel()));
            }
        }
        return retList;
    }
    //产品分类 SelectOption
    public List<SelectOption> getbieChanPinFenLeiOps() {
        //产品分类(GI/SP) F Product_category_F__c
        // return FixtureUtil.bieChanPinFenLeiOpsMap.get(sonObj.Product_category_F__c);
        // return FixtureUtil.bieChanPinFenLeiOpsMap.get('GISP');
        List<SelectOption> pickListValuesList = FixtureUtil.bieChanPinFenLeiOpsMap.get('GISP');
        return pickListValuesList;
    }
    //别备品分类 SelectOption
    public List<SelectOption> getbieBeiPinFenLeiOps() {
        //备品分类(现在) Equipment_Type__c
        // return FixtureUtil.bieBeiPinFenLeiOpsMap.get(sonObj.Equipment_Type__c);
        return FixtureUtil.bieBeiPinFenLeiOpsMap.get('备品分类');
    }
    //学会类型 SelectOption
    public List<SelectOption> getcampaignTypeOps() {
        //学会类型 CampaignType__c
        return FixtureUtil.getPlickList('Rental_Apply__c', 'CampaignType__c');
    }
    private void searchOppSetParam() {
        keywdSort = keyword;
    }
    public PageReference searchOpp() {
        searchOppSetParam();
        if (!getIsNeedRunSearch()) {
            return null;
        }
        // 選択済みの製品を取得
        myComponentController.getSelectedDataInfo();
        getSqlWhereStr();
        // コンポーネントにSoqlを発行して、ページングする
        myComponentController.searchAndPaging();
        return null;
    }
    //获取当前时间 getCurrentTime
    public static Time getCurrentTime() {
        DateTime now = DateTime.now();
        System.debug('GMT: ' + now);
        Integer hours = now.hour();
        Integer minutes = now.minute();
        Integer seconds = now.second();
        Integer milliseconds = now.millisecond();
        System.debug('local time: ' + hours + ':' + minutes + ':' + seconds + ':' + milliseconds);
        Time currentTime = Time.newInstance(hours, minutes, seconds, milliseconds);
        return currentTime;
    }
    /*
     * MainFixture的排队  // TODO 4つの項目で1つのblockです
     * @param raseId Rental_Apply_Equipment_Set__cのId
     * @param astId AssetのId
     * @return map {code: message:}
     */
    @RemoteAction
    global static Map<String, String> queue(Id raseId, Id assetId) {
        // 返回对象
        Map<String, String> responseMap = new Map<String, String>();
        // 検索条件
        Date dateToday = Date.today();
        System.debug('测试queue的raseId:' + raseId);
        System.debug('测试queue的assetId:' + assetId);
        Savepoint sp = Database.setSavepoint();
        try {
            // 排队时不是以Asset.Id为检索基准的,是以当前选中这一条的四个别字段和同一产品型号为条件来操作的
            // 先检索当前选中这条数据的四个别字段和 F__c
            List<Asset> aSetSelect = [Select Id, Fixture_Model_No_F__c,
                    Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c
                     From Asset
                    Where Id = :assetId
                      FOR Update];
            if (aSetSelect.size() == 0) {
                throw new ControllerUtil.myException('选择的数据有问题,请重试');
            }
            // 操作対象
            List<Rental_Apply_Equipment_Set_Detail__c> rasedList = [
                    SELECT Id, Asset__c, Fixture_Model_No_text__c,
                           Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c,
                           Queue_Number__c,
                           Queue_Day__c,
                           Select_Time__c,
                           UniqueKey__c,
                           StockDown__c,
                           Internal_asset_location_before__c
                    FROM Rental_Apply_Equipment_Set_Detail__c
                    where Rental_Apply_Equipment_Set__c = :raseId
                      and Cancel_Select__c = false
                      and Is_Body__c = true
                      FOR Update];
            if (rasedList.size() == 0) {
                throw new ControllerUtil.myException('排队数据不存在');
            }
            Rental_Apply_Equipment_Set_Detail__c raesd = rasedList[0];
            // 下架后不能排队、入力規則 Cannot_Change_Asset にてチェック済み
            // 排队的数据, 不能再次排自己
            if(raesd.Fixture_Model_No_text__c == aSetSelect[0].Fixture_Model_No_F__c
                    && raesd.Salesdepartment_before__c == aSetSelect[0].Salesdepartment__c
                    && raesd.Product_category_text__c == aSetSelect[0].Product_category__c
                    && raesd.Equipment_Type_text__c == aSetSelect[0].Equipment_Type__c
                    && raesd.Internal_asset_location_before__c == aSetSelect[0].Internal_asset_location__c
                    // 排队中的明细才会报以下错误
                    && raesd.Queue_Number__c > 0
                    && raesd.Queue_Day__c != null) {
                throw new ControllerUtil.myException('已经排了这个型号,不需要排队');
            }
            Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
            mfUpsert.put(raesd.UniqueKey__c, raesd);
            // 因为排过队的再次排队受到有效库存数影响所以需要清空
            // 排队したの場合、まず排队しないことに変更
            if (raesd.queue_Day__c != null) {
                raesd.Queue_User__c   = null;
                raesd.Queue_Number__c = null;
                raesd.Queue_Day__c    = null;
                raesd.Queue_Time__c   = null;
                raesd.Asset__c        = null;
            }
            // 分配したの場合、まず分配しないことに変更
            else if (raesd.Select_Time__c != null) {
                raesd.Select_Time__c  = null;
                raesd.Asset__c        = null;
                // 已出库指示的排队后清除出库指示信息
                raesd.Shipment_request_time2__c = null;
                raesd.Shipment_request__c = false;
            }
            if (!mfUpsert.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
            // ここまで まだ コミットしていないっです。
            String soqlStr = 'Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,'
                        + ' Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c'
                         + ' From Asset '
                        + ' Where Asset_Owner__c = \'Olympus\''
                        + ' and Asset_loaner_category__c != \'耗材\''
                        + ' and RecordTypeId = \'01210000000kOPR\''
                        + ' and Delete_Flag__c = False'
                        + ' and Freeze_sign_Abandoned_Flag__c = False'
                        + ' and Product2.Fixture_Model_No_T__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Fixture_Model_No_F__c)
                        + ' and Salesdepartment__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Salesdepartment__c)
                        + ' and Internal_asset_location__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Internal_asset_location__c)
                        // + ' and SalesProvince__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].SalesProvince__c)
                        + ' and Product_category__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Product_category__c)
                        + ' and Equipment_Type__c = ' + FixtureUtil.getSoqlString(aSetSelect[0].Equipment_Type__c)
                        + ' and ' + FixtureUtil.getAssetSoqlBase()
                        + ' order by Id';
            // 检索符合这四个别字段和同一产品型号的数据存在与否
            List<Asset> aSetCheck = Database.query(soqlStr);
            // List<Asset> aSetCheck = [Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,
            //         Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c
            //          From Asset
            //         Where Asset_Owner__c = 'Olympus'
            //           and Asset_loaner_category__c != '耗材'
            //           and RecordTypeId = '01210000000kOPR'
            //           and Delete_Flag__c = False
            //           and Freeze_sign_Abandoned_Flag__c = False
            //           and Product2.Fixture_Model_No_T__c = :aSetSelect[0].Fixture_Model_No_F__c
            //           and Salesdepartment__c = :aSetSelect[0].Salesdepartment__c
            //           and SalesProvince__c = :aSetSelect[0].SalesProvince__c
            //           and Product_category__c = :aSetSelect[0].Product_category__c
            //           and Equipment_Type__c = :aSetSelect[0].Equipment_Type__c
            //         order by Id];
            for (Asset ass : aSetCheck) {
                if (ass.Last_Reserve_RAES_Detail__c == null && ass.You_Xiao_Ku_Cun__c > 0) {
                    throw new ControllerUtil.myException('有可以分配主体不需要排队');
                }
            }
            // 不存在则画面提示错误信息
            if (aSetCheck.size() == 0) {
                throw new ControllerUtil.myException('排队选择主体数据不存在');
            }
            // 之前因为只是做Check,不是实际的排队操作,不rollback的话后面的排队数不对
            Database.rollback(sp);
            // OLY_OCM-1157 因为暂时直觉的保有设备的变量有影响,所以明细Handler先不清空(有影响的地方是明细和保有设备的Handler)
            AssetHandler.queueRaesdMap = null;
            // lock 符合条件的第一条Asset数据、进行排队。
            List<Asset> aSet = [Select Id, Name, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c,
                    Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c,
                    Internal_asset_location__c, EquipmentSet_Managment_Code__c
                     From Asset
                    Where Id = :aSetCheck[0].Id
                    FOR Update];
            if (aSet.size() == 0) {
                throw new ControllerUtil.myException('数据正在被其他用户操作,请重试');
            }
            // 操作対象
            rasedList = [
                    SELECT Id, Asset__c, Fixture_Model_No_text__c,
                           Salesdepartment_before__c, Product_category_text__c, Equipment_Type_text__c,
                           Queue_Number__c,
                           Queue_Day__c,
                           Select_Time__c,
                           UniqueKey__c,
                           StockDown__c
                    FROM Rental_Apply_Equipment_Set_Detail__c
                    where Rental_Apply_Equipment_Set__c = :raseId
                      and Cancel_Select__c = false
                      and Is_Body__c = true
                      FOR Update];
            if (rasedList.size() == 0) {
                throw new ControllerUtil.myException('排队数据不存在');
            }
            raesd = rasedList[0];
            mfUpsert.put(raesd.UniqueKey__c, raesd);
            String modelNo = aSet[0].Fixture_Model_No_F__c;
            System.debug('queue aSet is:' + aSet);
            //借出备品配套一览明细 Rental_Apply_Equipment_Set_Detail__c  Asset__c
            //排队顺 Queue_Number__c
            //排队日 Queue_Day__c
            AggregateResult[] queueMaxNumbers = [
                    SELECT max(Queue_Number__c) maxr, min(Queue_Number__c) minr
                    FROM Rental_Apply_Equipment_Set_Detail__c
                    where Id != :raesd.Id
                    and Fixture_Model_No_text__c = :modelNo
                    and Select_Time__c = null
                    and Queue_Day__c != null
                    and Queue_Number__c != null
                    and Queue_Number__c > 0
                    and Salesdepartment_before__c = :aSet[0].Salesdepartment__c     // 所在地区(本部) 借出时
                    and Product_category_text__c  = :aSet[0].Product_category__c    // 产品分类(GI/SP)(借出时)
                    and Equipment_Type_text__c    = :aSet[0].Equipment_Type__c      // 备品分类(借出时)
                    and Internal_asset_location_before__c = :aSet[0].Internal_asset_location__c      // 备品存放地
            ];
            // 一览明细的Asset__c保留下来,后面的处理需要使用
            Id oldAssId = raesd.Asset__c;
            //暂定分配の場合排队中変更,Triggerで新しいの暂定分配を設定
            if (raesd.Queue_Number__c == 0 && raesd.Queue_Day__c != null) {
                raesd.Queue_User__c   = UserInfo.getUserId();
                raesd.Queue_Number__c = Integer.valueOf(queueMaxNumbers[0].get('minr'));
                raesd.Queue_Day__c    = Date.today();
                raesd.Queue_Time__c   = getCurrentTime();
                raesd.Select_Time__c  = null;
                raesd.Asset__c        = null;
                // 已出库指示的排队后清除出库指示信息
                raesd.Shipment_request_time2__c = null;
                raesd.Shipment_request__c = false;
            } else {
                Integer queueMaxNumber = 1;
                if (queueMaxNumbers.isEmpty()) {
                    queueMaxNumber = 0;
                } else if (queueMaxNumbers[0].get('maxr') != null) {
                    queueMaxNumber = Integer.valueOf(queueMaxNumbers[0].get('maxr')) + 1;
                }
                // 排队成功、更新DB
                raesd.Queue_User__c   = UserInfo.getUserId();
                raesd.Queue_Number__c = queueMaxNumber;
                raesd.Queue_Day__c    = Date.today();
                raesd.Queue_Time__c   = getCurrentTime();
                // 备品配套明细型号(借出时)
                raesd.Fixture_Model_No_text__c = aSet[0].Fixture_Model_No_F__c;
                // 所在地区(本部) 借出时
                raesd.Salesdepartment_before__c = aSet[0].Salesdepartment__c;
                // 所在地区(省) 借出时
                raesd.SalesProvince_before__c = aSet[0].SalesProvince__c;
                // 产品分类(GI/SP)(借出时)
                raesd.Product_category_text__c = aSet[0].Product_category__c;
                // 备品分类(借出时)
                raesd.Equipment_Type_text__c = aSet[0].Equipment_Type__c;
                // 备品存放地(借出时)
                raesd.Internal_asset_location_before__c = aSet[0].Internal_asset_location__c;
                // 备品名称(借出时) clear しない、申請時 値設定するので、
                // 今排队保存排队信息时,别的和配套明细相连的字段都保留了排队的信息,为了逻辑的统一性,这个字段也需要保存
                raesd.Fixture_Name_text__c = aSet[0].Name;
                raesd.Select_Time__c  = null;
                raesd.Asset__c        = null;
                // 已出库指示的排队后清除出库指示信息
                raesd.Shipment_request_time2__c = null;
                raesd.Shipment_request__c = false;
                // OLY_OCM-243 追加字段对应 备品管理编码(借出时) 排队时清除与asset相连的借出时相关的字段
                raesd.EquipmentSet_Managment_Code_text__c = null;
                // 机身编号(借出时)
                raesd.SerialNumber_text__c = null;
                // 备品成本(借出时)
                raesd.Asset_cost_del_before__c = null;
            }
            Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
            // 此处共通化处理,在调用 FixtureUtil.clearOneToOneAccessory()方法
            FixtureUtil.clearOneToOneAccessory(raseId, mfUpsert, oldAssId, fOtoMap);
            // FixtureUtil.withoutUpdate(new Rental_Apply_Equipment_Set_Detail__c[]{raesd});
            if (!mfUpsert.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
            //更新一对一
            if (!fOtoMap.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpdate(fOtoMap.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
            responseMap.put('code', '0');
            responseMap.put('message', '排队成功');
            return responseMap;
        } catch (DmlException ex) {
            Database.rollback(sp);
            // 1件目のエラーのみ表示
            responseMap.put('code', '1');
            responseMap.put('message', ex.getDmlMessage(0));
            System.debug(Logginglevel.ERROR, ex.getMessage());
            System.debug(Logginglevel.ERROR, ex.getStackTraceString());
            return responseMap;
        } catch (Exception e) {
            Database.rollback(sp);
            responseMap.put('code', '1');
            responseMap.put('message', e.getMessage());
            System.debug(Logginglevel.ERROR, e.getMessage());
            System.debug(Logginglevel.ERROR, e.getStackTraceString());
            return responseMap;
        }
    }
    public PageReference save() {
        //20170906 upsert by UniqueKey__c
        Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
        Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
        Savepoint sp = Database.setSavepoint();
        Set<String> clearUniqueKeySet = new Set<String>();
        try {
            // Asset的Last_Reserve_RAES_Detail__c设值:未保存的情况下,robj.Id是null。需要先保存后设值
            //List<Rental_Apply_Equipment_Set_Detail__c> rasedList = new List<Rental_Apply_Equipment_Set_Detail__c>();
            //List<Asset> aSetList = new List<Asset>();
//Do it in Trigger            Map<Id, Asset> assetUpdateMap = new Map<Id, Asset>();
            for (Integer indexNum = 0; indexNum < viewList.size(); indexNum++) {
                WrapperInfo wprInfo = viewList[indexNum];
                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
                //清空Id,因为要有Id不能重新设置主字段备品借出一览
                robj.Id = null;
                //设置一览为当前主体的一览
                robj.Rental_Apply_Equipment_Set__c = sonObj.Rental_Apply_Equipment_Set__c;
                // 画面上にチェックした、1件しかない
                if (wprInfo.check) {
                    // 操作対象
                    List<Rental_Apply_Equipment_Set_Detail__c> rasedList = [
                            SELECT Id, Asset__c, Asset__r.Main_OneToOne__c,
                                   Queue_Number__c, ExternalKey__c,
                                   Queue_Day__c
                            FROM Rental_Apply_Equipment_Set_Detail__c
                            where Id = :sonObj.id
                              FOR Update];
                    if (rasedList.isEmpty()) {
                        throw new ControllerUtil.myException('分配的主体备品不存在,请刷新画面后重新操作');
                    }
                    //1822 yc 20211021 已购待货目的,新品已有发货日不能出库 start
                    if(robj.Rental_Apply__r.demo_purpose2__c=='已购待货' && robj.Rental_Apply__r.Follow_UP_Opp__r.Shipping_Finished_Day_Func__c!= null){
                        throw new ControllerUtil.myException('已购待货目的,新品已有发货日,不能继续了。');
                    }
                    if(robj.Rental_Apply__r.demo_purpose2__c=='索赔QIS' && robj.Rental_Apply__r.next_action__c=='无偿更换' && robj.Rental_Apply__r.QIS_number__r.ReplaceDeliveryDate__c!= null){
                        throw new ControllerUtil.myException('索赔QIS目的,QIS已有新品发货日,不能继续了。');
                    }
                    //1822 yc 20211021 已购待货目的,新品已有发货日不能出库 end
                    // 分配
                    if (robj.Select_Time__c == null || rasedList[0].Asset__c != robj.Asset__c) {
                        // Last_Reserve_RAES_Detail__c 最新备品申请借出明细历史
                        // 1件しかない
                        List<Asset> aSetList =
                                [Select Id, Quantity,
                                        Out_of_wh__c,
                                        Manage_type__c,
                                        You_Xiao_Ku_Cun__c,
                                        Last_Reserve_RAES_Detail__c,
                                        Last_Reserve_RAES_Detail__r.Select_Time__c
                                   From Asset
                                  where Id = :robj.Asset__c
                                   AND (Last_Reserve_RAES_Detail__c = null OR Last_Reserve_RAES_Detail__r.Select_Time__c = null)
                                   // 因为有暂定分配 所以where 里不加这个条件 AND You_Xiao_Ku_Cun__c > 0 // 有效库存
                                    for Update];
                        // 不能lock到数据的时候
                        if (aSetList.isEmpty()) {
                            throw new ControllerUtil.myException('请选择未分配的主体备品,请刷新画面后重新操作');
                        }
                        // 备品有效库存 的 check
                        // 暂定分配, 没有有效库存的时候 不报错
                        if (String.isNotBlank(aSetList[0].Last_Reserve_RAES_Detail__c)
                                && aSetList[0].Last_Reserve_RAES_Detail__r.Select_Time__c == null
                                && aSetList[0].You_Xiao_Ku_Cun__c <= 0
                                && aSetList[0].Last_Reserve_RAES_Detail__c == sonObj.Id
                        ) {
                        }
                        // 有有效库存的时候 不报错
                        else if (aSetList[0].You_Xiao_Ku_Cun__c > 0) {
                        }
                        else {
                            throw new ControllerUtil.myException('第' + (indexNum + 1) +'行,没有足够有效库存,请刷新画面后重新操作');
                        }
                        Asset aSet = aSetList[0];
                        robj.Select_Time__c = System.now();
                        // 分配時 更新 Out_of_wh__c
                        if (aSet.Out_of_wh__c == null || aSet.Out_of_wh__c == 0) {
                            aSet.Out_of_wh__c = 0;
                        }
// Handlerにて 値設定する
//                        aSet.Out_of_wh__c = aSet.Out_of_wh__c + 1;
//                        assetUpdateMap.put(aSet.Id, aSet);
                        String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c
                                + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c;
                        robj.UniqueKey__c = uniqueKeyStr;
                        robj.Queue_Number__c = null;
                        robj.Queue_Day__c = null;
                        robj.Queue_Time__c = null;
                        robj.Shipment_request_time2__c = null;
                        robj.Shipment_request__c = false;
                        robj.ExternalKey__c = null;
                        mfUpsert.put(robj.UniqueKey__c, robj);
// Handlerにて 値設定する
//                        if (String.isBlank(aSet.Last_Reserve_RAES_Detail__c)){
//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
//                            assetUpdateMap.put(aSet.Id, aSet);
//                        } else if (aSet.Last_Reserve_RAES_Detail__c != robj.Id) {
//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
//                            assetUpdateMap.put(aSet.Id, aSet);
//                        }
                        // 一对一的情况,主体备品和配套的附属品一起分配
                        if (robj.FSD_OneToOneAccessory_Cnt__c > 0) {
                            // 1. select from Rental_Apply_Equipment_Set_Detail__c 找出需要分配的对象
                            // 此处共通化处理,调用 FixtureUtil.clearOneToOneAccessory()方法
                            //   a.未分配时,Asset__c还没值,所以不用判断OneToOne_Flag__c
                            //   b.从一对一的, 改到不是一对一的情况,一对一分配的附属品字段清除逻辑,需要判断OneToOne_Flag__c
                            //   c.清除一对一link表的相关逻辑
                            //   d.fOtoMap 之前的一对一分配数也需要一起清空 + 今回の更新一对一分配的Link表
                            List<Rental_Apply_Equipment_Set_Detail__c> raesdList
                                    = FixtureUtil.clearOneToOneAccessory(parentId, mfUpsert, sonObj.Asset__c, fOtoMap);
                            // 分配的是一对一的时候
                            if (robj.Asset__r.Main_OneToOne__c) {
                                // 2. SELECT Fixture_OneToOne_Link__c where Main_Asset__c = robj.Asset__c
                                // 被分配对象 {Fixture_Model_No_F__c: [Asset.Id]}
                                Map<String, List<Fixture_OneToOne_Link__c>> oneToOneListMap = new Map<String, List<Fixture_OneToOne_Link__c>>();
                                Map<Id, Asset> assetKuCunMap = new Map<Id, Asset>();
                                List<Fixture_OneToOne_Link__c> fo2oList = [
                                        SELECT Id, Main_Asset__c,
                                               Accessory_Asset__c,
                                               Accessory_Asset__r.Fixture_Model_No_F__c,
                                               Quantity__c, Inventory_Frozen_Quantity__c
                                          FROM Fixture_OneToOne_Link__c
                                         WHERE Accessory_Asset__c != null                   // 念のため
                                           AND Main_Asset__c = :robj.Asset__c];
                                for (Fixture_OneToOne_Link__c fo2o : fo2oList) {
                                    if (!oneToOneListMap.containsKey(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c)) {
                                        oneToOneListMap.put(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c, new List<Fixture_OneToOne_Link__c>());
                                    }
                                    assetKuCunMap.put(fo2o.Accessory_Asset__c, null);
                                    List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c);
                                    fo2o.Quantity__c = fo2o.Quantity__c == null ? 1 : fo2o.Quantity__c;
// OCSM_BP3-29 分配一对一附属品的时候 考虑 盘点冻结数 start
                                    Integer fo2oQty = (fo2o.Quantity__c - (fo2o.Inventory_Frozen_Quantity__c == null ? 0 : fo2o.Inventory_Frozen_Quantity__c)).intValue();
//                                    for (Integer qty = 0; qty < fo2o.Quantity__c; qty++) {
                                    for (Integer qty = 0; qty < fo2oQty; qty++) {
// OCSM_BP3-29 分配一对一附属品的时候 考虑 盘点冻结数 end
                                        oneToOneAsetIdList.add(fo2o);
                                    }
                                    oneToOneListMap.put(fo2o.Accessory_Asset__r.Fixture_Model_No_F__c, oneToOneAsetIdList);
                                }
                                assetKuCunMap = new Map<Id, Asset>(
                                        [Select Id, Quantity,
                                                Out_of_wh__c,
                                                Manage_type__c,
                                                You_Xiao_Ku_Cun__c
                                           From Asset
                                          where Id IN :assetKuCunMap.keyset()
                                            for Update]);
                                // 对 raesdList 进行一对一分配
                                Map<Id, Rental_Apply_Equipment_Set_Detail__c> cancelCopyOldMap = new Map<Id, Rental_Apply_Equipment_Set_Detail__c>();
                                oneToOneSelect(raesdList, oneToOneListMap, assetKuCunMap, fOtoMap
                                        , robj.Select_Time__c
                                        , mfUpsert, cancelCopyOldMap);
                                // 有 cancelCopyOldMap 的话, 做重新分配, 然后继续分配
                                if (cancelCopyOldMap.size() > 0) {
                                    FixtureUtil.withoutUpdate(cancelCopyOldMap.values());
                                    // 要做一对一分配的明细, 参考 clearOneToOneAccessory sql
                                    raesdList = [SELECT Id, UniqueKey__c, Asset__c,
                                                FSD_Fixture_Model_No__c, FSD_Name_CHN__c, Fixture_OneToOne_Link_Id__c,
                                                Select_Time__c, Shipment_request_time2__c, Shipment_request__c, OneToOne_Flag__c, StockDown__c, DeliverySlip__c
                                            from Rental_Apply_Equipment_Set_Detail__c
                                            where Rental_Apply_Equipment_Set__c = :parentId
                                            and Cancel_Select__c = false
                                            and FSD_Is_OneToOne__c = true
                                            and UniqueKey__c != null
                                            and Is_Body__c = false
                                            and Canceled__c IN :cancelCopyOldMap.keySet()
                                            order by FSD_Fixture_Model_No__c];
                                    oneToOneSelect(raesdList, oneToOneListMap, assetKuCunMap, fOtoMap
                                            , robj.Select_Time__c
                                            , mfUpsert, cancelCopyOldMap);
                                }
                            }
                        }
                        if (String.isBlank(robj.Id)
                                && !String.isBlank(uniqueKeyStr)) {
                            // 新規の場合、ここ単純に Id にて判断
                            clearUniqueKeySet.add(uniqueKeyStr);
                        }
//Do it in Trigger
//                        // Asset 1件しかない
//                        update assetUpdateMap.values();
                        // 判断分配的明细是否已经排队,如果已排队,需要清除备品借出排队序列表中对应的数据
                        if (String.isNotBlank(rasedList[0].ExternalKey__c)) {
                            List<Rental_Apply_Sequence__c> rasList = [
                                    SELECT Id
                                    FROM Rental_Apply_Sequence__c
                                    WHERE Apply_Set_Detail__c =: rasedList[0].Id
                                      AND Invalid_Flag__c = false];
                            // 更新备品借出排队序列表
                            if (!rasList.isEmpty()) {
                                FixtureUtil.withoutDelete(rasList);
                            }
                        }
                    }
                    // 主体1件しかない
                    break;
                }
            }
            System.debug(mfUpsert);
            // Upsert
            if (!mfUpsert.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
//Do it in Trigger
//Do it in Trigger 分配時 更新 Out_of_wh__c
//                for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert) {
//                    if (robj.Is_Body_F__c) {
//                        System.debug('测试robj.Is_Body_F__c' + robj.Is_Body_F__c);
//                        Asset aSet = aSetList[0];
//                        if (String.isBlank(aSet.Last_Reserve_RAES_Detail__c)){
//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
//                            assetUpdateMap.put(aSet.Id, aSet);
//                        } else if (aSet.Last_Reserve_RAES_Detail__c != robj.Id) {
//                            aSet.Last_Reserve_RAES_Detail__c = robj.Id;
//                            assetUpdateMap.put(aSet.Id, aSet);
//                        }
//                        // 1件しかない
//                        update assetUpdateMap.values();
//                        break;
//                    }
//                }
            }
            //更新一对一
            if (!fOtoMap.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpdate(fOtoMap.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
        } catch (Exception ex) {
            System.debug('测试bug');
            System.debug(ex.getStackTraceString());
            ApexPages.addMessages(ex);
            Database.rollback(sp);
            // Id をクリア
            for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert.values()) {
                if (clearUniqueKeySet.contains(robj.UniqueKey__c)) {
                    robj.Id = null;
                }
            }
            return null;
        }
        if (saveType == '1') {
            searchOpp();
            saveType = '';
            return null;
        } else if (saveType == '2') {
            // ソート時の変更ある
            myComponentController.sortTable();
            saveType = '';
            return null;
        } else {
            //附属品选择画面
            PageReference pg = new PageReference('/apex/AccessorySelect');
            pg.getParameters().put('pt_recid',parentId);
            pg.setRedirect(true);
            return pg;
        }
    }
    // https://sohobb.backlog.jp/view/OLY_OCM-152#comment-20041467
    // 1. G9 の場合、 もし、一対一 分配した 本体の場合、付属品(一対一付属品)も一緒に キャンセルしますか?
    // → 一対一Linkがある場合は、付属品も一緒に取り消します。そうすればG10と矛盾しませんよね。
    // 下架后 才能取消主体 OLY_OCM-173
    public PageReference cancel() {
        Savepoint sp = Database.setSavepoint();
        try{
            List<Rental_Apply_Equipment_Set_Detail__c> raesds = new List<Rental_Apply_Equipment_Set_Detail__c>();
            List<Id> delIds = new List<Id>();
            for (WrapperInfo wprInfo : viewList) {
                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
                //出库后不能取消
                //关联主体分配画面,一览Handler
                //附属品分配画面
                if (wprInfo.check) {
                    if (String.isNotBlank(robj.DeliverySlip__c)) {
                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '已经发货的明细不能取消'));
                        return null;
                    } else if (robj.StockDown__c == false) {
                        if (robj.Cancel_Reason__c == '重新分配') {
                            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '下架前重新分配,直接从画面重新选择即可'));
                            return null;
                        } else {
                            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '下架前取消主体,请取消备品配套'));
                            return null;
                        }
                    } else if (robj.Cancel_Reason__c != '重新分配') {
                        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '不是 [重新分配],不能单独取消主体,请取消备品配套'));
                        return null;
                    } else {
                        // 状态为待分配,备品中心created的明细,可以delete;其余的不可以删除
                        if (robj.CreatedBy.ProfileId == System.Label.ProfileId_EquipmentCenter && robj.Select_Time__c == null) {
                            // 删除明细Id<List>
                            delIds.add(robj.Id);
                            // 删除明细,会对应的删除相关的备品借出排队序列表数据,不用特别加处理
                        } else {
                            if (String.isBlank(robj.Cancel_Reason__c)) {
                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入取消理由'));
                                return null;
                            }
                            //20210818 SFDC-C448KZ ljh start
                            if (String.isBlank(robj.Loaner_cancel_reason__c)) {
                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入明细取消理由'));
                                return null;
                            }
                            if (robj.Loaner_cancel_reason__c=='其他' && String.isBlank(robj.Loaner_cancel_Remarks__c)) {
                                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入取消理由备注'));
                                return null;
                            }
                            // if (String.isBlank(robj.Loaner_cancel_Remarks__c)) {
                            //     ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请输入备品申请取消理由备注'));
                            //     return null;
                            // }
                            //20210818 SFDC-C448KZ ljh end
                            wprInfo.check = false;
                            // 取消分配
                            robj.Cancel_Select__c = true;
                            // 备品申请取消时间
                            robj.Cancel_Date__c = Date.today();
                            robj.Cancel_Time__c = getCurrentTime();
                            // 取消者
                            robj.Cancel_Mem__c = UserInfo.getUserId();
                            // 取消理由备注
                            //robj.Loaner_cancel_Remarks__c
                            robj.Loaner_cancel_Remarks__c = robj.Loaner_cancel_Remarks__c==null ? robj.Loaner_cancel_reason__c : robj.Loaner_cancel_Remarks__c;
                            //20210818 SFDC-C448KZ ljh end
                            // 判断分配的明细是否已经排队,如果已排队,需要清除备品借出排队序列表中对应的数据
                            if (String.isNotBlank(robj.ExternalKey__c)) {
                                List<Rental_Apply_Sequence__c> rasList = [
                                        SELECT Id
                                        FROM Rental_Apply_Sequence__c
                                        WHERE Apply_Set_Detail__c =: robj.Id
                                          AND Invalid_Flag__c = false];
                                // 更新备品借出排队序列表
                                if (!rasList.isEmpty()) {
                                    FixtureUtil.withoutDelete(rasList);
                                }
                            }
                            robj.ExternalKey__c = null;
                            //※已经分配的場合  トリがでやります
                            //if(!String.isBlank(robj.Asset__c) && robj.Select_Time__c != null) {
                                //借出备品Set一览明细 trigger 里 clear Asset__c
                                //借出备品Set一览明细.分配时间
                                // if (robj.Select_Time__c != null) {
                                //     robj.Select_Time__c = null;
                                // }
                            //}
                            raesds.add(robj);
                        }
                    }
                }
            }
            if (delIds.size() > 0) {
                // 削除
                FixtureUtil.delRAESDByIds(parentObj, delIds);
            }
            if (raesds.size() > 0) {
                FixtureUtil.withoutUpdate(raesds);
                // 取消操作,只是取消已选择的分配,画面刷新
                PageReference pg = new PageReference('/apex/MainFixtureSelect');
                pg.getParameters().put('pt_recid',parentId);
                pg.setRedirect(true);
                return pg;
            }
        }
        catch (Exception e) {
            ApexPages.addMessages(e);
            Database.rollback(sp);
            return null;
        }
        return null;
    }
    public PageReference turnback() {
        PageReference ret = null;
        if (!String.isBlank(this.parentId)) {
            ret = new PageReference('/' + this.parentId);
        }
        return ret;
    }
    /**
    *#OLY_OCM-668 取消主体分配
    *@return PageReferences 刷新主体选择画面
    */
    public PageReference unassign(){
        Map<String, Rental_Apply_Equipment_Set_Detail__c> mfUpsert = new Map<String, Rental_Apply_Equipment_Set_Detail__c>();
        Map<Id, Fixture_OneToOne_Link__c> fOtoMap = new Map<Id, Fixture_OneToOne_Link__c>();
        Savepoint sp = Database.setSavepoint();
        Set<String> clearUniqueKeySet = new Set<String>();
        try{
            Integer checkCount = 0;
            for (Integer indexNum = 0; indexNum < viewList.size(); indexNum++) {
                WrapperInfo wprInfo = viewList[indexNum];
                Rental_Apply_Equipment_Set_Detail__c robj = (Rental_Apply_Equipment_Set_Detail__c) wprInfo.sobj;
                robj.Id = null;
                robj.Rental_Apply_Equipment_Set__c = sonObj.Rental_Apply_Equipment_Set__c;
                if (wprInfo.check) {
                    checkCount += 1;
                    // 操作対象
                    List<Rental_Apply_Equipment_Set_Detail__c> raesdList = [
                            SELECT Id, StockDown_time__c,Cancel_Date__c,
                                UniqueKey__c,
                                Fixture_OneToOne_Link_Id__c,
                                Asset__c,
                                Select_Time__c,
                                Shipment_request_time2__c,
                                Shipment_request__c ,
                                Fixture_Model_No_text__c ,
                                FSD_Fixture_Model_No__c,
                                SerialNumber_text__c,
                                SalesProvince_before__c,
                                Salesdepartment_before__c,
                                Product_category_text__c,
                                Equipment_Type_text__c,
                                Asset_cost_del_before__c,
                                Internal_asset_location_before__c,
                                Fixture_Name_text__c ,
                                FSD_Name_CHN__c,
                                EquipmentSet_Managment_Code_text__c
                            FROM Rental_Apply_Equipment_Set_Detail__c
                            where Id = :sonObj.Id
                            FOR Update];
                    if (raesdList.isEmpty()) {
                        throw new ControllerUtil.myException('没有下架前已分配的主体');
                    }
                    Rental_Apply_Equipment_Set_Detail__c robjOnline = raesdList[0];
                    if(robjOnline.Cancel_Date__c != null){
                        throw new ControllerUtil.myException('第' + (indexNum + 1) +'行,已经取消申请了,不能取消分配');
                    }
                    if(robjOnline.StockDown_time__c != null){
                        throw new ControllerUtil.myException('第' + (indexNum + 1) +'行,已下架,不可以取消分配');
                    }
                    if(robjOnline.Asset__c == null){
                        throw new ControllerUtil.myException('第' + (indexNum + 1) +'行,还没有被分配,不可以取消分配');
                    }
                    // 已分配且未下架才可执行取消
                    List<Asset> aSetList =
                            [SELECT Id, Quantity,
                                    Out_of_wh__c,
                                    Manage_type__c,
                                    You_Xiao_Ku_Cun__c,
                                    Last_Reserve_RAES_Detail__c,
                                    Last_Reserve_RAES_Detail__r.Select_Time__c
                               FROM Asset
                              WHERE Id = :robj.Asset__c
                                FOR UPDATE
                            ];
                    // 不能lock到数据的时候
                    if (aSetList.isEmpty()) {
                        throw new ControllerUtil.myException('第' + (indexNum + 1) +'行,不是有效的主体,请刷新画面后重新操作');
                    }
                    // 相关字段置为 null
                    robj.Asset__c = null;
                    robj.Select_Time__c = null;
                    robj.Shipment_request_time2__c = null;
                    robj.Shipment_request__c = false;
                    // 备品配套明细型号(借出时)
                    robj.Fixture_Model_No_text__c = robj.FSD_Fixture_Model_No__c;
                    // 机身编号(借出时)
                    robj.SerialNumber_text__c = null;
                    // 所在地区(省) 借出时
                    robj.SalesProvince_before__c = null;
                    // 所在地区(本部) 借出时
                    robj.Salesdepartment_before__c = null;
                    // 产品分类(GI/SP)(借出时)
                    robj.Product_category_text__c = null;
                    // 备品分类(借出时)
                    robj.Equipment_Type_text__c = null;
                    // 备品成本(借出时)
                    robj.Asset_cost_del_before__c = null;
                    // 备品存放地(借出时)
                    robj.Internal_asset_location_before__c = null;
                    //备品名称(借出时)
                    robj.Fixture_Name_text__c = robj.FSD_Name_CHN__c;
                    // 备品管理编码(借出时)
                    robj.EquipmentSet_Managment_Code_text__c = null;
                    // 清空排队信息
                    robj.Queue_Conment__c = null;
                    robj.Queue_Day__c = null;
                    robj.Queue_User__c = null;
                    //取消分配 update byrentx 20210809 start 取消分配时不清空 排队日(首次)
                    // robj.Queue_Day_Text__c = null;
                    //取消分配 update byrentx 20210809 end 取消分配时不清空 排队日(首次)
                    robj.Queue_Number__c = null;
                    // 判断分配的明细是否已经排队,如果已排队,需要清除备品借出排队序列表中对应的数据
                    if (String.isNotBlank(robj.ExternalKey__c)) {
                        List<Rental_Apply_Sequence__c> rasList = [
                                SELECT Id
                                FROM Rental_Apply_Sequence__c
                                WHERE Apply_Set_Detail__c =: robjOnline.Id
                                  AND Invalid_Flag__c = false];
                        // 更新备品借出排队序列表
                        if (!rasList.isEmpty()) {
                            FixtureUtil.withoutDelete(rasList);
                        }
                    }
                    robj.ExternalKey__c = null;
                    String uniqueKeyStr = parentObj.RequestNoJoinStr2__c + ':'+ robj.Rental_Apply_Equipment_Set__c
                            + ':' + robj.FSD_Id__c + ':' + robj.IndexFromUniqueKey__c;
                    robj.UniqueKey__c = uniqueKeyStr;
                    // 一对一的情况,主体备品和配套的附属品一起取消
                    if (robj.FSD_OneToOneAccessory_Cnt__c > 0) {
                        // 1. select from Rental_Apply_Equipment_Set_Detail__c 找出需要分配的对象
                        // 此处共通化处理,调用 FixtureUtil.clearOneToOneAccessory()方法
                        //   a.未分配时,Asset__c还没值,所以不用判断OneToOne_Flag__c
                        //   b.从一对一的, 改到不是一对一的情况,一对一分配的附属品字段清除逻辑,需要判断OneToOne_Flag__c
                        //   c.清除一对一link表的相关逻辑
                        //   d.fOtoMap 之前的一对一分配数也需要一起清空 + 今回の更新一对一分配的Link表
                        robj.Fixture_OneToOne_Link_Id__c = null;
                        raesdList = FixtureUtil.clearOneToOneAccessory(parentId, mfUpsert, sonObj.Asset__c, fOtoMap);
                    }
                    mfUpsert.put(robj.UniqueKey__c, robj);
                    if (String.isBlank(robj.Id)
                            && !String.isBlank(uniqueKeyStr)) {
                        // 新規の場合、ここ単純に Id にて判断
                        clearUniqueKeySet.add(uniqueKeyStr);
                    }
                    break;
                }
            }
            // 没有任何勾选
            if (checkCount == 0){
                throw new ControllerUtil.myException('请选择已分配的主体备品');
            }
            if (!mfUpsert.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpsertRaesd(mfUpsert.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
            //更新一对一
            if (!fOtoMap.isEmpty()) {
                Oly_TriggerHandler.bypass(AssetHandlerCheck.class.getName());
                FixtureUtil.withoutUpdate(fOtoMap.values());
                Oly_TriggerHandler.clearBypass(AssetHandlerCheck.class.getName());
            }
        } catch (Exception ex) {
            ApexPages.addMessages(ex);
            Database.rollback(sp);
            // Id をクリア
            for (Rental_Apply_Equipment_Set_Detail__c robj : mfUpsert.values()) {
                if (clearUniqueKeySet.contains(robj.UniqueKey__c)) {
                    robj.Id = null;
                }
            }
            return null;
        }
        //刷新画面
        PageReference pg = new PageReference('/apex/MainFixtureSelect');
        pg.getParameters().put('pt_recid',parentId);
        pg.setRedirect(true);
        return pg;
    }
    private String makeSoql(String keyword) {
        // 検索条件
        String dateToday = String.valueOf(Date.today());
        // from asset
        String soql ='';
        soql += 'where Asset_Owner__c = \'Olympus\' AND ' + FixtureUtil.getAssetSoqlBase();
        soql += '  and Asset_loaner_category__c != \'耗材\'';
        soql += '  and RecordTypeId = \'01210000000kOPR\'';
        soql += '  and Quantity > 0';
        soql += '  and (Abandoned_Inventory__c = 0 OR Abandoned_Inventory__c = null)'; // 待废弃数(丢失/盘亏)
        soql += '  and (Abandoned_RealThing__c = 0 OR Abandoned_RealThing__c = null)'; // 待废弃数(实物)
        soql += '  and (Frozen_Quantity__c = 0 OR Frozen_Quantity__c = null)'; // 冻结数
        soql += '  and Loaner_accsessary__c = false';
        soql += '  and Equipment_Type__c != \'检测用备品\'';
        soql += '  and Delete_Flag__c = False ';
        soql += '  and Freeze_sign_Abandoned_Flag__c = False';
        soql += '  and Internal_asset_location__c != null';
        soql += '  and (Consumable_Guaranteen_end__c = null or Consumable_Guaranteen_end__c >=' + dateToday + ')';
//借出中的Asset也要出显示出来
//        soql += '  and Last_Reserve_RAES_Detail__c = null';
        // Fixture_OneToOne_Link__c, 当配套的Mst定义成 一对一 的时候
        if (sonObj != null && sonObj.FSD_Is_OneToOne__c) {
            soql += '  and Fixture_OneToOne_Link__c <> null';
        }
        // 不检索seledted的数据  在 CreateRelationListPagingCmpCtrl 里 已经 去除了 selectedFKIdList
        if (sonObj != null && !String.isBlank(sonObj.Asset__c)) {
            soql += '  and Id != \'' + String.escapeSingleQuotes(sonObj.Asset__c) + '\'';
        }
        //自己状态
        // soql += '';
        if (!String.isBlank(keyword)) {
            String[] vals = keyword.split(' ');
             soql += ' and (';
             String fmodelno = '';
            for (String v : vals) {
                v = String.escapeSingleQuotes(v.replace('%', '\\%').replace('*', '%'));
                fmodelno += ' Product2.Fixture_Model_No_T__c like \'' + v + '\' ';
                fmodelno += ' or Product2.Name like \'' + v + '\' ';
                fmodelno += 'or';
            }
            fmodelno = fmodelno.removeEnd('or');
            soql += fmodelno + ' )';
        } else {
            soql += ' and Product2.Fixture_Model_No_T__c = \'' + String.escapeSingleQuotes(sonObj.FSD_Fixture_Model_No__c) + '\'';
        }
        //// TODO 暂时注释 画面から别省别本部别库存の判断
        //别存放地
        if (String.isNotBlank(bieCunFangDi) && bieCunFangDi != 'All') {
            soql += ' and Internal_asset_location__c = \'' + String.escapeSingleQuotes(bieCunFangDi) + '\'';
        }
        // else {
        //     String cunfangdiStr = '';
        //     for (String cunfangdi : cunfangdiSet) {
        //         cunfangdiStr += ' Internal_asset_location__c = \'' + String.escapeSingleQuotes(cunfangdi) + '\' OR';
        //     }
        //     soql += ' and (' + cunfangdiStr.removeEnd('OR') + ')';
        // }
        //别本部
        if (String.isNotBlank(bieBenBu) && !bieBenBu.contains('全部')) {
            // soql += ' and Salesdepartment__c = \'' + String.escapeSingleQuotes(bieBenBu) + '\'';
            List<String> bieBenBuList = bieBenBu.split(',');
            soql += RentalFixtureSetAssignController.setSoql('Salesdepartment__c', bieBenBuList);
            /*String benbuStr = '';
            for (String benbu : bieBenBuList) {
                benbuStr += ' Salesdepartment__c = \'' + String.escapeSingleQuotes(benbu) + '\' OR';
            }
            soql += ' and (' + benbuStr.removeEnd('OR') + ')';*/
        }
        else if (benbuSet.size() > 0) {
            String benbuStr = '';
            for (String benbu : benbuSet) {
                benbuStr += ' Salesdepartment__c = \'' + String.escapeSingleQuotes(benbu) + '\' OR';
            }
            soql += ' and (' + benbuStr.removeEnd('OR') + ')';
        }
        //产品分类
        if (String.isNotBlank(bieChanPinFenLei)) {
            soql += ' and Product_category__c = \'' + String.escapeSingleQuotes(bieChanPinFenLei) + '\'';
        }
        //别备品分类
        if (String.isNotBlank(bieBeiPinFenLei) && !bieBeiPinFenLei.contains('全部')) {
            List<String> bieBeiPinFenLeiList = bieBeiPinFenLei.split(',');
            soql += RentalFixtureSetAssignController.setSoql('Equipment_Type__c', bieBeiPinFenLeiList);
        }
        // 跳过已经选择的备品set明细
        // where not in selectedFKIdList 共通に作る ここでいらない
        system.debug(soql);
        //system.assertEquals('qyj',soql);
        return soql;
    }
    public override void setViewList(List<sObject> queryList) {
        viewList = new List<WrapperInfo>();
        List<Rental_Apply_Equipment_Set_Detail__c> groupByTargetList = new List<Rental_Apply_Equipment_Set_Detail__c>();
        if (selectedData.size() == 0) {
            // 因为是主体,肯定有数据,主体没有的情况,提示错误信息
            throw new ControllerUtil.myException('主体不存在,请选择有主体的数据。');
        }
        // 自己的数据打勾,被检索出来的数据不打勾
        // 選択済みの明细をviewListに追加
        if (selectedData.size() > 0) {
            for (Integer i = 0; i < selectedData.size(); i++) {
                /* not include the selected data num */
                // 501を超えた場合前500のみを出す
                //if (i == getSearchNumMax()) continue;
                Rental_Apply_Equipment_Set_Detail__c rsdObj = (Rental_Apply_Equipment_Set_Detail__c) selectedData[i];
                System.debug('rsdObj.Asset__c' + rsdObj.Asset__c);
                if (!String.isBlank(rsdObj.Asset__c)) {
                    viewList.add(new WrapperInfo(rsdObj, myComponentController));
                    viewList[viewList.size() - 1].lineNo = viewList.size() - 1;
                    viewList[viewList.size() - 1].check = true;
                    viewList[viewList.size() - 1].oldCheck = true;
                    if (is2B1 && pCunFangDi != rsdObj.Internal_asset_location__c) {
                        viewList[viewList.size() - 1].canEdit = false;
                    }
                    groupByTargetList.add(rsdObj);
                    // QueuePageByAssetId的URL, 加载排队画面用
                    queueByAsset = '/apex/QueuePageByAssetId?parentId=' + rsdObj.Rental_Apply_Equipment_Set__c + '&isNotShow=' + true;
                    assetId  = rsdObj.Asset__c;
                    rentalId = rsdObj.Rental_Apply_Equipment_Set__c;
                    modelNo  = rsdObj.Fixture_Model_No_text__c;
                    raesdId = rsdObj.Id;
                }
            }
        }
        // queryList に 数式項目を取得
        Savepoint sp = Database.setSavepoint();
        // 下にrollbackがあります
        System_UserSetting__c config = System_UserSetting__c.getInstance(UserInfo.getUserId());
        config.RentalApply_ByPass__c = true;
        // 組織のカスタム設定が作成してないの可能性がありますのでここでupsert
        FixtureUtil.withoutUpsertObjects(new System_UserSetting__c[]{config});
        //没有最新预计返回日用的一览
        Rental_Apply_Equipment_Set__c raes = new Rental_Apply_Equipment_Set__c(
            Rental_Apply__c = parentObj.Rental_Apply__c,
            Fixture_Set__c = parentObj.Fixture_Set__c,
            DataMigration_Flag__c = true);
        FixtureUtil.withoutInsert(new Rental_Apply_Equipment_Set__c[]{raes});
        // 数式項目値を取れるのために、一回Insertする
        List<Rental_Apply_Equipment_Set_Detail__c> tempList = new List<Rental_Apply_Equipment_Set_Detail__c>();
        for (Integer i = 0; i < queryList.size(); i++) {
            // 501を超えた場合前500のみを出す
            if (i == getSearchNumMax()) { break; }
            // 一覧のsize
            // ここnewではない、makeSelectedDataInfoのdataをcloneしてください。
            Rental_Apply_Equipment_Set_Detail__c mf = ((Rental_Apply_Equipment_Set_Detail__c) selectedData[0]).clone(false);
            // ****************注意:这里不能随意清空字段,如果要清空一定要慎重再慎重,因为保存的时候可能会把有值的字段清空掉
            // 因为检索的时候需要显示检索出来的Asset信息,所以需要清除Clone出来的值,好让数据可以的Handler里面赋成当前Asset值
            // mf.Fixture_Model_No_text__c = null; OLY_OCM-431 不设定, 设定的话 画面会显示成 代替品
            mf.SerialNumber_text__c = null;
            mf.SalesProvince_before__c = null;
            mf.Salesdepartment_before__c = null;
            mf.Product_category_text__c = null;
            mf.Equipment_Type_text__c = null;
            mf.Asset_cost_del_before__c = null;
            mf.Internal_asset_location_before__c = null;
            mf.Fixture_Name_text__c = mf.FSD_Name_CHN__c;
            mf.EquipmentSet_Managment_Code_text__c = null;
            Asset ass = (Asset)queryList[i];
            mf.Asset__c                             = ass.Id;
            /* ---------------- OLY_OCM-603 Start 最新预定归还日显示保有设备新建的公式字段 */
            // if (ass.Last_Reserve_RAES_Detail__c != null) {
                //有last的话一览为最新借出一览明细的一览(显示最新预计归还日)
                // mf.Rental_Apply_Equipment_Set__c = ass.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c;
            // } else {
                //没有last的话一览为新建的一览(最新预计归还日为空)
                mf.Rental_Apply_Equipment_Set__c = raes.Id;
            // }
            /* ---------------- OLY_OCM-603 End */
            mf.DataMigration_Flag__c                = true;
            tempList.add(mf);
        }
        Database.SaveResult[] results = FixtureUtil.withoutInsert(tempList, false);
        final String soqlStr = 'Select {0} {1} ';
        String whereStr = ' FROM Rental_Apply_Equipment_Set_Detail__c WHERE ID in: tempList';
        String soql = String.format(soqlStr, new String[] {myComponentController.strColumus , whereStr});
        tempList = FixtureUtil.queryTempList(soql, tempList);
        if (queryList.size() != tempList.size()) {
            //error message 検索処理正しくありません、システム管理者に連絡してください。
            for (Integer i = 0; i < results.size(); i ++) {
                Database.SaveResult dmlResult = results[i];
                if (!dmlResult.isSuccess()) {
                    System.debug(System.LoggingLevel.ERROR, '第[' + (i + 1) + ']条 insert error:' + dmlResult);
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,
                    '第[' + (i + 1) + ']条 insert error:' + dmlResult));
                    // 1件目だけlogに出す
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,
                        System.Label.CreateRelationListSearchError));
                    Database.rollback(sp);
                    return;
                }
            }
        }
        // 強制ロールバックしますが、数式の値が取れたインスタンスがfsDMapに保持
        Database.rollback(sp);
        Map<String, SObject> fsDMap = new Map<String, SObject>();
        for (Rental_Apply_Equipment_Set_Detail__c fsd : tempList) {
            Rental_Apply_Equipment_Set_Detail__c robj = fsd.clone(false);
            robj.DataMigration_Flag__c = false;
            fsDMap.put(fsd.Asset__c, robj);
        }
        // queryListとfsDMapよりnew WrapperInfo()して、viewListに追加
        for (Integer i = 0; i < queryList.size(); i++) {
            // 501を超えた場合前500のみを出す
            if (i == getSearchNumMax()) { break; }
            Rental_Apply_Equipment_Set_Detail__c mf = (Rental_Apply_Equipment_Set_Detail__c) fsDMap.get(queryList[i].Id);
            viewList.add(new WrapperInfo(mf, myComponentController));
            viewList[viewList.size() - 1].lineNo = viewList.size() - 1;
            if (is2B1 && pCunFangDi != mf.Internal_asset_location__c) {
                viewList[viewList.size() - 1].canEdit = false;
            }
            groupByTargetList.add(mf);
        }
system.debug('●●●●● setViewList END ' );
        // 一覧に対して、groupbyの項目の値を取得
        Map<Id, Map<String, FixtureUtil.groupBean>> rsdMap = FixtureUtil.raesdGroupByAssetId(
                groupByTargetList, myComponentController.columus);
        for (Rental_Apply_Equipment_Set_Detail__c rsdObj : groupByTargetList) {
            Map<String, FixtureUtil.groupBean> rsdGroupInfo = rsdMap.get(rsdObj.Asset__c);
            for (String apikey : rsdGroupInfo.keySet()){
                if (apikey.indexOf('_Jia__c') >= 0) {
                    if (apikey == 'Fu_Shu_Pin_Fen_Pei_Jia__c' || apikey == 'Zhu_Ti_Fen_Pei_Jia__c') {
                        // 別途設定する
                        continue;
                    } else {
                        rsdObj.put(apikey, rsdGroupInfo.get(apikey).gnum);
                    }
                }
            }
            // 自己:分配 或者 暂定分配 了的 就是这个asset的时候
            if (sonObj.Asset__c == rsdObj.Asset__c) {
                // RAESD_Status__c 里可能会出 暂定分配
                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = rsdObj.RAESD_Status__c;
            }
            // 自己是排队中 and 看别人是已分配, 的时候
            else if (sonObj.Queue_Number__c > 0
                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c != null) {
                // 自己显示 Mei_You_Ku_Cun
                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
            }
            // 自己不是排队中 and 看别人是已分配, 的时候
            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c != null) {
                // 自己显示 Mei_You_Ku_Cun
                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
            }
            // 自己是排队中 and 看别人是 没有分配 的时候
            else if (sonObj.Queue_Number__c > 0
                    && String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
            ) {
                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0) {
                    // 自己显示 Ke_Yi_Fen_Pei
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
                } else {
                    // 自己显示 Mei_You_Ku_Cun
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
                }
            }
            // 自己不是排队中 and 看别人是 没有分配 的时候
            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
                    && String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
            ) {
                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0) {
                    // 自己显示 Ke_Yi_Fen_Pei
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
                } else {
                    // 自己显示 Mei_You_Ku_Cun
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
                }
            }
            // 自己是排队中 and 看别人是 暂定分配 的时候
            else if (sonObj.Queue_Number__c > 0
                    && String.isNotBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null
            ) {
                // 自己显示 Ke_Yi_Fen_Pei
                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
            }
            // 自己不是排队中 and 看别人是 暂定分配 的时候
            else if ((sonObj.Queue_Number__c == 0 || sonObj.Queue_Number__c == null)
                    && String.isNotBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
                    && rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null
            ) {
                // 自己显示 Ke_Yi_Fen_Pei
                rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
            }
            // else: 要做到 原则不会发生  // 会后这个 TODO 有关联 ?? TODO why要看? 要看的话 另外3个别字段不看吗?
            else {
                // 以下は 念のためのロジック
                // 看别人是 (暂定分配 or 没有分配), 的时候
                if (rsdObj.Asset__r.You_Xiao_Ku_Cun__c > 0
                        && (String.isBlank(rsdObj.Asset__r.Last_Reserve_RAES_Detail__c)
                                || rsdObj.Asset__r.Last_Reserve_RAES_Detail__r.Select_Time__c == null)
                ) {
                    // 自己显示 Ke_Yi_Fen_Pei
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Ke_Yi_Fen_Pei.ordinal());
                }
                else {
                    // 自己显示 Mei_You_Ku_Cun
                    rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.AssetFixtureStatus.Mei_You_Ku_Cun.ordinal());
                }
            }
            // if (rsdObj.Select_Time__c != null) {
            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.HistoryStatus.Yi_Fen_Pei.ordinal());
            // } else if (rsdObj.Queue_Number__c == 0 && rsdObj.Queue_Day__c != null) {
            // // 暂定分配 未分配并且排队的第一个
            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(FixtureUtil.HistoryStatus.Zan_Ding_Fen_Pei.ordinal());
            // }else if (rsdObj.Queue_Number__c > 0) {
            //     //已排队状态设值
            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Pai_Dui_Zhong.ordinal());
            // } else if (rsdObj.Cancel_Select__c) {
            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Qu_Xiao.ordinal());
            // }else {
            //     rsdObj.Zhu_Ti_Fen_Pei_Jia__c = FixtureUtil.assetFixtureStatusMap.get(subjectStatus);
            // }
       }
       wrapperStr = JSON.serialize(viewList);
       System.debug(LoggingLevel.INFO, '*** wrapperStr: ' + wrapperStr);
system.debug('●●●●● raesdGroupByAssetId END ' );
    }
    public String getWrapperJSON(){
        System.debug(LoggingLevel.INFO, '*** wrapperStr: ' + wrapperStr);
        return wrapperStr;
    }
    /**
     * OLY_OCM-431 raesdList 是一对一分配对象, 但是里面有之前是手动分配的已下架明细
     * 对 raesdList 进行一对一分配
     * @param raesdList select from Rental_Apply_Equipment_Set_Detail__c 找出需要分配的对象
     * @param oneToOneListMap 被分配对象 {Fixture_Model_No_F__c: [Asset.Id]}
     * @param assetKuCunMap 分配前的 Asset 的有效库存 (You_Xiao_Ku_Cun__c) {Id<Asset>: Asset{You_Xiao_Ku_Cun__c}}
     * @param fOtoMap 之前的一对一分配数也需要一起清空 + 今回の更新一对一分配的Link表
     * @param selectTime 主体的分配时间
     * @param rtnMfUpsert 更新用, 有返回的功能
     * @param rtnOldMap 重新分配 对象Map, 有返回的功能
     */
    private void oneToOneSelect(List<Rental_Apply_Equipment_Set_Detail__c> raesdList
            , Map<String, List<Fixture_OneToOne_Link__c>> oneToOneListMap
            , Map<Id, Asset> assetKuCunMap
            , Map<Id, Fixture_OneToOne_Link__c> fOtoMap
            , Datetime selectTime
            , Map<String, Rental_Apply_Equipment_Set_Detail__c> rtnMfUpsert
            , Map<Id, Rental_Apply_Equipment_Set_Detail__c> rtnOldMap) {
        List<Rental_Apply_Equipment_Set_Detail__c> rtnOldList = new List<Rental_Apply_Equipment_Set_Detail__c>();
        for (Rental_Apply_Equipment_Set_Detail__c accessoryObj : raesdList) {
            List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(accessoryObj.FSD_Fixture_Model_No__c);
            if (oneToOneAsetIdList == null || oneToOneAsetIdList.isEmpty()) {
                // 没有一对一了, 不分配
            } else {
                // 有一对一定义的附属品
                // 备品有效库存
                Integer num = Integer.valueof(assetKuCunMap.get(oneToOneAsetIdList[0].Accessory_Asset__c).You_Xiao_Ku_Cun__c);
                // TODO if (num < oneToOneAsetIdList.size()) {
                if (num < 1) {
                    // [' + accessoryObj.FSD_Fixture_Model_No__c + '] 的一对一定义没有足够库存,请确认一对一定义');
                    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING, '一对一没有全部分配'));
                }
                else {
                    // 已下架, 没有出库的话的话, 要先做 重新分配
                    if (accessoryObj.StockDown__c && String.isBlank(accessoryObj.DeliverySlip__c)) {
                        // 在庫まずみない
                        rtnOldList.add(accessoryObj);
                        rtnOldMap.put(accessoryObj.Id, accessoryObj);
                        accessoryObj.Cancel_Select__c = true;
                        accessoryObj.Cancel_Reason__c = '重新分配';
                        accessoryObj.Loaner_cancel_Remarks__c = '下架后一对一重新分配';
                    }
                    // 不是已下架的话, 可以分配
                    else {
                        if (!fOtoMap.containsKey(oneToOneAsetIdList[0].Id)) {
                            oneToOneAsetIdList[0].Select_Accessory_Asset_Cnt__c = 0;
                            fOtoMap.put(oneToOneAsetIdList[0].Id, oneToOneAsetIdList[0]);
                        }
                        // 有 一对一 附属品
                        // accessoryObj.UniqueKey__c   // and UniqueKey__c != null
                        accessoryObj.Fixture_OneToOne_Link_Id__c = oneToOneAsetIdList[0].Id; // 有 remove(0), 所以取[0]
                        accessoryObj.Asset__c = oneToOneAsetIdList[0].Accessory_Asset__c;
                        accessoryObj.Select_Time__c = selectTime;      // 主体的分配时间
                        accessoryObj.Shipment_request_time2__c = null;
                        accessoryObj.Shipment_request__c = false;
                        rtnMfUpsert.put(accessoryObj.UniqueKey__c, accessoryObj);
                        Fixture_OneToOne_Link__c fot = fOtoMap.get(oneToOneAsetIdList[0].Id);
                        fot.Select_Accessory_Asset_Cnt__c += 1;
                        fOtoMap.put(oneToOneAsetIdList[0].Id, fot);
                        oneToOneAsetIdList.remove(0);
                    }
                }
            }
        }
        // 确认 rtnOldMap 还能不能一对一分配
        for (Rental_Apply_Equipment_Set_Detail__c accessoryObj : rtnOldList) {
            List<Fixture_OneToOne_Link__c> oneToOneAsetIdList = oneToOneListMap.get(accessoryObj.FSD_Fixture_Model_No__c);
            if (oneToOneAsetIdList == null || oneToOneAsetIdList.isEmpty()) {
                // 没有一对一了, 不分配
                rtnOldMap.remove(accessoryObj.Id);
            } else {
                // 有一对一定义的附属品
            }
        }
    }
    //特殊排队
    public PageReference specialScheduel(){
        List<Rental_Apply_Equipment_Set__c> mfUpdate = new List<Rental_Apply_Equipment_Set__c>();
        Savepoint sp = Database.setSavepoint();
        try {
            // 先判断当前操作用户的存放地和申请单的存放地是否一致
            if (!enableRunCheck()) {
                throw new ControllerUtil.myException('无权限操作当前单据进行排队!');
            }
            if(String.isEmpty(bieCunFangDi)){
                throw new ControllerUtil.myException('特殊排队时,请选择备品存放地');
            }
            if(bieCunFangDi != parentObj.Rental_Apply__r.Internal_asset_location_F__c){
                throw new ControllerUtil.myException('特殊排队时,不能跨备品存放地排队');
            }
            /*if(String.isEmpty(bieChanPinFenLei)){
                throw new ControllerUtil.myException('特殊排队时,产品分类必填!');
            }*/
            if(String.isEmpty(bieBeiPinFenLei)){
                throw new ControllerUtil.myException('特殊排队时,请选择备品分类');
            }
            if(bieBeiPinFenLei.contains('全部')){
                throw new ControllerUtil.myException('特殊排队时,备品分类不能选择全部!');
            }
            if(String.isEmpty(bieBenBu)){
                throw new ControllerUtil.myException('特殊排队时,请选择本部');
            }
            if(bieBenBu.contains('全部')){
                throw new ControllerUtil.myException('特殊排队时,本部不能选择全部!');
            }
            if(parentObj.Rental_Apply__r.Demo_purpose1__c == '维修代用' || parentObj.Rental_Apply__r.Demo_purpose1__c == '协议借用'){
                 throw new ControllerUtil.myException('当前使用目的不允许特殊排队!');
            }
            // 当申请人=FSE、使用目的2=学会展会时,不可以操作特殊排队
            if(parentObj.Rental_Apply__r.demo_purpose2__c == '学会展会' && parentObj.Rental_Apply__r.Owner.Profile.Name.contains('FSE')){
                 throw new ControllerUtil.myException('服务培训/学会申请单无特殊排队!');
            }
            if((bieBenBu.contains('MA本部') || bieBenBu.contains('产品培训')) && (bieBenBu.countMatches('本部') > 1 || bieBenBu.contains('备品中心'))){
                throw new ControllerUtil.myException('MA本部/产品培训本部不能与其他本部同时选择!');
            }
            if((bieBeiPinFenLei.contains('产品试用') && bieBeiPinFenLei.contains('协议借用'))
                || (bieBeiPinFenLei.contains('协议借用') && bieBeiPinFenLei.contains('维修'))
                || (bieBeiPinFenLei.contains('产品试用') && bieBeiPinFenLei.contains('维修'))){
                throw new ControllerUtil.myException('维修类、试用类、协议借用类不能同时选择!');
            }
            if(parentObj.Rental_Apply__r.Demo_purpose1__c == '产品试用'
                && (bieBeiPinFenLei.contains('协议借用') || bieBeiPinFenLei.contains('维修'))){
                throw new ControllerUtil.myException('产品试用的申请单,不可以选择维修类、协议借用类的备品分类');
            }
            if((parentObj.Rental_Apply__r.demo_purpose2__c == '试用(无询价)'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '试用(有询价)'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '已购待货'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '新产品评价')
                && sonObj.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c == '新产品') {
                throw new ControllerUtil.myException('不能参与特殊排队');
            }
            startQueue('特殊排队');
            if(allSpecialQueue() && parentObj.Rental_Apply__r.CampaignType__c != null){
                Rental_Apply__c raObj = new Rental_Apply__c();
                raObj.Id = parentObj.Rental_Apply__c;
                raObj.CampaignType__c = null;
                update raObj;
            }
        } catch (Exception e) {
            System.debug('e.getMessage()***'+ e.getMessage());
            ApexPages.addMessages(e);
            Database.rollback(sp);
            return null;
        }
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'排队成功'));
        // 排队成功后,加载排队画面
        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
        // 排队成功后,需要重新获取sonObj和parentObj
        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
                       Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
                       Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
                       Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                       Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
                 FROM Rental_Apply_Equipment_Set_Detail__c
                WHERE Rental_Apply_Equipment_Set__c = :parentId
                  and Is_Body__c = true
                  and Cancel_Select__c = false];
        if (!raesdObjs.isEmpty()) {
            sonObj = raesdObjs[0];
            List<Rental_Apply_Equipment_Set__c> parentObjs = [
                    SELECT Id, Rental_Apply__r.Name,
                           Rental_Apply__r.Owner.Name,
                           Rental_Apply__r.Owner.Profile.Name,
                           Rental_Apply__r.Salesdept__c,
                           Rental_Apply__r.WorkPlace__c,
                           Rental_Apply__r.Request_shipping_day__c,
                           Fu_Shu_Pin_Fen_Pei_Jia__c,
                           Rental_Apply__r.Demo_purpose1__c,
                           Rental_Apply__r.demo_purpose2__c,
                           Rental_Apply__r.CampaignType__c,
                           Fixture_Set__r.Product_Category_GI_SP__c,
                           Fixture_Set__r.Equipment_Type__c,
                           Rental_Apply__r.Request_return_day__c,
                           Rental_Apply__r.Salesdepartment__c,
                           Rental_Apply__r.Equipment_Type_F__c,
                           Rental_Apply__r.Internal_asset_location_F__c,
                           Fixture_Set__r.Fixture_Set_Body_Model_No__c,
                           Rental_Apply__r.Product_category__c,
                           Rental_Apply__r.Loaner_centre_mail_address__c,
                           First_RAESD__r.Is_Body__c,
                           Irreplaceable_flag__c,
                           Rental_Start_Date__c,
                           Rental_End_Date__c,
                           Rental_Apply__c,
                           Fixture_Set__c,
                           RequestNoJoinStr2__c
                    FROM Rental_Apply_Equipment_Set__c
                    where Id = :parentId];
            if (!parentObjs.isEmpty()) {
                parentObj = parentObjs.get(0);
            }
        }
        return null;
    }
    //默认排队
    public PageReference defaultScheduel(){
        Savepoint sp = Database.setSavepoint();
        try {
            // 先判断当前操作用户的存放地和申请单的存放地是否一致
            if (!enableRunCheck()) {
                throw new ControllerUtil.myException('无权限操作当前单据进行排队!');
            }
            if(parentObj.Rental_Apply__r.demo_purpose2__c == '学会展会'
                && !(parentObj.Rental_Apply__r.Salesdepartment__c.contains('MA本部')
                    || parentObj.Rental_Apply__r.Salesdepartment__c.contains('产品培训'))
                && String.isEmpty(campaignType)){
                throw new ControllerUtil.myException('请选择学会类型!');
            }
            if(sonObj.QuenType__c == '默认排队'
                && sonObj.Queue_Number__c > 0
                && sonObj.Queue_Day__c != null
                && campaignType == parentObj.Rental_Apply__r.CampaignType__c){
                throw new ControllerUtil.myException('已参与默认排队');
            }
            startQueue('默认排队');
        }
        catch (Exception e) {
            System.debug('e.getMessage()***'+ e.getMessage());
            ApexPages.addMessages(e);
            Database.rollback(sp);
            return null;
        }
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'排队成功'));
        // 排队成功后,加载排队画面
        queueByAsset = '/apex/QueuePageByAssetId?parentId=' + parentObj.Id + '&isNotShow=' + true;
        // 排队成功后,需要重新获取sonObj和parentObj
        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c, Queue_Day__c,
                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c, QuenType__c,
                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c, ExternalKey__c,Rental_Apply__c,
                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,
                       Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
                       Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
                       Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                       Salesdepartment_before__c, Equipment_Type_text__c, Product_category_text__c
                 FROM Rental_Apply_Equipment_Set_Detail__c
                WHERE Rental_Apply_Equipment_Set__c = :parentId
                  and Is_Body__c = true
                  and Cancel_Select__c = false];
        if (!raesdObjs.isEmpty()) {
            sonObj = raesdObjs[0];
            List<Rental_Apply_Equipment_Set__c> parentObjs = [
                    SELECT Id, Rental_Apply__r.Name,
                           Rental_Apply__r.Owner.Name,
                           Rental_Apply__r.Owner.Profile.Name,
                           Rental_Apply__r.Salesdept__c,
                           Rental_Apply__r.WorkPlace__c,
                           Rental_Apply__r.Request_shipping_day__c,
                           Fu_Shu_Pin_Fen_Pei_Jia__c,
                           Rental_Apply__r.Demo_purpose1__c,
                           Rental_Apply__r.demo_purpose2__c,
                           Rental_Apply__r.CampaignType__c,
                           Fixture_Set__r.Product_Category_GI_SP__c,
                           Fixture_Set__r.Equipment_Type__c,
                           Rental_Apply__r.Request_return_day__c,
                           Rental_Apply__r.Salesdepartment__c,
                           Rental_Apply__r.Equipment_Type_F__c,
                           Rental_Apply__r.Internal_asset_location_F__c,
                           Fixture_Set__r.Fixture_Set_Body_Model_No__c,
                           Rental_Apply__r.Product_category__c,
                           Rental_Apply__r.Loaner_centre_mail_address__c,
                           First_RAESD__r.Is_Body__c,
                           Irreplaceable_flag__c,
                           Rental_Start_Date__c,
                           Rental_End_Date__c,
                           Rental_Apply__c,
                           Fixture_Set__c,
                           RequestNoJoinStr2__c
                    FROM Rental_Apply_Equipment_Set__c
                    where Id = :parentId];
            if (!parentObjs.isEmpty()) {
                parentObj = parentObjs.get(0);
            }
        }
        return null;
    }
    // 判断当前操作用户的存放地和申请单的存放地是否一致
    public Boolean enableRunCheck() {
        // 用户分公司:北京,上海,广州
        User u = [SELECT Id, Branch__c FROM User WHERE Id =:UserInfo.getUserId() Limit 1];
        // 申请单 申请者Email
        if (FixtureUtil.locationMap.get(u.Branch__c + ' 备品中心') != parentObj.Rental_Apply__r.Loaner_centre_mail_address__c) {
            return false;
        } else {
            return true;
        }
        return false;
    }
    //排队No置顶
    public PageReference topInLine(){
        Savepoint sp = Database.setSavepoint();
        try {
            QueuePageByAssetIdController qpbaController = new QueuePageByAssetIdController();
            qpbaController.saveQueue(sonObj, 1, true, false);
        }
        catch (Exception e) {
            System.debug('e.getMessage()***'+ e.getMessage()+e.getLineNumber());
            ApexPages.addMessages(e);
            Database.rollback(sp);
            return null;
        }
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'排队置顶成功'));
        return null;
    }
    // 如果默认分配改为特殊排队了,需要确认申请单中所有的一览是否都没有默认排队
    public Boolean allSpecialQueue(){
        List<Rental_Apply_Equipment_Set_Detail__c> details = [SELECT Id
                                                                FROM Rental_Apply_Equipment_Set_Detail__c
                                                                WHERE Rental_Apply__c =: parentObj.Rental_Apply__c
                                                                  AND Cancel_Select__c = false
                                                                  AND Is_Body__c = true
                                                                  AND QuenType__c = '默认排队'];
        if (details != null && details.size() > 0) {
            return false;
        }
        return true;
    }
    public void startQueue(String queuetype){
        System.debug(LoggingLevel.INFO, '*** queuetype: ' + queuetype);
        // 查询排队需要处理的数据
        List<Rental_Apply_Equipment_Set_Detail__c> raesdObjs = [
                SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                       FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c,
                       Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c,
                       Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c,Rental_Apply__c,
                       Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c,
                       Salesdepartment_before__c,Rental_Apply__r.Request_shipping_day__c,QuenType__c,IsAdjust__c,Rental_Apply__r.Request_approval_time__c,
                       Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
                       Queue_Time_F__c, IndexFromUniqueKey__c
                FROM Rental_Apply_Equipment_Set_Detail__c
                WHERE Rental_Apply_Equipment_Set__c =:parentObj.Id
                AND Cancel_Select__c = false
                AND Is_Body__c = true
                FOR Update];
        if(queuetype == '默认排队'){
            if(changeCampaignType){
                List<Rental_Apply_Equipment_Set_Detail__c> oldQueenList = [
                        SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                               FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Rental_Apply__r.demo_purpose2__c,Queue_Day__c,ExternalKey__c,
                               Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Allow_Adjust_Queue_Flag__c,
                               Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,Fixture_Model_No__c,Rental_Apply__c,
                               Internal_asset_location_before__c,Salesdepartment__c, Product_category_F__c, Product_category_text__c,Equipment_Type_text__c,
                               Salesdepartment_before__c,Rental_Apply__r.Request_shipping_day__c,QuenType__c,IsAdjust__c,Rental_Apply__r.Request_approval_time__c,
                               Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c,
                               Queue_Time_F__c, IndexFromUniqueKey__c
                        FROM Rental_Apply_Equipment_Set_Detail__c
                        WHERE Rental_Apply__c =: parentObj.Rental_Apply__c
                        AND Id !=: sonObj.Id
                        AND QuenType__c = '默认排队'
                        AND Queue_Number__c > 0
                        AND Cancel_Select__c = false
                        AND Is_Body__c = true
                        FOR Update];
                raesdObjs.addAll(oldQueenList);
            }
            // 学会类型发生变化时,更新申请单
            if (campaignType != parentObj.Rental_Apply__r.CampaignType__c) {
                Rental_Apply__c raObj = new Rental_Apply__c();
                raObj.Id = parentObj.Rental_Apply__c;
                raObj.CampaignType__c = campaignType;
                update raObj;
            }
        }
        List<String> modelList = new List<String>();
        List<String> departmentsList = new List<String>();
        List<String> departmentList = new List<String>();
        List<String> locationList = new List<String>();
        List<String> categoryList = new List<String>();
        List<String> equipmentList = new List<String>();
        List<String> equipmentsList = new List<String>();
        List<String> locationsetList = new List<String>();
        List<String> sequencekeylist = new List<String>();
        List<String> detailIds = new List<String>();
        List<String> queuekeyList = new List<String>();
        List<Rental_Apply_Sequence__c> allsequenceList = new List<Rental_Apply_Sequence__c>();
        Map<String,List<Rental_Apply_Equipment_Set_Detail__c>> detailMap = new Map<String,List<Rental_Apply_Equipment_Set_Detail__c>>();
        List<String> queueIds = new List<String>();
        List<Rental_Apply_Equipment_Set_Detail__c> updateList = new List<Rental_Apply_Equipment_Set_Detail__c>();
        List<String> changeddetailIds = new List<String>();
        for (Rental_Apply_Equipment_Set_Detail__c raesd : raesdObjs) {
            String oldKey = raesd.ExternalKey__c;
            // 改变学会类型,会改变本申请单中已默认排队的其余一览,所以校验放在此处
            String modelType = raesd.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c;
            if(modelType == null && queuetype == '默认排队'
                && (parentObj.Rental_Apply__r.demo_purpose2__c == '试用(无询价)'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '试用(有询价)'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '已购待货'
                    || parentObj.Rental_Apply__r.demo_purpose2__c == '新产品评价'
                    || (parentObj.Rental_Apply__r.demo_purpose2__c == '学会展会' && campaignType == '营业本部学会'))){
                throw new ControllerUtil.myException('备品产品类型为空!');
            }
            RentalFixtureSetAssignController.KeyObj obj = null;
            if(queuetype == '默认排队'){
                RentalFixtureSetAssignController.ApplyObj applyObj = new RentalFixtureSetAssignController.ApplyObj();
                applyObj.location = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
                applyObj.productType = parentObj.Rental_Apply__r.Product_category__c;
                applyObj.salesdepartment = parentObj.Rental_Apply__r.Salesdepartment__c ;
                applyObj.purpose1 = parentObj.Rental_Apply__r.Demo_purpose1__c;
                applyObj.purpose2 = parentObj.Rental_Apply__r.demo_purpose2__c;
                applyObj.campaignType = campaignType;
                obj = RentalFixtureSetAssignController.getdefultInfo(raesd,applyObj,bieCunFangDi);
                // 排队后,默认排队值需要在画面端显示  本部
                bieBenBu = obj.salesdepartments;
                // 排队后,默认排队值需要在画面端显示  备品分类
                bieBeiPinFenLei = obj.equipmenttypes;
                // 备品存放地和产品分类默认是申请单上的数据,不用特意设置
            }else{
                RentalFixtureSetAssignController.KeyObj keyObj = new RentalFixtureSetAssignController.KeyObj();
                keyObj.model = raesd.Fixture_Model_No__c;
                keyObj.location = parentObj.Rental_Apply__r.Internal_asset_location_F__c;
                keyObj.productType = String.isBlank(bieChanPinFenLei)?'GI,SP':bieChanPinFenLei;
                System.debug('bieBeiPinFenLei===========================' + bieBeiPinFenLei);
                keyObj.equipmenttypes = bieBeiPinFenLei;
                keyObj.salesdepartments = bieBenBu;
                RentalFixtureSetAssignController.getsequencekeyList(keyObj);
                obj = keyObj;
                System.debug('obj.equipmenttypes===========================' + obj.equipmenttypes);
                System.debug('obj.sequencekeyList===========================' + obj.sequencekeyList);
            }
            queueIds.add(raesd.Id);
            // keyObjMap.put(raesd.Id,obj);
            modelList.add(obj.model);
            departmentsList.addAll(obj.salesdepartmentList);
            locationList.add(obj.location);
            equipmentsList.addAll(obj.equipmentList);
            categoryList.addAll(obj.productTypes);
            sequencekeylist.addAll(obj.sequencekeylist);
            String key = obj.model + obj.location + obj.salesdepartments + obj.equipmenttypes + obj.productType;
            if(key == oldKey){
                changeddetailIds.add(raesd.Id);
            }
            // 备品配套明细型号(借出时)
            raesd.Fixture_Model_No_text__c = obj.model;
            // 所在地区(本部) 借出时
            raesd.Salesdepartment_before__c = obj.salesdepartments;
            // 产品分类(GI/SP)(借出时)
            raesd.Product_category_text__c = obj.productType;
            // 备品分类(借出时)
            raesd.Equipment_Type_text__c = obj.equipmenttypes;
            // 备品存放地(借出时)
            raesd.Internal_asset_location_before__c = obj.location;
            raesd.ExternalKey__c = key;
            raesd.QuenType__c = queuetype;
            raesd.Queue_User__c   = UserInfo.getUserId();
            raesd.Queue_Day__c    = Date.today();
            raesd.Queue_Time__c   = getCurrentTime();
            raesd.Select_Time__c  = null;
            raesd.Asset__c        = null;
            // 已出库指示的排队后清除出库指示信息
            raesd.Shipment_request_time2__c = null;
            raesd.Shipment_request__c = false;
            raesd.Queue_Number__c = -1;
            raesd.IsAdjust__c     = false;
            // OLY_OCM-243 追加字段对应 备品管理编码(借出时) 排队时清除与asset相连的借出时相关的字段
            raesd.EquipmentSet_Managment_Code_text__c = null;
            // 机身编号(借出时)
            raesd.SerialNumber_text__c = null;
            // 备品成本(借出时)
            raesd.Asset_cost_del_before__c = null;
            detailIds.add(raesd.Id);
            updateList.add(raesd);
            // KeyObj obj = keyObjMap.get(raesd.Id);
            System.debug(LoggingLevel.INFO, '*** KeyObj obj: ' + obj);
            for(String sales:obj.salesdepartmentList){
                for(String equip:obj.equipmentList){
                    for(String type:obj.productTypes){
                        Rental_Apply_Sequence__c newSequence = new Rental_Apply_Sequence__c();
                        newSequence.ExternalKey__c = obj.model + obj.location + sales + equip + type;
                        newSequence.Demo_Purpose2__c = raesd.Rental_Apply__r.demo_purpose2__c;
                        newSequence.Apply_Set_Detail__c = raesd.Id;
                        newSequence.Series_No__c = raesd.Queue_Number__c;
                        newSequence.Salesdepartment__c = sales;
                        newSequence.Product_category__c = type;
                        newSequence.Rental_Apply__c = raesd.Rental_Apply__c;
                        newSequence.Internal_asset_location__c = obj.location;
                        newSequence.Fixture_Model_No__c = obj.model;
                        newSequence.Equipment_Type__c = equip;
                        allsequenceList.add(newSequence);
                    }
                }
            }
            queuekeyList.add(key);
            departmentList.addAll(RentalFixtureSetAssignController.transferStringToList(obj.salesdepartments));
            equipmentList.addAll(RentalFixtureSetAssignController.transferStringToList(obj.equipmenttypes));
        }
        System.debug(LoggingLevel.INFO, '**1111* updateList: ' + updateList);
        System.debug(LoggingLevel.INFO, '*** queueIds: ' + queueIds);
        System.debug(LoggingLevel.INFO, '*** modelList: ' + modelList);
        System.debug(LoggingLevel.INFO, '*** departmentsList: ' + departmentsList);
        System.debug(LoggingLevel.INFO, '*** locationList: ' + locationList);
        System.debug(LoggingLevel.INFO, '*** categoryList: ' + categoryList);
        System.debug(LoggingLevel.INFO, '*** equipmentList: ' + equipmentList);
        String soqlStr = 'Select Id, Last_Reserve_RAES_Detail__c, Fixture_Model_No_F__c, You_Xiao_Ku_Cun__c,'
                    + ' Salesdepartment__c, SalesProvince__c, Product_category__c, Equipment_Type__c, Internal_asset_location__c'
                     + ' From Asset '
                    + ' Where Asset_Owner__c = \'Olympus\''
                    + ' and Asset_loaner_category__c != \'耗材\''
                    + ' and RecordTypeId = \'01210000000kOPR\''
                    + ' and Delete_Flag__c = False'
                    + ' and Freeze_sign_Abandoned_Flag__c = False'
                    + ' and Product2.Fixture_Model_No_T__c IN:modelList'
                    + ' and Salesdepartment__c IN: departmentsList'
                    + ' and Internal_asset_location__c IN: locationList'
                    + ' and Product_category__c IN:categoryList'
                    + ' and Equipment_Type__c IN: equipmentList'
                    + ' and ' + FixtureUtil.getAssetSoqlBase()
                    + ' order by Id';
        // 检索符合这四个别字段和同一产品型号的数据存在与否
        System.debug(LoggingLevel.INFO, '*** soqlStr: ' + soqlStr);
        List<Asset> aSetCheck = Database.query(soqlStr);
        for (Asset ass : aSetCheck) {
            String key = ass.Fixture_Model_No_F__c + ass.Internal_asset_location__c + ass.Salesdepartment__c + ass.Equipment_Type__c + ass.Product_category__c;
            System.debug(LoggingLevel.INFO, '*** key: ' + key);
            if (ass.Last_Reserve_RAES_Detail__c == null && ass.You_Xiao_Ku_Cun__c > 0) {
                throw new ControllerUtil.myException(ass.Fixture_Model_No_F__c +' 有可以分配主体不需要排队');
            }
        }
        System.debug(LoggingLevel.INFO, '*** queuekeyList: ' + queuekeyList);
        Map<String,List<Rental_Apply_Equipment_Set_Detail__c>> queueMap = new Map<String,List<Rental_Apply_Equipment_Set_Detail__c>>();
        List<Rental_Apply_Equipment_Set_Detail__c> queueList = [SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,
                                                                   FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Externalkey__c,Rental_Apply__r.demo_purpose2__c,Equipment_Type_text__c,
                                                                   Is_Body__c, FSD_Is_OneToOne__c, Select_Time__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,Fixture_Model_No__c,
                                                                   Cancel_Select__c, Fixture_Model_No_F__c, Queue_Number__c, Internal_asset_location__c,IsAdjust__c,Queue_Day__c,Queue_Time__c,
                                                                   Salesdepartment__c, Product_category_F__c, Equipment_Type__c, Rental_Apply__r.Internal_asset_location_F__c,
                                                                   Cancel_Reason__c,Loaner_cancel_reason__c,Loaner_cancel_Remarks__c ,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.Request_approval_time__c,
                                                                   Queue_Time_F__c,IndexFromUniqueKey__c
                                                            FROM Rental_Apply_Equipment_Set_Detail__c
                                                            WHERE Externalkey__c IN :queuekeyList
                                                            AND Cancel_Select__c = false
                                                            AND Is_Body__c = true
                                                            AND Id NOT IN:queueIds
                                                            AND Queue_Number__c > 0
                                                            FOR Update];
        updateList.addAll(queueList);
        System.debug(LoggingLevel.INFO, '***old updateList: ' + updateList.size());
        updateList = Batch_QueueAllDetail.getSortDetailList(updateList);
        System.debug(LoggingLevel.INFO, '*** updateList: ' + updateList.size());
        update updateList;
        System.debug(LoggingLevel.INFO, '*** allsequenceList: ' + allsequenceList.size());
        List<Rental_Apply_Sequence__c> oldSequenceList = [SELECT Id,ExternalKey__c,Fixture_Model_No__c FROM Rental_Apply_Sequence__c
                                                        WHERE Apply_Set_Detail__c IN:detailIds];
        System.debug(LoggingLevel.INFO, '*** oldSequenceList.size(): ' + oldSequenceList.size());
        Set<String> keys = new Set<String>();
        for(Rental_Apply_Sequence__c se:oldSequenceList){
            keys.add(se.ExternalKey__c);
        }
        Integer count = [SELECT count() FROM Rental_Apply_Sequence__c WHERE ExternalKey__c IN:keys];
        if(updateList.size() + count + oldSequenceList.size() > 9900){
            throw new ControllerUtil.myException('当前排队数据量过大,请稍后操作');
        }
        List<Rental_Apply_Sequence__c> olddleteSequenceList = [SELECT Id,ExternalKey__c,Fixture_Model_No__c FROM Rental_Apply_Sequence__c
                                                        WHERE Apply_Set_Detail__c IN:changeddetailIds];
        delete olddleteSequenceList;
        if(updateList.size() + count + oldSequenceList.size() + allsequenceList.size() > 9900){
            throw new ControllerUtil.myException('当前排队数据量过大,请稍后操作');
        }
        insert allsequenceList;
        List<String> newSequenceIds = new List<String>();
        for(Rental_Apply_Sequence__c se:allsequenceList){
            newSequenceIds.add(se.Id);
        }
        allsequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,
                                    Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c,
                                    Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c,
                                    Rental_Apply__c,Internal_asset_location__c,Series_Unequal_Queue_Flag__c,
                                    Apply_Set_Detail__r.Queue_Number__c,
                                    Fixture_Model_No__c,Equipment_Type__c,
                                    Apply_Set_Detail__r.Queue_Time_F__c,
                                    Apply_Set_Detail__r.IndexFromUniqueKey__c
                            FROM Rental_Apply_Sequence__c
                            WHERE Id IN:newSequenceIds];
        List<String> nodusequencekeylist = new List<String>(new Set<String>(sequencekeylist));
        System.debug(LoggingLevel.INFO, '*** nodusequencekeylist: ' + JSON.serialize(nodusequencekeylist));
        System.debug(LoggingLevel.INFO, '*** nodusequencekeylist.size(): ' + nodusequencekeylist.size());
        if(nodusequencekeylist.size() > 950){
            throw new ControllerUtil.myException('当前排队数据量过大,请选择单个主体操作');
        }
        List<Rental_Apply_Sequence__c> updateSequenceList = new List<Rental_Apply_Sequence__c>();
        List<Rental_Apply_Sequence__c> newSequenceList = new List<Rental_Apply_Sequence__c>();
        List<Rental_Apply_Sequence__c> applysequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c,
                                                                Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c,
                                                                Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c,
                                                                Rental_Apply__c,Internal_asset_location__c,Series_Unequal_Queue_Flag__c,
                                                                Apply_Set_Detail__r.Queue_Number__c,
                                                                Fixture_Model_No__c,Equipment_Type__c,
                                                                Apply_Set_Detail__r.Queue_Time_F__c,
                                                                Apply_Set_Detail__r.IndexFromUniqueKey__c
                                                        FROM Rental_Apply_Sequence__c
                                                        WHERE ExternalKey__c IN: nodusequencekeylist
                                                        AND Series_No__c > 0
                                                        AND Invalid_Flag__c = false
                                                        FOR Update];
        // System.debug(LoggingLevel.INFO, '*** JSON.serialize(applysequenceList): ' + JSON.serialize(applysequenceList));
        newSequenceList.addAll(applysequenceList);
        newSequenceList.addAll(allsequenceList);
        System.debug(LoggingLevel.INFO, '*** newSequenceList.size(): ' + newSequenceList.size());
        newSequenceList = Batch_QueueAllDetail.getSortSequenceList(newSequenceList);
        if(updateList.size() + count + oldSequenceList.size() + allsequenceList.size() + newSequenceList.size() > 9900){
            throw new ControllerUtil.myException('当前排队数据量过大,请选择单个主体操作');
        }
        System.debug(LoggingLevel.INFO, '*** newSequenceList: ' + newSequenceList);
        upsert newSequenceList;
    }
}
force-app/main/default/classes/NewLeadFromContact2.cls
New file
@@ -0,0 +1,40 @@
public without sharing class NewLeadFromContact2 {
    @AuraEnabled
    public static InitData NewLeadFromContact2(String recordId) {
        InitData res = new initData();
        try{
            Contact report= [SELECT Id,Name,AccountId,AWS_Data_Id__c FROM Contact WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.Name = report.Name;
            res.AccountId = report.AccountId;
            res.AWSDataId = report.AWS_Data_Id__c;
            Account acc =  [SELECT Id,Name,Department_Class__c  FROM Account WHERE id =: report.AccountId];
            res.accountIds = acc.Id;
            res.accountName = acc.Name;
            res.accountDepartmentClass = acc.Department_Class__c;
            res.NewDailyReport = Schema.SObjectType.Lead.getRecordTypeInfosByDeveloperName().get('NewDaily_Report').getRecordTypeId();
            System.debug(LoggingLevel.INFO, '*** xu: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** xu: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String Name;
        @AuraEnabled
        public String AccountId;
        @AuraEnabled
        public String accountIds;
        @AuraEnabled
        public String accountName;
        @AuraEnabled
        public String accountDepartmentClass;
        @AuraEnabled
        public String NewDailyReport;
        @AuraEnabled
        public String AWSDataId;
    }
}
force-app/main/default/classes/NewLeadFromContact2.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/SetFrameNumManageWebService.cls
New file
@@ -0,0 +1,137 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-14 14:23:13
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-20 13:49:56
 *
 */
/**
     * @Author    lijinhuan
     * @DateTime  2022-12-28T18:25:42+0800
     * 测试类:FrameNumUploadControllerTest
*/
global class  SetFrameNumManageWebService {
    /**
     * @fuction   [AuraEnabled]
     * @Author    zhangchunxu
     * @DateTime  2023-07-20T13:50:1+0800
     */
    @AuraEnabled
    /**
     * @fuction   [关联数据]
     * @Author    lijinhuan
     * @DateTime  2023-01-10T11:06:10+0800
     */
    WebService static String updateFrameNumManag(String Id) {
        Id execBTId = Database.executeBatch(new SetFrameNumManageBatch(Id), 1);
        return '1';
    }
    /**
     * @fuction   [AuraEnabled]
     * @Author    zhangchunxu
     * @DateTime  2023-07-31T13:50:1+0800
     */
    @AuraEnabled
    /**
     * @fuction   [批量删除]
     * @Author    lijinhuan
     * @DateTime  2023-01-10T11:06:10+0800
     */
    WebService static String BatchDelete(List<String> idList) {
        Savepoint sp = Database.setSavepoint();
        try{
            //sf删除
            Database.delete(idList);
            return 'success';
        }catch(Exception e){
            Database.rollback(sp);
            System.debug('失败原因是 : ' + e.getMessage());
            return '失败原因是 : ' + e.getMessage();
        }
    }
    /**
     * @fuction   [AuraEnabled]
     * @Author    zhangchunxu
     * @DateTime  2023-07-17T13:27:1+0800
     */
    @AuraEnabled
    /**
     * @fuction   [生成机身号管理对象数据]
     * @Author    lijinhuan0
     * @DateTime  2023-02-07T11:06:1+0800
     */
    WebService static String insertFrameNumManag(String Id,String esId) {
        // return Id+';'+esId;
        Map<String,Statu_Achievements_DN_details__c> sandMap = new Map<String,Statu_Achievements_DN_details__c>();
        Map<String,Statu_Achievements_DN_details__c> UpdateSandMap = new Map<String,Statu_Achievements_DN_details__c>();
        Map<String,String> UpdateFIdMap = new Map<String,String>();
        try{
             // 查询明细 在机身号管理中有没,没有生成,有更新 签收单、发货DN明细、保有设备
            for(Statu_Achievements_DN_details__c dn:[SELECT Id,SerialNumber__c,asset__c,
                                                        Statu_Achievements_DN__c,SerialNoorLotNo_Raw__c,TracingCode_Raw__c,
                                                        OTCode_Raw__c,asset__r.Name,QTY__c,Statu_Achievements_DN__r.Name
                                                        FROM Statu_Achievements_DN_details__c
                                                        WHERE Statu_Achievements_DN__c =:Id ]){
                sandMap.put(dn.TracingCode_Raw__c,dn);
            }
            for(FrameNumManage__c f:[SELECT Id,ManagementCode__c  FROM FrameNumManage__c WHERE ManagementCode__c in :sandMap.keySet()]){
                // 更新机身号管理
                UpdateSandMap.put(f.ManagementCode__c,sandMap.get(f.ManagementCode__c));
                UpdateFIdMap.put(f.ManagementCode__c, f.Id);
                sandMap.remove(f.ManagementCode__c);
            }
            if(sandMap.size() > 0 || UpdateSandMap.size() > 0){
                List<FrameNumManage__c> infnmList = new List<FrameNumManage__c>();
                for (Statu_Achievements_DN_details__c s:sandMap.values()) {
                    FrameNumManage__c temp = new FrameNumManage__c();
                    temp.Name = s.TracingCode_Raw__c;
                    temp.ManagementCode__c = s.TracingCode_Raw__c;
                    temp.SerialNumberS__c = s.SerialNoorLotNo_Raw__c+'('+s.TracingCode_Raw__c+')';
                    temp.SerialNumber__c = s.SerialNoorLotNo_Raw__c;
                    temp.Num__c = s.QTY__c;
                    temp.CheckOutNo__c  = s.Statu_Achievements_DN__r.Name.subString(2);//发货DN 的name去掉前两位的 00
                    temp.Statu_Achievements_DN_details__c = s.Id;
                    temp.Asset__c = s.asset__c;
                    temp.signInForm__c = esId;
                    temp.Material__c = s.OTCode_Raw__c;
                    temp.MaterialDepict__c = s.asset__r.Name;
                    infnmList.add(temp);
                }
                if(infnmList.size() > 0){
                    insert infnmList;
                    // Database.executeBatch(new SetFrameNumManageBatch(), 100);
                }
                if(UpdateSandMap.size() > 0){
                    List<FrameNumManage__c> upfnmList = new List<FrameNumManage__c>();
                    for (Statu_Achievements_DN_details__c s:UpdateSandMap.values()) {
                        if(UpdateFIdMap.get(s.TracingCode_Raw__c) != null ){
                            FrameNumManage__c temp = new FrameNumManage__c();
                            temp.id = UpdateFIdMap.get(s.TracingCode_Raw__c);
                            temp.Statu_Achievements_DN_details__c = s.Id;
                            temp.Asset__c = s.asset__c;
                            temp.signInForm__c = esId;
                            upfnmList.add(temp);
                        }
                    }
                    if(upfnmList.size() > 0 ){
                        update upfnmList;
                    }
                }
                // return '1';
            }
            return '1';
            // else{
            //     return '数据已经关联,没有需要关联的数据';
            // }
        }catch(Exception e){
            // Database.rollback(sp);
            System.debug('失败原因是 : ' + e.getMessage());
            return '失败原因是 : ' + e.getMessage();
        }
    }
}
force-app/main/default/classes/SetFrameNumManageWebService.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/TenderingButtonController.cls
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-03-31 13:36:53
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-21 15:09:33
 *
 */
public class TenderingButtonController {
    @AuraEnabled
    public static InitData initTenderingController(String recordId) {
force-app/main/default/classes/lexBatchSelectRepairLWCController.cls
@@ -7,7 +7,6 @@
    public static List<Repair__c> RepairList;
    public static List<RepairData> RAInfoList;
    public static List<String> repairIdList;
    // public static String pdfURL;
    //查询Repair数据
    @AuraEnabled
@@ -16,7 +15,6 @@
        //2023/04/07 LWC
        ReturnData returnData = new ReturnData();
        RetrievalData RevalInfo = (RetrievalData)System.JSON.deserialize(json,RetrievalData.class);
        System.debug(LoggingLevel.INFO, '*** RevalInfo: ' + RevalInfo);
        //pageController 逻辑
        RepairList = new List<Repair__c>();
@@ -25,7 +23,6 @@
            && String.isBlank(RevalInfo.SerialNumber) && String.isBlank(RevalInfo.repair.Incharge_Staff__c) && String.isBlank(RevalInfo.onSiteRepair)
            && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date__c)) && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date2__c)) && String.isBlank(RevalInfo.workLocationSelect)
            && String.isBlank(RevalInfo.State_Hospital)){
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '请至少添加一个检索条件!'));
            return null;
        }
        // 2023/04/10 add 型号,修理委托者 名称
@@ -43,7 +40,6 @@
            sql += ' and HP_Name__c like \'%' + RevalInfo.HospitalName.trim() + '%\'';
        }
        if(String.isNotBlank(RevalInfo.RepairName)){
            System.debug(LoggingLevel.INFO, '***RevalInfo.RepairName.contains(): ' + RevalInfo.RepairName.contains(' '));
            String splitStr = null;
            if(RevalInfo.RepairName.contains(' ')){
                splitStr = ' ';
@@ -61,10 +57,8 @@
            }else{
                sql += ' and Name like \'%' + RevalInfo.RepairName.trim() + '%\'';
            }
            System.debug(LoggingLevel.INFO, '*** sql: ' + sql);
        }
        if(String.isNotBlank(RevalInfo.SAPRepairNo)){
            System.debug(LoggingLevel.INFO, '***RevalInfo.SAPRepairNo.contains(): ' + RevalInfo.SAPRepairNo.contains(' '));
            String splitStr = null;
            if(RevalInfo.SAPRepairNo.contains(' ')){
                splitStr = ' ';
@@ -83,14 +77,12 @@
            }else{
                sql += ' and SAP_Service_Repair_No__c like \'%' + RevalInfo.SAPRepairNo.trim() + '%\'';
            }
            System.debug(LoggingLevel.INFO, '*** sql: ' + sql);
        }
        if(String.isNotBlank(RevalInfo.SerialNumber)){
            List<String> SerialNumberList = new List<String>();
            if(RevalInfo.SerialNumber.indexOf(',') != -1){
                SerialNumberList = RevalInfo.SerialNumber.split(',');
            }
            System.debug('SerialNumberList1:' + SerialNumberList);
            // 支持模糊查询多个,文本框输入用英文半角逗号分隔
            if(SerialNumberList.size() > 0){
                sql += ' and (SerialNumber__c like \'%';
@@ -126,7 +118,6 @@
            if(RevalInfo.workLocationSelect.indexOf(',') != -1){
                workLocationSelectList = RevalInfo.workLocationSelect.split(',');
            }
            System.debug('workLocationSelectList1:' + workLocationSelectList);
            if(workLocationSelectList.size() > 0){
                sql += ' and (work_location_select__c like \'%';
                Integer i = 0;
@@ -147,17 +138,14 @@
            sql += ' and State_Hospital__c like \'%' + RevalInfo.State_Hospital.trim() + '%\'';
        }
        sql += 'and Status1__c not in(\'0.删除\',\'0.取消\') limit 200';
        System.debug('sql1LWC:' + sql);
        if(String.isNotBlank(sql)){
            RepairList = Database.query(sql);
        }
        if(RepairList.size() == 200){
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '检索数据太多,请缩小检索范围!'));
            //2023/04/07 returnData
            returnData.status = '检索数据太多,请缩小检索范围!';
        }
        if(RepairList.size() <= 0){
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '没检索到任何修理'));
            //2023/04/07 returnData
            returnData.status = '没检索到任何修理';
            return returnData;
@@ -166,17 +154,14 @@
            RepairData raData = new RepairData(ra);
            RAInfoList.add(raData);
        }
        // return RAInfoList;
        returnData.repairData = RAInfoList;
        System.debug(LoggingLevel.INFO, '*** returnData: ' + returnData);
        return returnData;
    }
    //打印PDF  
    @AuraEnabled
    public static String showPDF(String json) {
        System.debug(LoggingLevel.INFO, '*** joinshoPDF: ');
        List<Repair__c> RepairList = (List<Repair__c>)System.JSON.deserialize(json,List<Repair__c>.class);
        if(RepairList == null || RepairList.isEmpty()){
@@ -184,39 +169,18 @@
        }
        repairIdList = new List<String>();
        for(Repair__c rd : RepairList) {
            System.debug(LoggingLevel.INFO, '*** rd: ' + rd);
                repairIdList.add(rd.Id);
        }
        // RepairList = new List<Repair__c>();
        String url = '=';
        /*System.debug('RAInfoList:' + RAInfoList);
        if(RAInfoList == null || RAInfoList.isEmpty()){
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '请先检索修理'));
            return '请先检索修理';
        }*/
        /*for(RepairData rd : RAInfoList) {
            System.debug(LoggingLevel.INFO, '*** rd: ' + rd);
            //选中的repair
            if(rd.IFCheck){
                repairIdList.add(rd.repair.Id);
                RepairList.add(rd.repair);
            }
        }*/
        System.debug(LoggingLevel.INFO, '***repairIdList : ' + repairIdList);
        System.debug(LoggingLevel.INFO, '***RepairList : ' + RepairList);
        if(repairIdList.size() > 0){
            if(repairIdList.size() <= 50){
                if(RepairList.size() > 0){
                    System.debug(LoggingLevel.INFO, '*** if size>0 generateAttachment: ');
                    generateAttachment(RepairList);
                }
                for(String Id : repairIdList){
                    url += Id + '=';
                }
                url = url.substring(0, url.lastIndexOf('='));
                // PageReference pageRef = new PageReference('/apex/MaintenanceCommissionPDF?id' + url);
                // pageRef.setRedirect(true);
                // return pageRef;
                String pdfURL = '';
                if(isSandbox()){
                    pdfURL = 'https://ocsm--stagefull--c.visualforce.com/apex/MaintenanceCommissionPDF?id' + url;
@@ -225,18 +189,15 @@
                }
                return pdfURL;
            } else{
                // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '多单打印最大数量为50,请选择少于50个修理!'));
                return '多单打印最大数量为50,请选择少于50个修理!';
            }
        } else{
            // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '请至少选择一个修理'));
            return '请至少选择一个修理';
        }
    }
    // 生成pdf添加到对应的修理中
    public static PageReference generateAttachment(List<Repair__c> repList){
        System.debug(LoggingLevel.INFO, '*** generateAttachment: ');
        BatchSelectRepairPDFDelete pdf = new BatchSelectRepairPDFDelete();
        pdf.deletePDF(repList);
        pdf.createPDF(repList);
force-app/main/default/classes/lexBatchSelectRepairLWCControllerTest.cls
New file
@@ -0,0 +1,89 @@
// 2023/08/06  批量选择修理LWC处理  测试类
@isTest
private class lexBatchSelectRepairLWCControllerTest {
    @TestSetup
    public static void init(){
        Profile p = [SELECT Id FROM Profile WHERE id =:System.Label.ProfileId_SystemAdmin];
        User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
        insert hpOwner;
        List<RecordType> rectHp = [SELECT Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
        List<RecordType> rectDpt = [SELECT Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_GI'];
        if (rectDpt.size() == 0) {
            return;
        }
        Account hp = new Account(RecordTypeId = rectHp[0].Id, Name = 'SoakupTestHp', OwnerId = hpOwner.Id);
        insert hp;
        Account dc = [SELECT Id, Name, RecordType_DeveloperName__c, Account2__c FROM Account WHERE ParentId = :hp.Id and RecordType_DeveloperName__c = 'Department_Class_GI'];
        Account dpt = new Account(RecordTypeId = rectDpt[0].Id);
        dpt.Name         = '*';
        dpt.Department_Name__c  = 'TestDepart';
        dpt.ParentId            = dc.Id;
        dpt.Department_Class__c = dc.Id;
        dpt.Hospital__c         = hp.Id;
        insert dpt;
        Asset asset = new Asset();
        asset.Name = 'テスト機器';
        asset.AccountId = dpt.Id;
        asset.Department_Class__c = dc.Id;
        asset.Hospital__c = hp.Id;
        asset.SerialNumber = 'testserial';
        insert asset;
        Repair__c repair01 = new Repair__c();
        repair01.Account__c = dpt.Id;
        repair01.Department_Class__c = dc.Id;
        repair01.Hospital__c = hp.Id;
        repair01.Delivered_Product__c = asset.Id;
        repair01.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today().addDays(0);
        repair01.FSE_Work_Location__c = '上海';
        repair01.Service_Repair_No__c = 'SAP0001';
        repair01.Incharge_Staff__c = hpOwner.Id;
        repair01.On_site_repair__c = 'RC修理';
        repair01.work_location_select__c = '北京办事处';
        insert repair01;
        System.assertEquals(true,repair01.Id != null, '插入失败');
    }
    static testMethod void testSearch() {
        System.Test.StartTest();
        List<Repair__c> objRepair = [SELECT Status1__c,Status2__c,HP_Name__c,Name,SAP_Service_Repair_No__c,SerialNumber__c,work_location_select__c,On_site_repair__c,Incharge_Staff__c
                                      FROM Repair__c LIMIT 5];
        lexBatchSelectRepairLWCController.RetrievalData returnData = new lexBatchSelectRepairLWCController.RetrievalData();
        returnData.Status1 = objRepair[0].Status1__c;
        returnData.Status2 = objRepair[0].Status2__c;
        returnData.HospitalName = objRepair[0].HP_Name__c;
        returnData.RepairName = objRepair[0].Name;
        returnData.SAPRepairNo =objRepair[0].SAP_Service_Repair_No__c+','+objRepair[0].SAP_Service_Repair_No__c+' '+objRepair[0].SAP_Service_Repair_No__c;
        returnData.SerialNumber =objRepair[0].SerialNumber__c+','+objRepair[0].SerialNumber__c;
        returnData.workLocationSelect =objRepair[0].work_location_select__c+','+objRepair[0].work_location_select__c+' '+objRepair[0].work_location_select__c;
        returnData.repair.Aware_date__c = Date.today();
        returnData.repair.Incharge_Staff__c = objRepair[0].Incharge_Staff__c;
        returnData.onSiteRepair = objRepair[0].On_site_repair__c;
        lexBatchSelectRepairLWCController.ReturnData serachRes = lexBatchSelectRepairLWCController.search(JSON.serialize(returnData));
        returnData = new lexBatchSelectRepairLWCController.RetrievalData();
        serachRes = lexBatchSelectRepairLWCController.search(JSON.serialize(returnData));
        serachRes = lexBatchSelectRepairLWCController.search('{"Status1":"0.删除"}');
        System.Test.StopTest();
    }
    static testMethod void testShowPDF() {
        System.Test.StartTest();
        List<Repair__c> objRepair = [SELECT Status1__c,Status2__c,HP_Name__c,Name,SAP_Service_Repair_No__c,SerialNumber__c  FROM Repair__c LIMIT 10];
        String showPDFRes = lexBatchSelectRepairLWCController.showPDF(JSON.serialize(objRepair));
        System.assertEquals(true, showPDFRes != null);
        objRepair = [SELECT Id,Status1__c,Status2__c,HP_Name__c,Name,SAP_Service_Repair_No__c,SerialNumber__c  FROM Repair__c WHERE FSE_Work_Location__c = '上海'];
        showPDFRes = lexBatchSelectRepairLWCController.showPDF(JSON.serialize(objRepair));
        System.assertEquals(true, showPDFRes != null);
        objRepair = [SELECT Status1__c,Status2__c,HP_Name__c,Name,SAP_Service_Repair_No__c,SerialNumber__c  FROM Repair__c LIMIT 60];
        showPDFRes = lexBatchSelectRepairLWCController.showPDF(JSON.serialize(objRepair));
        System.assertEquals(true, showPDFRes != null);
        objRepair.clear();
        showPDFRes = lexBatchSelectRepairLWCController.showPDF(JSON.serialize(objRepair));
        System.assertEquals(true, showPDFRes != null);
        System.Test.StopTest();
    }
}
force-app/main/default/classes/lexBatchSelectRepairLWCControllerTest.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/components/RelationListPagingCmp.component
@@ -379,24 +379,19 @@
        sbwidth = scrollbarWidth();
        i++;
        tableWidth = j$('body .pbBody table#tableHeader').width();
        // var widthTemp = 0;
        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
            var colClass = getColClassName(this);
            if (colClass != 'col_Scroll') {
                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
                listColClassWidthMap[colClass] = temp;
                //widthTemp += temp;
            }
        });
        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
        // var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
        var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
        var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
        console.log('~'+tableHeader_L);
        j$('div#in_Div_L').css('width', tableHeader_L+ 'px'); 
        j$('table#tableData_L').css('width', tableHeader_L + 'px');
        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
        if(tableWidth > blockWidthNew){
            j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
            j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
        console.log('tableWidth:'+tableWidth+'blockWidth:'+blockWidth);
        if(tableWidth > blockWidth){
            console.log('111');
            j$('div#in_Div').css('width', blockWidth+ 'px'); // 20230519 ljh +20
            j$('div#out_Div').css('width', blockWidth + 'px'); // 20230519 ljh
            j$('table#tableHeader').css('width', tableWidth + 'px'); // 20230725 ljh
            j$('table#tableData').css('width', tableWidth + 'px'); // 20230725 ljh
        }
        j$('div#in_Div').scroll(function() {
            j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
@@ -407,6 +402,15 @@
        });
        j$('div#in_Div_L').scroll(function() {
            j$('div#in_Div').scrollTop(j$(this).scrollTop());
        });
        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
            var colClass = getColClassName(this);
            if (colClass != 'col_Scroll') {
                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
                console.log('colClass'+temp);
                listColClassWidthMap[colClass] = temp;
            }
        });
       
    }
@@ -480,4 +484,4 @@
</script>
        </apex:outputPanel>
    <!-- </apex:form> -->
</apex:component>
</apex:component>
force-app/main/default/components/RelationListPagingCmp.component.bak
New file
@@ -0,0 +1,483 @@
<apex:component controller="CreateRelationListPagingCmpCtrl" allowDML="true" id="cmpinnerid" >
    <!-- <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> -->
    <apex:stylesheet value="{!URLFOR($Resource.RelationListPagingCmpCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <style>
        /*URLFOR($Resource なのでRelationListPagingCmpCssに入れません*/
        body .pbBody table.list tr.headerRow td.colViewing {
          /* デフォルト値、最小化アイコンを表示 */
          background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
          background-repeat:no-repeat;
        }
        body .pbBody table.list tr.headerRow td.colUnHideIcon {
          /* 最大化アイコンを表示 */
          background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
          background-repeat:no-repeat;
        }
    </style>
    <apex:attribute name="pgController"
        type="CreateRelationListPagingCtrlBase"
        assignTo="{!pageController}"
        required="true"
        description="The controller for the page." />
    <apex:attribute name="hasCheckbox"
        type="Boolean"
        assignTo="{!hasChkBox}"
        required="true"
        description="Set If List Row able to be checked." />
    <apex:attribute name="noSort"
        type="Boolean"
        assignTo="{!noSortHeader}"
        required="false"
        default="true"
        description="Set If Dont need Sort" />
    <apex:attribute name="isRadio"
        type="Boolean"
        assignTo="{!isRadioBox}"
        required="false"
        description="Set if need selectRadio not inputCheckbox" />
    <apex:attribute name="bottomSpace"
        type="Integer"
        assignTo="{!bottomSp}"
        required="false"
        description="Set if need more bottomSpace" />
    <apex:attribute name="tabStyle"
        type="String"
        assignTo="{!tabS}"
        required="false"
        description="Set if need Set dataBlock's tabStyle" />
    <apex:attribute name="userCPaging"
        type="Boolean"
        assignTo="{!userCustomPaging}"
        required="false"
        default="false"
        description="Set if need Set Use CustomPaging" />
    <!-- <apex:form id="allForm"> -->
        <apex:actionFunction action="{!init}" name="init" rerender="allPanel, message, checEventFrame, canGoPage" oncomplete="unblockUI();windowResize();runSFDCAddRemote({!MetadataConnectionWarning});"/>
        <apex:actionFunction action="{!searchPrevious}" name="searchPrevious" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
        <apex:actionFunction action="{!searchNext}" name="searchNext" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
        <apex:actionFunction action="{!searchGoPage}" name="searchGoPage" rerender="allPanel, message, checEventFrame" status="statusPreload"  oncomplete="unblockUI();windowResize();"/>
        <!-- ToDoエラー表示確認message -->
        <apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allPanel, message, checEventFrame" status="statusPreload" onComplete="unblockUI();windowResize();">
            <apex:param name="sortKey" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="dataBlock" tabStyle="{!IF(tabS<>null,tabS,'Report')}">
                <apex:outputPanel >
                    <!-- 総件数 -->
                    <apex:inputHidden id="recordAllCount" value="{!recordAllCount}"/> <!-- recordAllCount画面上で設定します?しなければinputHiddenを使わないでください -->
                    <apex:inputHidden id="currentPageRecordCnt" value="{!currentPageRecordCnt}"/>
                    <!-- 左 ヘッダ -->
                    <div id="out_Div_L">
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed" border="" id="tableHeader_L">
                            <!-- 20230511 ljh lightning start -->
                            <!-- <tr class="dataRow" height="1px">
<apex:outputPanel layout="none" rendered="{!hasChkBox}">
                                <td class="col_chk"></td>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
                                <td class="col_noChk"></td>
</apex:outputPanel>
<apex:variable value="{!0}" var="cnt" />
<apex:repeat value="{!titleLeft}" var="t">
                                <td class="col_{!columnLeftCss[cnt]}"></td>
    <apex:variable value="{!cnt + 1}" var="cnt" />
</apex:repeat>
                            <tr> -->
                            <!-- 20230511 ljh lightning end -->
                            <tr class="headerRow" height="30px">
<apex:outputPanel layout="none" rendered="{!hasChkBox}">
    <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
                                <!-- 20230511 ljh lightning start -->
                                <!-- <td style="width:20px" class="col_chk" align="center"> -->
                                <td style="width:32px" class="col_chk" align="center">
                                <!-- 20230511 ljh lightning end -->
                                    <input type='checkbox' onClick='checkAll()' id='checker'/>
                                </td>
    </apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!isRadioBox}">
                            <!-- 20230511 ljh lightning start -->
                             <!-- <td class="col_chk"></td> -->
                             <td style="width:32px;" class="col_chk"></td>
                             <!-- 20230511 ljh lightning start -->
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
                                <!-- 20230511 ljh lightning start-->
                                <!-- <td class="col_noChk"></td> -->
                                <td class="col_noChk" style="display:none"></td>
                                <!-- 20230511 ljh lightning end-->
</apex:outputPanel>
<apex:variable value="{!0}" var="cnt" />
<apex:repeat value="{!titleLeft}" var="t">
                                <td class="col_{!columnLeftCss[cnt]}">
                                    <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
                                      <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt}');return false;" style="text-decoration: underline;">
                                        <!-- 20220107 ljh update start -->
                                        <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
                                        <apex:outputText value="{!IF(t=='批准时间(申请提交时间)', '批准时间', IF(t=='排队时间F', '排队时间', SUBSTITUTE(t,'(Sys)','')))}"/>
                                        <!-- 20220107 ljh update end -->
                                    </a>{!sortOrder[cnt]}
                                    </apex:outputPanel>
                                    <apex:outputPanel layout="none" rendered="{!noSortHeader}">
                                    <!-- 20220107 ljh update start -->
                                      <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
                                      <apex:outputText value="{!IF(t=='批准时间(申请提交时间)', '批准时间', IF(t=='排队时间F', '排队时间', SUBSTITUTE(t,'(Sys)','')))}"/>
                                      <!-- 20220107 ljh update end -->
                                    </apex:outputPanel>
                                </td>
    <apex:variable value="{!cnt + 1}" var="cnt" />
</apex:repeat>
                            </tr>
                        </table>
                    </div>
                    <!-- 右 ヘッダ -->
                    <div id="out_Div">
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableHeader">
                            <!-- 20230512 ljh lightning start-->
                            <!-- <tr class="dataRow" height="1px">
                            <apex:variable value="{!0}" var="cnt" />
                            <apex:repeat value="{!titleRight}" var="t">
                                <td class="col_{!columnRightCss[cnt]}"></td>
                                <apex:variable value="{!cnt + 1}" var="cnt" />
                            </apex:repeat>
                            <td class="col_Scroll"></td>
                            </tr>-->
                            <!-- 20230512 ljh lightning end-->
                            <tr class="headerRow" height="30px">
                            <apex:variable value="{!0}" var="cnt" />
                            <apex:repeat value="{!titleRight}" var="t">
                                <!-- 20230511 ljh lightning start -->
                                <!-- <td class="col_{!columnRightCss[cnt]} "> -->
                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="ToggleWidth(this);return false;">
                                <!-- 20230511 ljh lightning end -->
                                    <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
                                      <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;">
                                        <!-- 20220107 ljh update start -->
                                        <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
                                        <apex:outputText value="{!IF(t=='批准时间(申请提交时间)', '批准时间', IF(t=='排队时间F', '排队时间', SUBSTITUTE(t,'(Sys)','')))}"/>
                                        <!-- 20220107 ljh update end -->
                                    </a>{!sortOrder[cnt + titleLeft.size]}
                                    </apex:outputPanel>
                                    <apex:outputPanel layout="none" rendered="{!noSortHeader}">
                                    <!-- 20220107 ljh update start -->
                                      <!-- <apex:outputText value="{!SUBSTITUTE(t,'(Sys)','')}"/> -->
                                      <apex:outputText value="{!IF(t=='批准时间(申请提交时间)', '批准时间', IF(t=='排队时间F', '排队时间', SUBSTITUTE(t,'(Sys)','')))}"/>
                                    <!-- 20220107 ljh update end -->
                                    </apex:outputPanel>
                                </td>
                                <apex:variable value="{!cnt + 1}" var="cnt" />
                            </apex:repeat>
                            <td class="col_Scroll"></td>
                            </tr>
                        </table>
                    </div>    <!-- out_Div -->
                    <div style="clear:both;height:0px;"></div>
                    <!-- 左 データリスト -->
                    <div id="in_Div_L">
                        <!-- 20230512 ljh lightning add table-layout:fixed" -->
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData_L">
<apex:variable value="{!1}" var="cnt" />
<apex:repeat value="{!pageController.viewList}" var="or" id="oppTable_L">
                            <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" 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:outputPanel layout="none" rendered="{!hasChkBox}">
                                <!-- 20230512 ljh lightning add style="width:32px;" -->
                                <td class="dataCellBorder1" style="width:32px;height:38px;" align="center">
        <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
                                  <apex:inputCheckbox value="{!or.check}" id="rowCheck" styleClass="rowchkcls" disabled="{!!or.canEdit}" onchange="setChangeFlg('{!or.lineNo}')"/>
        </apex:outputPanel>
        <apex:outputPanel layout="none" rendered="{!isRadioBox}">
                                  <apex:inputCheckbox value="{!or.check}" id="rowRadioCheck" styleClass="rowchkcls" disabled="{!!or.canEdit}" onchange="setRadioChangeFlg(this, '{!or.lineNo}', '{!isNeedCheckEvent}')"/>
        </apex:outputPanel>
                                  <apex:inputCheckbox value="{!or.oldCheck}" id="rowOldCheck" style="display:none"/>
                                  <apex:inputText value="{!or.orderNo}" styleClass="ordernocls" style="display:none"/>
                                </td>
    </apex:outputPanel>
    <apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
                                <!-- 20230602 ljh 高度固定 38px; -->
                                <td class="col_noChk" style="height: 38px;">
                                  <apex:inputCheckbox value="{!or.check}" styleClass="rowchkcls" style="display:none"/>
                                  <apex:inputText value="{!or.orderNo}" styleClass="ordernocls" style="display:none"/>
                                </td>
    </apex:outputPanel>
    <apex:variable value="{!0}" var="cnt_2" />
    <apex:repeat value="{!columnsLeftApi}" var="c">
                                <!-- 20230602 ljh 高度固定 38px; -->
                                <td class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}" style="height: 38px;">
        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='r')}" layout="none">
            <!-- in_Div_LのAccount名は特殊対応、リンクにする -->
            <apex:outputPanel rendered="{!c[0]=='Name'}" layout="none">
                                  <apex:outputLink value="/{!or.sobj.Id}" target="LINK_{!or.sobj.Id}"><apex:outputField value="{!or.sobj[c[0]]}" /></apex:outputLink>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!c[0]<>'Name'}" layout="none">
                                  <apex:outputField value="{!or.sobj[c[0]]}"/>
            </apex:outputPanel>
        </apex:outputPanel>
        <apex:outputPanel rendered="{!(c.size==2 && or.sobj[c[0]] != null)}" layout="none">
                                  <apex:outputField value="{!or.sobj[c[0]][c[1]]}"/>
        </apex:outputPanel>
        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='w')}" layout="none">
                                  <apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/>
        </apex:outputPanel>
        <apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='wm')}" layout="none">
                                  <div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/></div>
        </apex:outputPanel>
                                </td>
        <apex:variable value="{!cnt_2 + 1}" var="cnt_2" />
    </apex:repeat>
                            </tr>
    <apex:variable value="{!cnt + 1}" var="cnt" />
</apex:repeat>
                        </table>
                    </div>
                    <!-- 右 データリスト -->
                    <div id="in_Div">
                        <!-- 20230512 ljh lightning add table-layout:fixed" -->
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData">
                            <apex:variable value="{!1}" var="cnt" />
                            <apex:repeat value="{!pageController.viewList}" var="or" id="oppTable">
                                <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" 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="cnt_3" />
                                <apex:repeat value="{!columnsRightApi}" var="c">
                                    <td class="dataCellBorder1 col_{!columnRightCss[cnt_3]}" style="height: 38px;">
                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='r')}" layout="none">
                                        <apex:outputField value="{!or.sobj[c[0]]}"/>
                                    </apex:outputPanel>
                                    <apex:outputPanel rendered="{!(c.size==2 && or.sobj[c[0]] != null)}" layout="none" >
                                        <apex:outputField value="{!or.sobj[c[0]][c[1]]}"/>
                                    </apex:outputPanel>
                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='w')}" layout="none">
                                        <apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/>
                                    </apex:outputPanel>
                                    <apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='wm')}" layout="none">
                                        <div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.sobj[c[0]]}" onchange="setChangeFlg('{!or.lineNo}');if(typeof onFieldChanged == 'function') {onFieldChanged(this, {!or.lineNo});}"/></div>
                                    </apex:outputPanel>
                                    <apex:variable value="{!cnt_3 + 1}" var="cnt_3" />
                                    </td>
                                </apex:repeat>
                                <td class="dataRow col_Scroll">
                                    <apex:repeat value="{!columnsHiddenApi}" var="c">
                                        <input name="{!c}" value="{!or.additionalInfoMap[c]}" type="hidden" />
                                    </apex:repeat>
                                    <apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/>
                                    <script type="text/javascript">
                                        if ("{!or.canEdit}" == "false") {
                                            var right = j$("#tableData").find("tr").eq({!cnt-1});
                                            var rightline = j$(right).find("td");
                                            for (var i=0; i<rightline.length; i++) {
                                                j$(rightline[i]).find("input").each(function(){
                                                    j$(this).attr("disabled",true);
                                                });
                                                j$(rightline[i]).find("select").each(function(){
                                                    j$(this).attr("disabled",true);
                                                });
                                                j$(rightline[i]).find("a").each(function(){
                                                    j$(this).attr("href","#");
                                                });
                                            }
                                        }
                                        if ("{!or.hasError}" == "true") {
                                            var left = j$("#tableData_L").find("tr").eq({!cnt-1});
                                            var leftFirst = j$(left).find("td").eq(1);
                                            j$(leftFirst).css("background-color", "gray");
                                        }
                                        if ("{!or.hasFieldError}" == "true") {
                                            var left = j$("#tableData_L").find("tr").eq({!cnt-1});
                                            var leftFirst = j$(left).find("td").eq(1);
                                            j$(leftFirst).css("background-color", "red");
                                        }
                                    </script>
                                </td>
                                </tr>
                                <apex:variable value="{!cnt + 1}" var="cnt" />
                            </apex:repeat>
                        </table>
                    </div><!-- /in_Div -->
                </apex:outputPanel>
                <!-- 20230523  ljh lightning 分页 代码换位置  start -->
                <!-- <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
                    <apex:outputPanel layout="none" rendered="{!hasPrevious}">
                        <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">前へ</button>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!!hasPrevious}">
                        <button class="btn" disabled="disabled"
                                style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">前へ</button>
                    </apex:outputPanel>
                    <span class="count">{!page}</span><span>|</span>
                    <span class="count">{!maxPage}</span>
                    <apex:outputPanel layout="none" rendered="{!hasNext}">
                        <button onclick="if('{!userCustomPaging}' == 'true') {searchNextCustom();} else {searchNextJs();}return false;" class="btn" >次へ</button>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!!hasNext}">
                        <button class="btn" disabled="disabled"
                        style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">次へ</button>
                    </apex:outputPanel>
    &nbsp;&nbsp;
                    <apex:outputPanel id="canGoPage" layout="none" rendered="{!canGoPage}">
                        <apex:selectList value="{!goPageInt}" size="1" style="width:50px" id="goPageInt"><apex:selectOptions value="{!pageNumList}" id="pageNumList"/></apex:selectList> 
                        <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
                    </apex:outputPanel>
                </apex:outputPanel> -->
                <!-- 20230523  ljh lightning 分页 代码换位置  end -->
            </apex:pageBlock>
            <!-- 20230523  ljh lightning 分页 代码换位置  start -->
            <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
                <apex:outputPanel layout="none" rendered="{!hasPrevious}">
                    <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">前へ</button>
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!!hasPrevious}">
                    <button class="btn" disabled="disabled"
                            style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">前へ</button>
                </apex:outputPanel>
                <span class="count">{!page}</span><span>|</span>
                <span class="count">{!maxPage}</span>
                <apex:outputPanel layout="none" rendered="{!hasNext}">
                    <button onclick="if('{!userCustomPaging}' == 'true') {searchNextCustom();} else {searchNextJs();}return false;" class="btn" >次へ</button>
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!!hasNext}">
                    <button class="btn" disabled="disabled"
                    style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">次へ</button>
                </apex:outputPanel>
&nbsp;&nbsp;
                <apex:outputPanel id="canGoPage" layout="none" rendered="{!canGoPage}">
                    <apex:selectList value="{!goPageInt}" size="1" style="width:50px" id="goPageInt"><apex:selectOptions value="{!pageNumList}" id="pageNumList"/></apex:selectList> 
                    <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
                </apex:outputPanel>
            </apex:outputPanel>
            <!-- 20230523  ljh lightning 分页 代码换位置  end -->
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
var bottomspace = '{!bottomSp}';
var i = 0;
j$(document).ready(function(){
    console.log({!isFirstRefresh});
    if({!isFirstRefresh}){
      blockme();
      init();
    }
    // 20230523  ljh lightning start
    if(i == 0){
        sbwidth = scrollbarWidth();
        i++;
        tableWidth = j$('body .pbBody table#tableHeader').width();
        // var widthTemp = 0;
        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
            var colClass = getColClassName(this);
            if (colClass != 'col_Scroll') {
                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
                listColClassWidthMap[colClass] = temp;
                //widthTemp += temp;
            }
        });
        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth;
        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
        var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
        j$('div#in_Div_L').css('width', tableHeader_L+ 'px');
        j$('table#tableData_L').css('width', tableHeader_L + 'px');
        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
        if(tableWidth > blockWidthNew){
            j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
            j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh
        }
        j$('div#in_Div').scroll(function() {
            j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
            j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
        });
        j$('div#out_Div').scroll(function() {
            j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
        });
        j$('div#in_Div_L').scroll(function() {
            j$('div#in_Div').scrollTop(j$(this).scrollTop());
        });
    }
    // windowResize();
    // スクロール連動
    // j$('div#in_Div').scroll(function() {
    //     j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
    //     j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
    // });
    // j$('div#out_Div').scroll(function() {
    //     j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
    // });
    // j$('div#in_Div_L').scroll(function() {
    //     j$('div#in_Div').scrollTop(j$(this).scrollTop());
    // });
    // 20230523  ljh lightning end
});
function runSFDCAddRemote(MetadataConnectionWarning) {
    if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
}
function sortTableJs(key) {
  // blockme();
  sortTablefunc(key);
}
// 20230523  ljh lightning start
// j$(function() {
//     var tableWidth = 0;
//     j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
//         var colClass = getColClassName(this);
//         if (colClass != 'col_Scroll') {
//             var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
//             tableWidth += headerCol.width();
//         }
//     });
//     j$('table#tableData').css('width', (tableWidth + 2) + 'px');
//     j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
//     // list の headerRow の tdに toggleWidth() を追加
//     bindTdToggleWidth();
// });
// 20230523  ljh lightning end
var elements = document.getElementsByTagName("select");
for (i = 0; i < elements.length; i++) {
    var id = elements[i].id;
    if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
        elements[i].style.display = "none";
    }
}
var tbl_l = document.getElementById("tableData_L");
var input_l = tbl_l.getElementsByTagName("input");
for (i = 0; i < input_l.length; i++) {
    var id = input_l[i].id + '_lkid';
    if (document.getElementById(id) != null) {
        input_l[i].style.width = "75%";
    }
}
var tbl = document.getElementById("tableData");
var input = tbl.getElementsByTagName("input");
for (i = 0; i < input.length; i++) {
    var id = input[i].id + '_lkid';
    if (document.getElementById(id) != null) {
        input[i].style.width = "75%";
    }
}
//aをクリックする際に、tdイベントを実装しない
j$("a[name='out_Div_a']").bind("click",function(event){
    event.stopPropagation();
});
// windowResize(); // 20230523 ljh lightning
</script>
        </apex:outputPanel>
    <!-- </apex:form> -->
</apex:component>
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.html
@@ -1,11 +1,4 @@
<template>
 <!--  <div class="slds-box slds-theme--default">
        Click on the link Below to Export data as csv/xls.
        <p class="slds-m-top--large">
            <a onclick={exportContactData}>Export Contact Data</a>
            <lightning-button variant="brand" label="Export Contact data" title="Export Contact Data" onclick={exportContactData}></lightning-button>
        </p>
    </div> -->
  <lightning-card  variant="Narrow">
    <div style="padding: 0 20px">    
      <div>
@@ -13,67 +6,60 @@
          <div style="margin-top: 5px">
             <lightning-layout>
              <!-- cancelPaddingLeft -->
                  <lightning-layout-item flexibility="auto" padding="around-small">
                      <lightning-combobox name="progress" label="状态1" value={searchObj.Status1} options={status1Options}
                          onchange={handleStatus1Change} class="searchField"></lightning-combobox>
                  </lightning-layout-item>
                  <lightning-layout-item flexibility="auto" padding="around-small">
                      <lightning-combobox
                      name="progress" label="状态2" value={searchObj.Status2} options={status2Options} onchange={handleStatus2Change}
                      class="searchField"></lightning-combobox>
                  </lightning-layout-item>
                  <lightning-layout-item flexibility="auto" padding="around-small">
                      <lightning-combobox
                      name="progress" label="服务方式" value={searchObj.onSiteRepair} options={siteRepairItems} onchange={handleSiteChange}
                      class="searchField"></lightning-combobox>
                  </lightning-layout-item>
                <lightning-layout-item size="4" padding="around-small">
                  <lightning-combobox name="progress" label="状态1" value={searchObj.Status1} options={status1Options}
                        onchange={handleStatus1Change} class="searchField"></lightning-combobox>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="around-small">
                  <lightning-combobox
                    name="progress" label="状态2" value={searchObj.Status2} options={status2Options} onchange={handleStatus2Change}
                    class="searchField"></lightning-combobox>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="around-small">
                  <lightning-combobox
                    name="progress" label="服务方式" value={searchObj.onSiteRepair} options={siteRepairItems} onchange={handleSiteChange}
                    class="searchField"></lightning-combobox>
                </lightning-layout-item>
              </lightning-layout>
              <lightning-layout>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.RepairName} type="text" label="RS修理单号" class="searchField" onchange={handleRepairNameChange}></lightning-input>
                  </lightning-layout-item>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.SAPRepairNo} type="text" label="SAP修理单号" class="searchField" onchange={handleSAPRepairNoChange}></lightning-input>
                  </lightning-layout-item>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.workLocationSelect} type="text" label="维修中心" class="searchField" onchange={handleWorkLocationChange}></lightning-input>
                  </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.RepairName} type="text" label="RS修理单号" class="searchField" onchange={handleRepairNameChange}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.SAPRepairNo} type="text" label="SAP修理单号" class="searchField" onchange={handleSAPRepairNoChange}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.workLocationSelect} type="text" label="维修中心" class="searchField" onchange={handleWorkLocationChange}></lightning-input>
                </lightning-layout-item>
              </lightning-layout>
              <lightning-layout>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.SerialNumber} type="text" label="机身编码" class="searchField" onchange={handleSerialNumberChange}></lightning-input>
                  </lightning-layout-item>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.State_Hospital} type="text" label="省份" class="searchField" onchange={handleStateHospitalChange}></lightning-input>
                  </lightning-layout-item>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <lightning-input value={searchObj.HospitalName} type="text" label="医院名称" class="searchField" onchange={handleHospitalChange}></lightning-input>
                  </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.SerialNumber} type="text" label="机身编码" class="searchField" onchange={handleSerialNumberChange}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.State_Hospital} type="text" label="省份" class="searchField" onchange={handleStateHospitalChange}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-input value={searchObj.HospitalName} type="text" label="医院名称" class="searchField" onchange={handleHospitalChange}></lightning-input>
                </lightning-layout-item>
              </lightning-layout>
              <lightning-layout>
                  <lightning-layout-item size="2" padding="horizontal-small">
                    <lightning-input type="date" label="FSE申请日(开始)" value={repair.Aware_date__c} onchange={handleAwareDateDStart}></lightning-input>
                  </lightning-layout-item>
                  <!-- cancelPaddingLeft -->
                  <lightning-layout-item size="2" padding="horizontal-small">
                    <!-- variant="label-hidden" -->
                    <lightning-input type="date" label="FSE申请日(结束)" value={repair.Aware_date2__c} onchange={handleAwareDateDEnd}></lightning-input>
                  </lightning-layout-item>
                  <lightning-layout-item size="4" padding="horizontal-small">
                    <!-- record-id={recordId} 修理委托者  Incharge_Staff__c-->
                    <!-- <lightning-record-edit-form
                        object-api-name={objectApiName}
                        record-id=''
                    >
                        <lightning-input-field field-name={nameField} onclick={handleInchargeStaffChange}> </lightning-input-field>
                    </lightning-record-edit-form> -->
                    <lightning-record-edit-form
                        object-api-name='Repair__c'
                        record-id=''
                    >
                        <lightning-input-field field-name='Incharge_Staff__c' onclick={handleInchargeStaffChange}> </lightning-input-field>
                    </lightning-record-edit-form>
                  </lightning-layout-item>
                <lightning-layout-item size="2" padding="horizontal-small">
                  <lightning-input type="date" label="FSE申请日(开始)" value={repair.Aware_date__c} onchange={handleAwareDateDStart}></lightning-input>
                </lightning-layout-item>
                <!-- cancelPaddingLeft -->
                <lightning-layout-item size="2" padding="horizontal-small">
                  <!-- variant="label-hidden" -->
                  <lightning-input type="date" label="FSE申请日(结束)" value={repair.Aware_date2__c} onchange={handleAwareDateDEnd}></lightning-input>
                </lightning-layout-item>
                <lightning-layout-item size="4" padding="horizontal-small">
                  <lightning-record-edit-form
                      object-api-name='Repair__c'
                      record-id=''
                  >
                      <lightning-input-field field-name='Incharge_Staff__c' onchange={handleInchargeStaffChange}> </lightning-input-field>
                  </lightning-record-edit-form>
                </lightning-layout-item>
              </lightning-layout>
              <lightning-layout>
                  <lightning-layout-item flexibility="auto" padding="around-small">
@@ -88,7 +74,6 @@
            <lightning-button label="打印PDF" onclick={skipPage}></lightning-button>
            
            <lightning-button label="导出Excel" onclick={exportContactData}></lightning-button>
            <!-- <lightning-button label="导出Excel" onclick={downloadCSVFile}></lightning-button> -->
          </div>
          <div>
            <lightning-datatable
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.js
@@ -4,24 +4,14 @@
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import NAME_FIELD from '@salesforce/schema/Repair__c.Incharge_Staff__c';
import MY_CUSTOM_OBJECT from '@salesforce/schema/Repair__c';
import search from '@salesforce/apex/lexBatchSelectRepairLWCController.search';
import showPDF from '@salesforce/apex/lexBatchSelectRepairLWCController.showPDF';
/*
const actions = [
    { label: 'Show details', name: 'show_details' },
    { label: 'Delete', name: 'delete' },
    ];*/
const columns = [
        { label: '状态1', fieldName: 'Status1__c'},
        { label: '状态2', fieldName: 'Status2__c' },
        { label: 'RS修理单号', fieldName: 'Name' },
        { label: 'SAP修理单号', fieldName: 'SAP_Service_Repair_No__c' },
        // { label: '型号', fieldName: 'deliveredProductName' },
        { label: '型号', fieldName: 'deliveredProductUrl',type:'url',
            typeAttributes:{
                label:{
@@ -33,7 +23,6 @@
        { label: '机身编号', fieldName: 'SerialNumber__c' },
        { label: '医院名称', fieldName: 'HP_Name__c' },
        { label: '省份', fieldName: 'State_Hospital__c' },
        // { label: '修理委托者', fieldName: 'Incharge_Staff_Name' },
        { label: '修理委托者', fieldName: 'inchargeStaffUrl',type:'url',
            typeAttributes:{
                label:{
@@ -47,19 +36,9 @@
        { label: '服务方式', fieldName: 'On_site_repair__c' },
        { label: '有无维修合同对象', fieldName: 'Number_of_EffectiveContract__c' },
        { label: '无偿区别标志', fieldName: 'NewProductGuaranteeObject__c' }
   /* {
    type: 'action',
    typeAttributes: { rowActions: actions },
    },*/
    ];
// 批量选择修理LWC
export default class lexBatchSelectRepairLWC extends LightningElement {
    // Expose a field to make it available in the template
    nameField = NAME_FIELD;
    // Flexipage provides recordId and objectApiName
    @api recordId;
    @api objectApiName;
    data = [];
    columns = columns;
@@ -106,53 +85,29 @@
    searchObj = {};
    repair = {};
    selectedRepairs;
    /* @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
     }*/
    selectedRepairs = [];
    connectedCallback(){ 
        // console.log(this.recordId);
    }
    //状态1
    handleStatus1Change(event){
        /*console.log(event);
        console.log(event.detail);*/
        this.searchObj.Status1 = event.detail.value;
        // console.log(JSON.stringify(this.searchObj));
    }
    //状态2
    handleStatus2Change(event){
        this.searchObj.Status2 = event.detail.value;
        // console.log(this.searchObj);
    }
    //服务方式
    handleSiteChange(event){
        this.searchObj.onSiteRepair = event.detail.value;
        // console.log(this.searchObj);
    }
    //RS修理单号 RepairName
    handleRepairNameChange(event){
        this.searchObj.RepairName = event.detail.value;
        // console.log(this.searchObj);
    }
    //SAP修理单号 SAPRepairNo
    handleSAPRepairNoChange(event){
        this.searchObj.SAPRepairNo = event.detail.value;
        // console.log(this.searchObj);
    }
    //维修中心 workLocationSelect
    handleWorkLocationChange(event){
@@ -173,35 +128,20 @@
    //FSE申请日 repair.Aware_date__c
    handleAwareDateDStart(event){
        this.repair.Aware_date__c = event.detail.value;
        console.log(this.repair.Aware_date__c);
    }
    // repair.Aware_date2__c
    handleAwareDateDEnd(event){
        this.repair.Aware_date2__c = event.detail.value;
        // console.log(this.repair.Aware_date2__c);
    }
    // 修理委托者 repair.Incharge_Staff__c
    handleInchargeStaffChange(event){
        this.repair.Incharge_Staff__c = event.detail.value;
        // console.log(this.repair.Aware_date2__c);
        this.repair.Incharge_Staff__c = event.detail.value[0];
    }
   //检索
    searchRepair(event) {
        console.log(this.repair.Aware_date__c);
        if (JSON.stringify(this.repair) != "{}") {
            console.log('this.repair');
            this.searchObj.repair = this.repair;
            // fse 时间条件
            /*if (!(this.repair.Aware_date__c != null && this.repair.Aware_date2__c != null) || this.repair.Aware_date__c > this.repair.Aware_date2__c) {
                const event = new ShowToastEvent({
                             title: 'error',
                             message: 'FSE申请日输入有误',
                             variant:'error',
                            });
                this.dispatchEvent(event);
                return;
            }*/
        }
        let jsonStr = JSON.stringify(this.searchObj);
        if (jsonStr === "{}") {     
@@ -212,36 +152,31 @@
                            });
            this.dispatchEvent(event);
        }else{
            console.log(jsonStr);
            search({
                json: jsonStr
            }).then(result => {
                console.log(result.repairData);
                console.log('length:'+result.repairData.length);
                if (result.repairData.length == 0 || result.repairData.length == 200) {
                if (!result.repairData || result.repairData && (result.repairData.length == 0 || result.repairData.length == 200)) {
                    const event = new ShowToastEvent({
                             title: 'warning',
                             message: result.status,
                             variant:'warning',
                            });
                    this.dispatchEvent(event);
                    if (!result.repairData || result.repairData && result.repairData.length == 0) {
                        result.repairData = [];
                    }
                }
                let returnArr = [];
                result.repairData.forEach(function(v){ 
                    let objRepair = v.repair;
                    //添加修理委托者和型号名称
                    objRepair.deliveredProductName = objRepair.Delivered_Product__r.Name;
                    objRepair.deliveredProductName = objRepair.Delivered_Product__r ? objRepair.Delivered_Product__r.Name : '';
                    objRepair.deliveredProductUrl = "/"+objRepair.Delivered_Product__c;
                    objRepair.inchargeStaffName = objRepair.Incharge_Staff__r.Name;
                    objRepair.inchargeStaffName = objRepair.Incharge_Staff__r ? objRepair.Incharge_Staff__r.Name : '';
                    objRepair.inchargeStaffUrl = "/"+objRepair.Incharge_Staff__c;
                    // console.log(objRepair);
                    returnArr.push(objRepair);
                }); 
                /*console.log('arr');
                console.log(arr);
                console.log(arr.length);*/
                this.data = returnArr;
                // console.log(this.data);
            }).catch(error => {
                console.log("error");
                console.log(error);
@@ -278,7 +213,6 @@
                fieldNameArr.push(v.fieldName);
            }
        }); 
        console.log(fieldNameArr);
        fieldNameArr.forEach(v=>{
            console.log(v);
            // console.log(this.data[0].v);
@@ -355,10 +289,7 @@
            }else{
                doc += '<th></th>'
            }
                // fieldNameArr.forEach(fieldName =>{
                //     doc += '<th>'+record.fieldName+'</th>';
                // });
                doc += '</tr>';
            doc += '</tr>';
        });
        doc += '</table>';
        var element = 'data:application/vnd.ms-excel,' + encodeURIComponent(doc);
@@ -371,163 +302,9 @@
        downloadElement.click();
    }
    // this method validates the data and creates the csv file to download  this.data的所有字段
     downloadCSVFile1() {
        console.log("downloadCSVFile1");
        let rowEnd = '\n';
        let csvString = '';
        // this set elminates the duplicates if have any duplicate keys
        let rowData = new Set();
        let columnsData = new Set();
        let columnsLabelData = new Set();
        // getting keys from data
        this.data.forEach(function (record) {
            Object.keys(record).forEach(function (key) {
                rowData.add(key);
            });
        });
        console.log(rowData);
        // Array.from() method returns an Array object from any object with a length property or an iterable object.
        rowData = Array.from(rowData);
        console.log(rowData);
        // splitting using ','
        csvString += rowData.join(',');
        csvString += rowEnd;
        console.log(csvString);
        this.columns.forEach(function(v){
            columnsLabelData.add(v.label);
            if (v['typeAttributes']) {
                columnsData.add(v['typeAttributes'].label.fieldName);
            }else{
                columnsData.add(v.fieldName);
            }
        });
        console.log("columnsData");
        console.log(columnsLabelData);
        console.log(columnsData);
        console.log(rowData[1]);
        console.log(Array.from(columnsData));
        console.log(Array.from(columnsData).hasOwnProperty(rowData[1]));
        console.log(this.data[0].Name);
        console.log(this.data[0][rowData[1]]);
        // main for loop to get the data based on key value
        for(let i=0; i < this.data.length; i++){
            let colValue = 0;
            // validating keys in data
            for(let key in rowData) {
                if(rowData.hasOwnProperty(key)) {
                    // Key value
                    // Ex: Id, Name
                    let rowKey = rowData[key];
                    // add , after every value except the first.
                    if(colValue > 0){
                        csvString += ',';
                    }
                    // If the column is undefined, it as blank in the CSV file.
                    let value = this.data[i][rowKey] === undefined ? '' : this.data[i][rowKey];
                    csvString += '"'+ value +'"';
                    colValue++;
                }
            }
            csvString += rowEnd;
        }
        // Creating anchor element to download
        let downloadElement = document.createElement('a');
        // This  encodeURI encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).
        downloadElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csvString);
        downloadElement.target = '_self';
        // CSV File Name
        downloadElement.download = 'Account Data.csv';
        // below statement is required if you are using firefox browser
        document.body.appendChild(downloadElement);
        // click() Javascript function to download CSV file
        downloadElement.click();
    }
    //导出为Excel
    downloadCSVFile() {
        console.log("downloadCSVFile");
        let rowEnd = '\n';
        let csvString = '';
        // this set elminates the duplicates if have any duplicate keys
        //表格标题
        let columnsData = new Set();
        //表格字段
        let rowData = new Set();
        // getting keys from data
        this.columns.forEach(function(v){
            columnsData.add(v.label);
            if (v['typeAttributes']) {
                rowData.add(v['typeAttributes'].label.fieldName);
            }else{
                rowData.add(v.fieldName);
            }
        });
        console.log(columnsData);
        console.log(rowData);
        // Array.from() method returns an Array object from any object with a length property or an iterable object.
        rowData = Array.from(rowData);
        columnsData = Array.from(columnsData);
        // getting keys from data
       /* console.log("rowData");
        rowData.forEach(function(v){
            console.log(v);
        });
        console.log("columnsData");
        columnsData.forEach(function(v){
            console.log(v);
        }); */
        // splitting using ','
        csvString += columnsData.join(',');
        csvString += rowEnd;
        // console.log(csvString);
        // main for loop to get the data based on key value
        for(let i=0; i < this.data.length; i++){
            let colValue = 0;
            // validating keys in data
            for(let key in rowData) {
                if(rowData.hasOwnProperty(key)) {//del
                    // Key value
                    // Ex: Id, Name
                    let rowKey = rowData[key];
                    // add , after every value except the first.
                    if(colValue > 0){
                        csvString += ',';
                    }
                    // If the column is undefined, it as blank in the CSV file.
                    let value = this.data[i][rowKey] === undefined ? '' : this.data[i][rowKey];
                    csvString += '"'+ value +'"';
                    colValue++;
                }
            }
            csvString += rowEnd;
        }
        // Creating anchor element to download
        let downloadElement = document.createElement('a');
        // This  encodeURI encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).
        downloadElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csvString);
        downloadElement.target = '_self';
        // CSV File Name
        downloadElement.download = '修理明细表.csv';
        // below statement is required if you are using firefox browser
        document.body.appendChild(downloadElement);
        // click() Javascript function to download CSV file
        downloadElement.click();
    }
    //获取选中Repair
    getSelectedRows(event) {
        const selectedRows = event.detail.selectedRows;
        console.log(selectedRows);
        //Repair__c   selectedRepairs
        // Display that fieldName of the selected rows
        let selectedRepairsArr = [];
@@ -539,8 +316,6 @@
    //跳转到pdf页面
    skipPage() {
        console.log("selectedRows");
        // console.log(jsonStr);
        if (this.selectedRepairs.length <= 0 ) {
            const event = new ShowToastEvent({
                                     title: 'error',
@@ -553,24 +328,23 @@
        let jsonStr = JSON.stringify(this.selectedRepairs);
        showPDF({
            json: jsonStr
            }).then(result => {
                console.log(result);
                if (result.indexOf("https://ocsm") != -1) {
                     window.open(result, "维修委托书PDF", "");
                }else{
                    const event = new ShowToastEvent({
                                     title: 'error',
                                     message: result,
                                     variant:'error',
                                    });
                    this.dispatchEvent(event);
                }
            }).catch(error => {
                console.log("error");
                console.log(error);
            }).finally(() => {
            });
    }
        }).then(result => {
            if (result.indexOf("https://ocsm") != -1) {
                 window.open(result, "维修委托书PDF", "");
            }else{
                const event = new ShowToastEvent({
                                 title: 'error',
                                 message: result,
                                 variant:'error',
                                });
                this.dispatchEvent(event);
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
}
}
force-app/main/default/lwc/lexBatchSelectRepairLWC/lexBatchSelectRepairLWC.js-meta.xml
@@ -3,6 +3,7 @@
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__Tab</target>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
force-app/main/default/lwc/lexConsumApply_FromAccount/lexConsumApply_FromAccount.js
@@ -7,7 +7,7 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexConsumApply_FromAccount extends LightningElement {
export default class LexConsumApply_FromAccount extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
@@ -34,8 +34,8 @@
            recordId: this.recordId
        }).then(result=>{
            UserInfo_Owner({}).then(res=>{
                if(res.isFormalStuff == 'true'){
                    this.showToast('试用期内,不能申请','warning');
                if(res.isFormalStuff){
                    this.showToast('试用期内,不能申请','error');
                    return;
                }else{
    
@@ -55,8 +55,8 @@
                        Account__c:result.name,
                        Name:'*',
                        demo_purpose2__c:'OPD试用',
                        Person_In_Charge__c:res.lastName + res.firstName,
                        applyUser__c:res.lastName + res.firstName
                        Person_In_Charge__c:res.id,
                        applyUser__c:res.id
                    });
    
                    this[NavigationMixin.Navigate]({
@@ -66,7 +66,7 @@
                            actionName: 'new'
                        },
                        state:{
                            defaultFieldValues: this.defaultValues
                            defaultFieldValues: defaultValues
                        }
                    })
                }
@@ -92,6 +92,7 @@
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexConsumApply_FromAccount/lexConsumApply_FromAccount.js-meta.xml
@@ -7,14 +7,5 @@
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
        <!-- 屏幕流配置 -->
        <target>lightning__FlowScreen</target>
    </targets>
    <!-- 定义变量 -->
    <targetConfigs>
        <targetConfig targets="lightning__FlowScreen">
            <!-- name js中使用的变量,从屏幕流中获取参数  label 在屏幕流的该LWC的设置中显示 -->
            <property name="recordId" type="String" label="recordId"/>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.html
New file
@@ -0,0 +1,5 @@
<template>
  <div class="dispatchOCSMQARAHolder" if:true={IsLoading}>
      <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
  </div>
</template>
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.js
New file
@@ -0,0 +1,109 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference, NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/LexConsumApply_FromCampaignCtl.init';
import  rentalApp  from '@salesforce/apex/LexConsumApply_FromCampaignCtl.rentalApp';
import UserInfo_Owner from '@salesforce/apex/LexConsumApply_FromCampaignCtl.UserInfo_Owner';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexConsumApply_FromCampaign extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        UserInfo_Owner({}).then(res=>{
            if(res){
                init({
                    recordId: this.recordId
                }).then(result => {
                    this.IsLoading = false;
                    var ups = res.userprovince.slice(0,2);
                    if(res.isFormalStuff){
                        this.showToast('试用期内,不能申请','error');
                    }else if(result.recordTypeId != result.servicetrainig && res.jobCategory == '销售服务'){
                        this.showToast('FSE不能申请该学会类型备品','error');
                    }else if((res.jobCategory == '销售服务' || res.jobCategory == '支援') && result.recordTypeId != result.servicetrainig && res.chargeProvince.indexOf((ups) == -1)){
                        this.showToast('与FSE所在省一致,才可使用备品','error');
                    }else if(result.status == '已结束'){
                        this.showToast('已结束,不能申请','error');
                    }else if(result.status == '已提交报告'){
                        this.showToast('已提交报告,不能申请','error');
                    }else if(result.status == '取消申请中'){
                        this.showToast('取消申请中,不能申请','error');
                    }else if(result.status == '取消'){
                        this.showToast('试用期内,不能申请','error');
                    }else{
                        rentalApp({})
                        .then(results=>{
                            var fieldmap = new Map();
                            for (var i=0; i< results.length; i++) {
                                var record = results[i];
                                fieldmap.set(record.QualifiedApiName,record.DurableId.toString().split('.')[1]);
                            }
                            // var url = "{!$Site.Prefix}/" + prefix + "/e?retURL=%2F{!URLENCODE(Campaign.Id)}"
                            // + "&CF" + fieldmap.get('Campaign__c') + "={!URLENCODE(Campaign.Name)}"
                            // + "&CF" + fieldmap.get('Campaign__c') + "_lkid={!URLENCODE(Campaign.Id)}"
                            // + "&Name={!URLENCODE('*')}"
                            // + "&" + fieldmap.get('demo_purpose2__c') + "={!URLENCODE('学会展会')}"
                            // + "&Name={!URLENCODE('*')}"
                            // + "&CF" + fieldmap.get('Person_In_Charge__c') + "={!URLENCODE($User.LastName&' '&$User.FirstName)}"
                            // + "&CF" + fieldmap.get('Person_In_Charge__c') + "_lkid={!URLENCODE($User.Id)}"
                            // + "&CF" + fieldmap.get('applyUser__c') + "={!URLENCODE($User.LastName&' '&$User.FirstName)}"
                            // + "&CF" + fieldmap.get('applyUser__c') + "_lkid={!URLENCODE($User.Id)}"
                            // + "";
                            const defaultValues = encodeDefaultFieldValues({
                                Campaign__c: result.campaignId,
                                Name:'*',
                                demo_purpose2__c:'学会展会',
                                Person_In_Charge__c:res.id,
                                applyUser__c:res.id
                            });
                            this[NavigationMixin.Navigate]({
                                type: 'standard__objectPage',
                                attributes: {
                                    objectApiName: 'Consum_Apply__c',
                                    actionName: 'new'
                                },
                                state:{
                                    defaultFieldValues: defaultValues
                                }
                            })
                        })
                    }
                })
            }
        })
    }
    showToast(message, type) {
        const evt = new ShowToastEvent({
            title: 'Error',
            message: message,
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexConsumApply_FromCampaign/lexConsumApply_FromCampaign.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" fqn="lexConsumApply_FromCampaign">
    <apiVersion>56.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/lexConsumApply_FromOPDPlan/lexConsumApply_FromOPDPlan.js
@@ -7,7 +7,8 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexConsumApply_FromOPDPlan extends LightningElement {
// 新建耗材申请(OPD计划)
export default class LexConsumApply_FromOPDPlan extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
@@ -33,8 +34,9 @@
            recordId: this.recordId
        }).then(result=>{
            UserInfo_Owner({}).then(res=>{
                if(res.isFormalStuff == 'true'){
                    this.showToast('试用期内,不能申请','warning');
                console.log("-----UserInfo_Owner--",res)
                if(res.isFormalStuff){
                    this.showToast('试用期内,不能申请','error');
                    return;
                }else{
    
@@ -57,10 +59,10 @@
                        Account__c:result.accountLab,
                        Name:'*',
                        demo_purpose2__c:'OPD试用',
                        Person_In_Charge__c:res.lastName + res.firstName,
                        applyUser__c:res.lastName + res.firstName
                        Person_In_Charge__c:res.id,
                        applyUser__c:res.id
                    });
                    console.log("defaultValues====> ",defaultValues);
                    this[NavigationMixin.Navigate]({
                        type: 'standard__objectPage',
                        attributes: {
@@ -68,19 +70,18 @@
                            actionName: 'new'
                        },
                        state:{
                            defaultFieldValues: this.defaultValues
                            defaultFieldValues: defaultValues
                        }
                    })
                    });
                }
            })
            .catch(error => {
                console.log("error");
                console.log(error);
                console.log("error ---> ",error);
            })
        })
        .catch(error => {
            console.log("error");
            console.log("error----");
            console.log(error);
        }).finally(() => {
            this.dispatchEvent(new CloseActionScreenEvent());
@@ -94,6 +95,7 @@
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexConsumApply_FromOPDPlan/lexConsumApply_FromOPDPlan.js-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentRentalApply_FromSA">
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
@@ -7,14 +7,5 @@
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
        <!-- 屏幕流配置 -->
        <target>lightning__FlowScreen</target>
    </targets>
    <!-- 定义变量 -->
    <targetConfigs>
        <targetConfig targets="lightning__FlowScreen">
            <!-- name js中使用的变量,从屏幕流中获取参数  label 在屏幕流的该LWC的设置中显示 -->
            <property name="recordId" type="String" label="recordId"/>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
force-app/main/default/lwc/lexConsumApply_FromQIS/lexConsumApply_FromQIS.js
@@ -8,7 +8,8 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexConsumApply_FromQIS extends LightningElement {
// 新建耗材备品申请(QIS)
export default class LexConsumApply_FromQIS extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
@@ -34,7 +35,7 @@
        rentalApp({
            recordId: this.recordId
        }).then(result => {
            console.log('rentalApp============' + result);
            console.log('rentalApp============',result);
            if(result.lenth > 0){
                const evt = new ShowToastEvent({
                    title : 'Error',
@@ -47,22 +48,23 @@
            init({
                recordId: this.recordId
            }).then(result => {
                console.log('init============',result);
                this.IsLoading = false;
                if (result != null) {
                    if(result.nextAction=='送回'){
                        this.showToast('QIS对应方法为“送回”,不能申请','warning');
                        this.showToast('QIS对应方法为“送回”,不能申请','error');
                        return;
                    }
                    if(result.qISStatus=='草案中'){
                        this.showToast('QIS状态为草案中,不能申请','warning');
                        this.showToast('QIS状态为草案中,不能申请','error');
                        return;
                    }
                    if(result.qISStatus=='FSE填写完毕'){
                        this.showToast('QIS状态为FSE填写完毕,不能申请','warning');
                        this.showToast('QIS状态为FSE填写完毕,不能申请','error');
                        return;
                    }
                    if(result.qISStatus=='取消'){
                        this.showToast('QIS状态为取消,不能申请','warning');
                        this.showToast('QIS状态为取消,不能申请','error');
                        return;
                    }
                    // if('{!$User.isFormal_Stuff__c}'=='true'){
@@ -72,8 +74,8 @@
                    //     window.top.location.href=url;
                    //     }
                    UserInfo_Owner({}).then(res=>{
                        if(res.isFormalStuff == 'true'){
                            this.showToast('试用期内,不能申请','warning');
                        if(res.isFormalStuff){
                            this.showToast('试用期内,不能申请','error');
                            return;
                        }else{
                            // var query = "Select QualifiedApiName, EntityDefinition.KeyPrefix, DurableId From FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Consum_Apply__c'";
@@ -97,17 +99,17 @@
                            .catch(e=>{console.log(e)})
                            const defaultValues = encodeDefaultFieldValues({
                                QIS_Report__c: this.recordId,
                                Hospital: result.hospital,
                                Strategic_dept: result.departmentClass,
                                Account:result.hospitalDepartment,
                                demo_purpose2:'索赔QIS',
                                Hospital__c: result.hospital,
                                Strategic_dept__c: result.departmentClass,
                                Account__c:result.hospitalDepartment,
                                demo_purpose2__c:'索赔QIS',
                                Name:'*',
                                Person_In_Charge:res.lastName + res.firstName,
                                applyUser:res.lastName + res.firstName,
                                QIS_number:result.name
                                Person_In_Charge__c:res.id,
                                applyUser__c:res.id,
                                QIS_number__c:result.qisReportId
                            });
                            console.log('init============',result);
                            console.log('init============',defaultValues);
                            this[NavigationMixin.Navigate]({
                                type: 'standard__objectPage',
                                attributes: {
@@ -115,9 +117,9 @@
                                    actionName: 'new'
                                },
                                state:{
                                    defaultFieldValues: this.defaultValues
                                    defaultFieldValues: defaultValues
                                }
                            })
                            });
                        }
                    })
                    this.dispatchEvent(new CloseActionScreenEvent());
@@ -126,14 +128,10 @@
            }).catch(error => {
                console.log("error");
                console.log(error);
            }).finally(() => {
            });
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });        
    }
@@ -144,6 +142,7 @@
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexConsumApply_FromQIS/lexConsumApply_FromQIS.js-meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentRentalApply_FromSA">
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
@@ -7,14 +7,5 @@
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
        <!-- 屏幕流配置 -->
        <target>lightning__FlowScreen</target>
    </targets>
    <!-- 定义变量 -->
    <targetConfigs>
        <targetConfig targets="lightning__FlowScreen">
            <!-- name js中使用的变量,从屏幕流中获取参数  label 在屏幕流的该LWC的设置中显示 -->
            <property name="recordId" type="String" label="recordId"/>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="dispatchOCSMQARAHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.js
New file
@@ -0,0 +1,113 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference, NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/lexConsumApply_FromRACtl.init';
import  fieldDefineApp  from '@salesforce/apex/lexConsumApply_FromRACtl.fieldDefineApp';
import UserInfo_Owner from '@salesforce/apex/lexConsumApply_FromRACtl.UserInfo_Owner';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
// 新建耗材申请
export default class LexConsumApply_FromRA extends NavigationMixin(LightningElement) {
@api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        console.log(this.recordId);
        UserInfo_Owner({}).then(res=>{
            this.IsLoading = false;
            if(res.isFormalStuff){
                this.showToast('试用期内,不能申请','error');
                return;
            }else{
                fieldDefineApp({}).then(resp=>{
                    var fieldmap = new Map();
                    for (var i=0; i< resp.length; i++) {
                        var record = resp[i];
                        fieldmap.set(record.QualifiedApiName,record.DurableId.toString().split('.')[1]);
                    }
                })
                .catch(e=>{console.log(e)})
                init({
                    recordId: this.recordId
                }).then(result=>{
                    console.log('result.rentalHospital'+result.rentalHospital);
                    if(result){
                        const defaultValues = encodeDefaultFieldValues({
                            Rental_Apply__c: result.rentalApplyId,
                            demo_purpose2__c:result.demoPurpose2,
                            Campaign__c: result.rentalCampaign,
                            QIS_number__c:result.rentalQISNumber,
                            QISRepair__c:result.rentalQISRepair,
                            OPD__c:result.rentalOPD,
                            OPDPlan__c:result.rentalOPDPlan,
                            Hospital__c:result.rentalHospital,
                            Strategic_dept__c:result.rentalStrategicDept,
                            Account__c:result.rentalAccount,
                            ApplyPerson_Phone__c:result.rentalApplyPersonPhone,
                            Phone_number__c:result.rentalPhoneNumber,
                            Request_shipping_day__c:result.rentalRequestShippingDay,
                            Loaner_medical_Staff__c:result.rentalLoanerMedicalStaff,
                            Shipment_address__c:result.rentalShipmentAddress,
                            Dealer__c:result.rentalDealer,
                            direct_send__c:result.rentalDirectSend,
                            pickup_time__c:result.rentalPickupTime,
                            Loaner_received_staff__c:result.rentalLoanerReceivedStaff,
                            Loaner_received_staff_phone__c:result.rentalLoanerReceivedStaffPhone,
                            Post_Code__c:result.rentalPostCode,
                            direct_shippment_address__c:result.rentalDirectShippmentAddress,
                            Name:'*',
                            Person_In_Charge__c:res.id,
                            applyUser__c:res.id
                        });
                        console.log('init============',result);
                        console.log('init============',defaultValues);
                        this[NavigationMixin.Navigate]({
                            type: 'standard__objectPage',
                            attributes: {
                                objectApiName: 'Consum_Apply__c',
                                actionName: 'new'
                            },
                            state:{
                                defaultFieldValues: defaultValues
                            }
                        });
                    }
                }).catch(e=>{console.log(e)})
            }
            this.dispatchEvent(new CloseActionScreenEvent());
        })
        .catch(err=>{console.log(err)})
    }
    showToast(message, type) {
        const evt = new ShowToastEvent({
            title: '',
            message: message,
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexConsumApply_FromRA/lexConsumApply_FromRA.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>56.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/lexConsumFixtureSetSelect/lexConsumFixtureSetSelect.js
@@ -4,7 +4,6 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
// 耗材备品配套一览 自定义按钮或链接:选择明细
export default class LexConsumFixtureSetSelect extends LightningElement {
    @api recordId;
@@ -13,6 +12,12 @@
    connectedCallback(){
        if (this.recordId) {
            window.open("/apex/ConsumFixtureSetSelect?pt_recid="+this.recordId, "_top");
            this.closeAction();
        }
    }
    closeAction() {
        //返回当前的耗材申请
        window.open("/"+this.recordId,'_self');
    }
}
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-06-27 16:51:15
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-02 16:56:55
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -79,7 +86,7 @@
                return;
            }else{
                window.open ('/apex/AgencyConfirmPage?id='+this.recordId, '经销商确认',
                'height=440, width=750, top=150, left=300, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                'height=440, width=1260, top=170, left=40, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }
@@ -93,4 +100,4 @@
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
}
force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js
@@ -34,6 +34,7 @@
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result,"11111111");
            this.GrouppurchasePCL = result.GrouppurchasePCL;
            this.OCMManProvinceCus = result.OCMManProvinceCus;
            this.HPSignUpStatus = result.HPSignUpStatus;
@@ -85,11 +86,11 @@
                }else{
                    if(sales_Root_Formula == 'OCM直接販売'){
                        window.open ('/apex/HPDirectSalesConfirmPage?id='+this.recordId, '医院确认',
                        'height=340, width=600, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                        'height=440, width=1200, top=170, left=70, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }else{
                        window.open ('/apex/HPConfirmPage?id='+this.recordId, '医院确认',
                        'height=340, width=800, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                        'height=440, width=1200, top=170, left=70, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
                }
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.html
New file
@@ -0,0 +1,12 @@
<!--
 * @Author: zhangchunxu
 * @Date: 2023-07-17 10:18:04
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-18 09:49:35
 *
-->
<template>
    <div class="InsertFrameNumManag" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.js
New file
@@ -0,0 +1,72 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-17 10:18:04
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-07 17:29:17
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/ESignController.ESignController';
import insertFrameNumManag from '@salesforce/apex/SetFrameNumManageWebService.insertFrameNumManag';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexESignInsertFrameNumManag extends LightningElement {
    @api recordId;
    id;
    IsLoading = true;
    StatuAchievementsDNId;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
    }
    //签收单 关联进口单证
    connectedCallback () {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.StatuAchievementsDNId = result.StatuAchievementsDNId;
            this.id = result.Id;
            this.FrameNumManag()
            // this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    FrameNumManag(){
        var sId = this.StatuAchievementsDNId;
        var esId = this.id;
        insertFrameNumManag({Id: sId,esId:esId}).then(res=>{
            if (res == '1') {
            // alert('更新数据中,请等待执行完毕。');
            this.showToast('更新数据中,请等待执行完毕。',"success");
            } else {
            // alert(rtn);
            this.showToast(res,"error");
            }
        }).catch( error =>{
            if (error.faultcode == 'sf:INSUFFICIENT_ACCESS') {
            // alert('没有执行权限。');
            this.showToast('没有执行权限。',"success");
            } else {
            this.showToast(error,"error");
            // alert(error);
            }
        });
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexESignInsertFrameNumManag/lexESignInsertFrameNumManag.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexEquipmentRentalApply_FromQIS2/lexEquipmentRentalApply_FromQIS2.html
@@ -1,6 +1,5 @@
<template>
    <div class="dispatchOCSMQARAHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexEquipmentRentalApply_FromQIS2/lexEquipmentRentalApply_FromQIS2.js
@@ -8,7 +8,7 @@
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
// 新建备品借出申请(QIS)
export default class LexEquipmentRentalApply_FromQIS2 extends LightningElement {
export default class LexEquipmentRentalApply_FromQIS2 extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
@@ -33,14 +33,11 @@
        rentalApp({
            recordId: this.recordId
        }).then(result => {
            console.log('rentalApp============',result);
            if(result.lenth > 0){
                const evt = new ShowToastEvent({
                    title : 'Error',
                    message : '同一个QIS记录不能重复申请备品',
                    variant : 'error'
                });
                this.dispatchEvent(evt);
            console.log('rentalApp==111==========',result);
            // console.log('rentalApp===222=========',result.length());
            console.log('rentalApp====333========',result.length);
            if(result.length > 0){
                this.showToast('同一个QIS记录不能重复申请备品','warning');
                return;
            }
            init({
@@ -49,21 +46,23 @@
                this.IsLoading = false;
                console.log('init============',result);
                if (result != null) {
                    // 对应方法 next_action__c
                    if(result.nextAction=='送回'){
                        this.showToast('QIS对应方法为“送回”,不能申请','error');
                        this.showToast('QIS对应方法为“送回”,不能申请','warning');
                        return;
                    }
                    // 状态  QIS_Status__c
                    if(result.qISStatus=='草案中'){
                        // this.msg =  'QIS状态为草案中,不能申请';
                        this.showToast('QIS状态为草案中,不能申请','error');
                        this.showToast('QIS状态为草案中,不能申请','warning');
                        return;
                    }
                    if(result.qISStatus=='FSE填写完毕'){
                        this.showToast('QIS状态为FSE填写完毕,不能申请','error');
                        this.showToast('QIS状态为FSE填写完毕,不能申请','warning');
                        return;
                    }
                    if(result.qISStatus=='取消'){
                        this.showToast('QIS状态为取消,不能申请','error');
                        this.showToast('QIS状态为取消,不能申请','warning');
                        return;
                    }
                    // if('{!$User.isFormal_Stuff__c}'=='true'){
@@ -73,62 +72,83 @@
                    //     window.top.location.href=url;
                    //     }
                    UserInfo_Owner({}).then(res=>{
                        if(res.isFormalStuff == 'true'){
                            this.showToast('试用期内,不能申请','error');
                            return;
                        }else{
                            const defaultValues = encodeDefaultFieldValues({
                                QIS_Report__c: this.recordId,
                                Hospital__c: result.hospital,
                                Strategic_dept__c: result.departmentClass,
                                Account__c:result.hospitalDepartment,
                                Demo_purpose1__c:'维修代用',
                                demo_purpose2__c:'索赔QIS',
                                Name:'*',
                                Person_In_Charge__c:res.lastName + res.firstName,
                                applyUser__c:res.lastName + res.firstName,
                                Loaner_received_staff__c:res.lastName + res.firstName,
                                QIS_number__c:result.name,
                                QISRepair__c:result.repair
                            });
                            console.log("=====UserInfo_Owner========>>>=====", res);
                            // 是否在试用期
                            if(res.isFormalStuff){
                                this.showToast('试用期内,不能申请','warning');
                                return;
                            }else{
                                // var url = "/a0t/e?retURL=%2F{!URLENCODE(QIS_Report__c.Id)}&
                                // CF00N10000003Mp1d={!URLENCODE(QIS_Report__c.Hospital__c)}&
                                // CF00N10000003Mp1d_lkid={!URLENCODE(QIS_Report__c.HospitalId__c)}&
                                // CF00N10000003O3V6={!URLENCODE(QIS_Report__c.Department_Class__c)}&
                                // CF00N10000003O3V6_lkid={!URLENCODE(QIS_Report__c.Department_ClassId__c)}&
                                // CF00N10000003Mp2R={!URLENCODE(QIS_Report__c.Hospital_Department__c)}&
                                // CF00N10000003Mp2R_lkid={!URLENCODE(QIS_Report__c.Hospital_DepartmentId__c)}&
                                // 00N10000003Msk0={!URLENCODE('维修代用')}&
                                // 00N10000003Msk5={!URLENCODE('索赔QIS')}&
                                // Name={!URLENCODE('*')}&
                                // CF00N10000005HzRr={!URLENCODE($User.LastName&' '&$User.FirstName)}&
                                // CF00N10000005HzRr_lkid={!URLENCODE($User.Id)}&
                                // CF00N10000005HzRz={!URLENCODE($User.LastName&' '&$User.FirstName)}&
                                // CF00N10000005HzRz_lkid={!URLENCODE($User.Id)}&
                                // 00N10000003OJzc={!URLENCODE($User.LastName&' '&$User.FirstName)}&
                                // CF00N10000004o2Mg={!URLENCODE(QIS_Report__c.Name)}&
                                // CF00N10000004o2Mg_lkid={!URLENCODE(QIS_Report__c.Id)}&
                                // CF00N10000008r73m={!URLENCODE( QIS_Report__c.Repair__c)}&
                                // CF00N10000008r73m_lkid={!URLENCODE( QIS_Report__c.RepairId__c )}&";
                                const defaultValues = encodeDefaultFieldValues({
                                    // QIS_Report__c: this.recordId,
                                    Hospital__c: result.hospital,
                                    Strategic_dept__c: result.departmentClass,
                                    Account__c:result.hospitalDepartment,
                                    Demo_purpose1__c:'维修代用',
                                    demo_purpose2__c:'索赔QIS',
                                    Name:'*',
                                    Person_In_Charge__c:res.id,
                                    applyUser__c:res.id,
                                    Loaner_received_staff__c:res.lastName + res.firstName,
                                    QIS_number__c:result.Id,
                                    QISRepair__c:result.repair
                                });
                            this[NavigationMixin.Navigate]({
                                type: 'standard__objectPage',
                                attributes: {
                                    objectApiName: 'Rental_Apply__c',
                                    actionName: 'new'
                                },
                                state:{
                                    defaultFieldValues: this.defaultValues
                                }
                            })
                        }
                    })
                                console.log("=====UserInfo_Owner========>>>=====", result.hospital,result.departmentClass,result.hospitalDepartment,res.id,res.lastName + res.firstName,result.Id,result.repair)
                                console.log("=====UserInfo_Owner========>>>=====", result.Id+" >>>>> ",result.repair)
                                console.log("=============>>>=====", defaultValues)
                                this[NavigationMixin.Navigate]({
                                    type: 'standard__objectPage',
                                    attributes: {
                                        objectApiName: 'Rental_Apply__c',
                                        actionName: 'new'
                                    },
                                    state:{
                                        defaultFieldValues: defaultValues
                                    }
                                });
                            }
                    }).catch(error => {
                        console.log("error----", error);
                        console.log(error);
                    });
                    this.dispatchEvent(new CloseActionScreenEvent());
                    // window.location.reload();
                }
            }).catch(error => {
                console.log("error");
                console.log("error----", error);
                console.log(error);
            }).finally(() => {
            });
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
            console.log("error",error);
        });        
    }
    showToast(message, type) {
        const evt = new ShowToastEvent({
            title: 'Error',
            // title: 'Error',
            message: message,
            variant: type
        });
        this.dispatchEvent(evt);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    };
}
force-app/main/default/lwc/lexEquipmentRentalApply_FromSA/lexEquipmentRentalApply_FromSA.js
@@ -73,6 +73,7 @@
                                console.log("==========res===>>>=====", res);
                                console.log("==========result1===>>>=====", result);
                                const defaultValues = {
                                    Statu_Achievements__c:result.achievementId,
                                    Hospital__c: result.hospital,
                                    Name:'*',
                                    Strategic_dept__c: result.departmentClass,
force-app/main/default/lwc/lexEquipmentSetRental_Order/lexEquipmentSetRental_Order.js
@@ -3,6 +3,19 @@
import AssignBtn  from '@salesforce/apex/RentalApplyWebService.AssignBtn';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
const event1 = new ShowToastEvent({
            title: '请检查申请状态',
            message:
                '不能引当,请确认申请的状态',
                });
const event2 = new ShowToastEvent({
            title: 'Get Help',
            message:
                '方法错误,请联系管理员',
                });
export default class lexEquipmentSetRental_Order extends LightningElement {
     @api recordId;
@@ -10,35 +23,35 @@
     Rental_Apply__c;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference){
        if(currentPageReference){
            console.log(currentPageReference);
            console.log("进入获取page参数")
            const IdValue=currentPageReference.state.recordId;
            if(IdValue){
                let str=`${IdValue}`;
                this.recordId=str;
                console.log("recordId="+str);
            }
        }
    }
    // @wire(CurrentPageReference)
 //    getStateParameters(currentPageReference){
 //        if(currentPageReference){
 //            console.log(currentPageReference);
 //            console.log("进入获取page参数")
 //            const IdValue=currentPageReference.state.recordId;
 //            if(IdValue){
 //                let str=`${IdValue}`;
 //                this.recordId=str;
 //                console.log("recordId="+str);
 //            }
 //        }
 //    }
    connectedCallback(){
    init({recordId:this.recordId}).then(res=>{
        if(res!=null){
        this.IsLoading=false;
        console.log("res");
        console.log(res);
        console.log("进入初始化对象其他属性");
        this.Rental_Apply__c=res;
        console.log(this.Rental_Apply__c);
        this.distribution();
            this.IsLoading=false;
            console.log("res");
            console.log(res);
            console.log("进入初始化对象其他属性");
            this.Rental_Apply__c=res;
            console.log(this.Rental_Apply__c);
            this.distribution();
        }
        else{
             var a="没进distribution";
 console.log(a);
            var a="没进distribution";
             console.log(a);
        }
    }).catch(error =>{
        console.log("error");
@@ -60,7 +73,8 @@
            this.Rental_Apply__c.demo_purpose2__c == '培训中心'
            )
            && this.Rental_Apply__c.Status__c == '草案中') {
            alert("不能引当,请确认申请的状态");
            this.dispatchEvent(event1);
            this.dispatchEvent(new CloseActionScreenEvent());
        } else if(
            (this.Rental_Apply__c.demo_purpose2__c == '试用(无询价)' ||
            this.Rental_Apply__c.demo_purpose2__c == '试用(有询价)' || 
@@ -72,12 +86,20 @@
            && this.Rental_Apply__c.Status__c != '批准完了'
            && this.Rental_Apply__c.Status__c != '引当完了'
            && this.Rental_Apply__c.Status__c != '出库指示完了') {
                alert("不能引当,请确认申请的状态");
                this.dispatchEvent(event1);
                this.dispatchEvent(new CloseActionScreenEvent());
        } else if(rtn == 'Fin') {
            window.open("/apex/EquipmentRentalApply?raid="+URLENCODE(this.Rental_Apply__c.Id));
            this.closeAction();
        } else{
            alert(rtn);
            this.dispatchEvent(event2);
            this.dispatchEvent(new CloseActionScreenEvent());
        }      
    }
    closeAction() {
        //返回当前的备品申请
        window.open("/"+this.recordId,'_self');
    }
}
force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-05-24 15:30:48
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-02 10:06:48
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -31,7 +38,7 @@
    CustomLink2(){
        if(this.Status != '04.已建意向'){
        window.open ('/apex/FollowPage?id='+this.recordId, '不需要的理由',
        'height=400, width=800, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
        'height=400, width=890, top=200, left=230, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
        }else {
        // alert('已经有意向了,不能执行此操作。');
        this.showToast("已经有意向了,不能执行此操作。","error")
force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-05-24 17:26:09
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-02 10:28:57
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -33,7 +40,7 @@
    NoStatus(){
        if(this.Status != '04.已建意向'){
            window.open ('/apex/StatusPage?id='+this.recordId , '不需要的理由',
    'height=400, width=790, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
    'height=400, width=890, top=200, left=230, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
        }else {
        // alert('已经有意向了,不能执行此操作。');
        this.showToast("已经有意向了,不能执行此操作。","error")
force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-05-29 10:16:02
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-02 10:27:43
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -37,7 +44,7 @@
    ServiceFollow (){
        if(null != this.FSEOwnerId && (this.FSEOwnerId== this.userId || this.userId == this.JINGZHUOJISHU)){
            window.open ('/apex/ServiceFollowPage?id='+this.recordId, '服务跟进',
            'height=400, width=800, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
            'height=400, width=890, top=200, left=230, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
        }else{
            // alert("此按钮只有FSE可以点击!");
            this.showToast("此按钮只有FSE可以点击!","error")
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.css
New file
@@ -0,0 +1,11 @@
.Holder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display : none !important;
}
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html
@@ -1,5 +1,6 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
@@ -3,6 +3,7 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import updateForSubmitButton  from '@salesforce/apex/ReportController.updateForSubmitButton';
import { updateRecord } from 'lightning/uiRecordApi';
import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/LexLostSubmitApprovalController.LexLostSubmitApprovalController';
import submit from '@salesforce/apex/LexLostSubmitApprovalController.submit';
@@ -35,16 +36,19 @@
            console.log("LexConsumablesLost------>>>",result)
            if (result.statusTf == "填写完毕" ||  result.statusTf == "申请中" || result.statusTf == "已批准") {
              this.showToast('请确认遗失报告状态,已经提交过的申请,不能重复提交','warning')
              return;
              this.showToast('124563','请确认遗失报告状态,已经提交过的申请,不能重复提交','error');
            }
            if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
                return;
            }
            // -----------------------------------------------------------------------------------------------------
            // if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
            //     return;
            // }
                LightningConfirm.open({
                message: "一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?",
                variant: 'headerless',
                label: '提示信息',
                // setting theme would have no effect
            }).then(submitgo=>{
            if (result.reportDetailList.length > 0) {
              // console.log("-----reportDetailList-----------",result.reportDetailList.length);
              var qianpinDate = new Date(result.reportDetailList[0].Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c);
              for (var i = 1; i < result.reportDetailList.length; i++) {
                var d = new Date(result.reportDetailList[i].Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c);
@@ -54,29 +58,13 @@
              }
              qianpinDate.setDate(qianpinDate.getDate() + 90);
              var d = '' + qianpinDate.getFullYear()+'/' + (qianpinDate.getMonth()+1) + '/' + qianpinDate.getDate();
              this.showToast('请您的上级领导于' + d + '前完成遗失报告审批,否则备品自动断念,遗失报告自动取消。','warning');
              this.showToast('请您的上级领导于' + d + '前完成遗失报告审批,否则备品自动断念,遗失报告自动取消。','error');
            }
            // -----------------------------------------------------------------------------------------------------
            this.submitApproval()
            this.submitApproval();
          })
        })
        .catch(e=>{console.log(e)})
        .finally(()=>{
            this.dispatchEvent(new CloseActionScreenEvent());
        })
     }
     showToast(msg,type) {
      const event = new ShowToastEvent({
          // title: '',
          message: msg,
          variant: type
      });
      this.dispatchEvent(event);
      this.dispatchEvent(new CloseActionScreenEvent());
    }
     updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
@@ -87,15 +75,26 @@
        recordId: this.recordId
      }).then(result=>{
        if(result != '1'){
          this.showToast(result,"warning");
          return
            this.showToast('','此记录不满足任何有效批准过程的项目条件或初始提交。请与您的管理员联系以获取帮助。','error');
              return;
        }
        this.updateRecordView(this.recordId);
        // this.showToast("提交成功","success");
        this.showToast("提交成功","success");
        this.dispatchEvent(new CloseActionScreenEvent());
      })
      .finally(()=>{
        window.location.reload();
      })
      .catch(e=>{
        console.log("submitApproval----eee------->>>>",e);
      })
   }
   showToast(title,msg,type) {
    const event = new ShowToastEvent({
        title: '',
        message: msg,
        variant: type
    });
    this.dispatchEvent(event);
    this.dispatchEvent(new CloseActionScreenEvent());
  }
}
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="IntentionButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.js
New file
@@ -0,0 +1,78 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-19 13:22:53
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-04 15:30:27
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference ,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/NewLeadFromContact2.NewLeadFromContact2';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexNewLeadFromContact2 extends NavigationMixin(LightningElement) {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    IsLoading = true;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
     }
     // 客户人员 新建购买意向
     connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
                // this.IsLoading = false;
                // console.log(result,"xu111111111111");
                // this.id = result.Id;
                // /00Q/e?retURL=%2F00Q%2Fo&
                // RecordType=01210000000QiRf
                // &ent=Lead
                // &CF00N10000006ps6f={!HTMLENCODE(Contact.Name)} 客户姓名 contact_Name__c
                // &CF00N10000006ps6f_lkid={!HTMLENCODE(Contact.Id)} 客户id contact_Name__c
                // &CF00N10000002CvC5={!HTMLENCODE(Account.Name)} 医院名 Hospital_Name__c
                // &CF00N10000002CvC5_lkid={!HTMLENCODE(Account.Id)}医院id Hospital_Name__c
                // &lea3=%e4%b8%8d%e7%94%a8%e5%a1%ab%e5%86%99
                // &name_lastlea2=%e4%b8%8d%e7%94%a8%e5%a1%ab%e5%86%99
                // &CF00N10000006qNtt_lkid = {!HTMLENCODE(Account.Department_Class__c)} 战略科室分类id epartment_Class__c
                // &CF00N10000006qNtt={!HTMLENCODE(Account.Department_Class__c)} 战略科室分类 epartment_Class__c
                // var url = "/00Q/e?retURL=%2F00Q%2Fo&RecordType=01210000000QiRf&ent=Lead&CF00N10000006ps6f="+result.Name+"&CF00N10000006ps6f_lkid="+result.Id+"&CF00N10000002CvC5="+result.accountName+"&CF00N10000002CvC5_lkid="+result.accountIds+"&lea3=%e4%b8%8d%e7%94%a8%e5%a1%ab%e5%86%99&name_lastlea2=%e4%b8%8d%e7%94%a8%e5%a1%ab%e5%86%99&CF00N10000006qNtt_lkid ="+result.accountDepartmentClass+"&CF00N10000006qNtt="+result.accountDepartmentClass ;
                // window.open(url);
                console.log('LexNewLeadFromContact2 result = ' + JSON.stringify(result))
                const defaultValues = encodeDefaultFieldValues({
                    //2023/ 7/25 update by 王雪琴 PIPL Start
                    contactName : result.Name,
                    accountName:result.accountName,
                    //2023/ 7/25 update by 王雪琴 PIPL END
                    RecordType :result.NewDailyReport,
                    contact_Name__c:result.Id,
                    Hospital_Name__c:result.accountIds,
                    lea3:"",
                    name_lastlea2:"",
                    Department_Class__c:result.accountDepartmentClass,
                    awsDataId:result.AWSDataId
                });
                this[NavigationMixin.Navigate]({
                    type: 'standard__objectPage',
                    attributes: {
                        objectApiName: 'Lead',
                        actionName: 'new'
                    },
                    state:{
                        defaultFieldValues: defaultValues
                    }
                });
            this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error=>{
            console.log(error)
        })
    }
}
force-app/main/default/lwc/lexNewLeadFromContact2/lexNewLeadFromContact2.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexNewSparePartsLoanApplication/lexNewSparePartsLoanApplication.js
@@ -18,7 +18,7 @@
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          let urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
@@ -47,11 +47,11 @@
                    return;
                }
                // 决裁状态  Approved_Status__c  
                if (result.opdIFApproved == true && result.opdApprovedNo != '' && result.opdStatusProcessState.indexOf(result.opdApprovedStatus)!= -1 && result.opdApprovedStatus != '草稿' ){
                if (result.opdIFApproved == true && result.opdApprovedNo != '' && result.opdStatusProcessState.indexOf(result.opdApprovedStatus)!== -1 && result.opdApprovedStatus != '草稿' ){
                    this.showToast('已申请决裁但决裁状态不符合条件','warning');
                    return;
                }
                var HaveValue = "{!OPDPlan__c.Rental_Apply2__c}";
                // var HaveValue = "{!OPDPlan__c.Rental_Apply2__c}";
                //     备品借出申请1   Rental_Apply2__c ;  OPD计划来源  OPDType__c
                if (result.opdRentalApply2 != '' && result.opdType != '学会') {
                    this.showToast('一个OPD计划只可关联创建一个备品申请单','warning');
@@ -85,10 +85,10 @@
                        let getCampaignRecodeType = result.opdCampaignTypeId.slice(0,15)
                        console.log("-------opdCampaignRecodeTypeId---2222---------",getCampaignRecodeType,campaignRecodeType);
                        // 职种 Job_Category__c
                        if (campaignRecodeType !== getCampaignRecodeType && res.userJobCategory == '销售服务' ) {
                        if (campaignRecodeType != getCampaignRecodeType && res.userJobCategory == '销售服务' ) {
                            this.showToast('FSE不能申请该学会类型备品','warning');
                            return;
                        } else if ((res.userJobCategory == '销售服务' || res.userJobCategory == '支援') && campaignRecodeType !== getCampaignRecodeType && result.opdInternalinchargeprovince.indexOf(ups) == -1) {
                        } else if ((res.userJobCategory == '销售服务' || res.userJobCategory == '支援') && campaignRecodeType != getCampaignRecodeType && result.opdInternalinchargeprovince.indexOf(ups) == -1) {
                            this.showToast("与FSE所在省一致,才可使用备品",'warning');
                            return;
                        } else if (result.opdCampaignStatus == '已结束') {
@@ -110,16 +110,18 @@
                    // 原OPD计划(再申请)   OriginalOpdPlan__c  原OPD计划(补充申请) OriginalOpdPlanApplication__c
                    if (result.opdOriginalOpdPlan == '') {
                        if (result.opdOriginalOpdPlanApplication == '') {
                            console.log("---------学会-5555--------",result.opdCampaignId);
                            if (result.opdType == '学会' && result.opdCampaignId != '') {
                                console.log("---------学会---------",result.opdCampaignId);
                                // var purposeStr = '&00N10000003Msk0=产品试用' +
                                // '&00N10000003Msk5=学会展会' +
                                // '&CF00N10000003Mp2q_lkid={!URLENCODE(OPDPlan__c.CampaignId__c)}' +
                                // '&CF00N10000003Mp2q={!URLENCODE(OPDPlan__c.CampaignName__c)}';
                                const defaultValues = encodeDefaultFieldValues({
                                let defaultValues = encodeDefaultFieldValues({
                                    // OPDPlan__c:this.recordId,
                                    Demo_purpose1__c:'产品试用',
                                    demo_purpose2__c:'学会展会',
                                    Campaign__c:result.opdCampaign,
                                    Campaign__c:result.opdCampaignId,
                                    Account__c:result.opdAccountLaboratory,
                                    Strategic_dept__c:result.opdOCMcategoryId,
                                    Hospital__c:result.opdHospitalId,
@@ -133,6 +135,7 @@
                                    Approved_State_Create__c:result.ApprovedStatus,
                                    ApprovedNo_Create__c:result.opdApprovedNo
                                });
                                console.log("---------学会---defaultValues------",defaultValues);
                                this.navigateEvents(defaultValues);
                            } else if (result.opdOpportunityId != '') {
                                // 跟进询价ID1
@@ -141,7 +144,7 @@
                                // '&CF00N10000003O3VB_lkid={!OPDPlan__c.Related_Opportunity1_IDId__c}' +
                                // '&CF00N10000003O3VB={!HTMLENCODE(OPDPlan__c.Related_Opportunity1_Name__c)}';
                                console.log("--------defaultValues------")
                                const defaultValues = encodeDefaultFieldValues({
                                let defaultValues = encodeDefaultFieldValues({
                                    // OPDPlan__c:this.recordId,
                                    Demo_purpose1__c:'产品试用',
                                    demo_purpose2__c:'试用(有询价)',
@@ -168,7 +171,7 @@
                                // var purposeStr = '&00N10000003Msk0=产品试用' +
                                // '&00N10000003Msk5=试用(无询价)' +
                                // '&00N100000098amW={!OPDPlan__c.NoOpp_Reason__c}';
                                const defaultValues = encodeDefaultFieldValues({
                                let defaultValues = encodeDefaultFieldValues({
                                    // OPDPlan__c:this.recordId,
                                    Demo_purpose1__c:'产品试用',
                                    demo_purpose2__c:'试用(有询价)',
@@ -206,7 +209,7 @@
                            // window.open('/a0t/e?retURL=%2F{!OPDPlan__c.Id}' + purposeStr + urlStr );
                            
                        } else {
                            const defaultValues = encodeDefaultFieldValues({
                            let defaultValues = encodeDefaultFieldValues({
                                // OPDPlan__c:this.recordId,
                                Cancel_Reason__c:'',
                                Loaner_cancel_reason__c:'',
@@ -230,7 +233,7 @@
                        }
                    }else {
                        console.log("-------UserInfo_Owner---00000--else-------");
                        const defaultValues = encodeDefaultFieldValues({
                        let defaultValues = encodeDefaultFieldValues({
                            // OPDPlan__c:this.recordId,
                            Cancel_Reason__c:'',
                            Loaner_cancel_reason__c:'',
@@ -265,7 +268,7 @@
    }
    showToast(message, type) {
        const evt = new ShowToastEvent({
        let evt = new ShowToastEvent({
            // title: 'Error',
            message: message,
            variant: type
@@ -285,6 +288,6 @@
            state:{
                defaultFieldValues: defaultValues
            }
        })
        });
    }
}
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -1,3 +1,10 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-06-27 16:51:18
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-04 13:17:42
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -37,7 +44,6 @@
                this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital;
                this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager;
                this.LoseButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        })        
    }
@@ -63,11 +69,16 @@
                    }).then(res=>{
                        if(res) {
                            window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
                            this.dispatchEvent(new CloseActionScreenEvent());
                        }else{
                            this.dispatchEvent(new CloseActionScreenEvent());
                            return;
                        }                 
                    });
            }
            if(this.status == "04.待关联询价"){
                window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        })
    }
@@ -77,5 +88,6 @@
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="ProjectRestart" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.js
New file
@@ -0,0 +1,64 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference ,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import { updateRecord } from 'lightning/uiRecordApi';
import  projectRestart  from '@salesforce/apex/TenderingButtonController.projectRestart';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class lexTenderingProjectRestartButton extends NavigationMixin(LightningElement) {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    status;
    IsLoading = true;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
     }
    //招标项目 项目重启
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.status = result.status;
            this.projectRestart();
        })
    }
    projectRestart(){
        if(this.status == '09.终止'){
            projectRestart({recordId: this.recordId}).then(res=>{
                if(res != "1"){
                    var messageage = "";
                    messageage = res;
                    this.showToast(messageage,"error");
                }else{
                    this.updateRecordView();
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            }).catch(resp=>{
            })
        }else{
            // alert('终止审批状态不满足条件,无法重启。');
            this.showToast('终止审批状态不满足条件,无法重启。',"error");
            return;
        }
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexTenderingProjectRestartButton/lexTenderingProjectRestartButton.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="ProjectRestart" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.js
New file
@@ -0,0 +1,79 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-12 10:01:02
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-21 14:30:48
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference ,NavigationMixin} from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import { updateRecord } from 'lightning/uiRecordApi';
import  projectRestart  from '@salesforce/apex/TenderingButtonController.projectRestart';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class lexTenderingTerminateResponseButton extends NavigationMixin(LightningElement) {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    status;
    IsLoading = true;
    TerminateApprovalStatus;
    AccSize = [];
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
     }
    //招标项目 项目终止
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.status = result.status;
            this.TerminateApprovalStatus = result.TerminateApprovalStatus;
            this.AccSize = result.AccSize;
            this.TerminateResponse();
        })
    }
    TerminateResponse(){
        if(this.TerminateApprovalStatus == '批准' || this.TerminateApprovalStatus == '申请中'){
        // alert("已存在申请中或者已批准的终止信息。");
        this.showToast('已存在申请中或者已批准的终止信息。',"error");
        return;
        }
        if (this.AccSize.length > 0 && parseInt(this.AccSize[0].total_cnt) > 0) {
            // alert("测试:" + sqlResult.records);
            var total_cnt = parseInt(this.AccSize[0].total_cnt);
            var stage_cnt = parseInt(this.AccSize[0].stage_cnt);
            var statusf_cnt = parseInt(this.AccSize[0].statusf_cnt);
            // alert("测试:关联询价数:"+total_cnt +"|状态1符合数:"+stage_cnt+"|状态2符合数:"+statusf_cnt+"|"+(total_cnt != stage_cnt || total_cnt != statusf_cnt));
            // 判断总数和各状态符合数
            if (total_cnt != stage_cnt || total_cnt != statusf_cnt) {
            // alert("关联询价状态不符合终止申请条件。");
            this.showToast('关联询价状态不符合终止申请条件。',"error");
            return;
            }
        }
        window.open ('/apex/Terminate?id='+this.recordId, '', 'height=350, width=600, top=200, left=350,location=no');
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexTenderingTerminateResponseButton/lexTenderingTerminateResponseButton.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.html
New file
@@ -0,0 +1,12 @@
<!--
 * @Author: zhangchunxu
 * @Date: 2023-07-17 10:18:04
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-18 09:49:35
 *
-->
<template>
    <div class="InsertFrameNumManag" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.js
New file
@@ -0,0 +1,62 @@
/*
 * @Author: zhangchunxu
 * @Date: 2023-07-20 13:38:10
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-08-07 15:53:19
 *
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import updateFrameNumManag from '@salesforce/apex/SetFrameNumManageWebService.updateFrameNumManag';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexUpdateFrameNumManag extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
           }
         }
    }
    //机身号管理 关联数据
    connectedCallback () {
        this.UpdateFrameNumManag();
    }
    UpdateFrameNumManag(){
        this.IsLoading = false;
        var sId = this.recordId
        updateFrameNumManag({Id: sId}).then(res=>{
            console.log(res);
            if (res == '1') {
            // alert('更新数据中,请等待执行完毕。');
            this.showToast('开始执行batch,请等待执行完毕。',"success");
            } else {
            // alert(rtn);
            this.showToast(res,"error");
            }
        }).catch( error =>{
            if (error.faultcode == 'sf:INSUFFICIENT_ACCESS') {
            // alert('没有执行权限。');
            this.showToast('没有执行权限。',"error");
            } else {
            this.showToast(error,"error");
            // alert(error);
            }
        });
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexUpdateFrameNumManag/lexUpdateFrameNumManag.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/pages/AgencyGoTo.page
New file
@@ -0,0 +1,70 @@
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
    </head>
    <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
    <apex:form id="allForm">
        <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
                  <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
            </apex:actionFunction>
            <apex:outputPanel id="message">
                    <apex:pageMessages />
                    <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
                </apex:outputPanel>
        <ul style="margin : 0 auto;">
            <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitAssignRetalApply');return false;" target="_blank" >等待分配备品借出申请一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitDownAssetListAgency');return false;" target="_blank" >待下架备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitShipAssetAgencyReport');return false;" target="_blank" >待发货备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('TodayReturnAssetAgencyReport');return false;" target="_blank" >今天返回的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitCDSAssetAgency');return false;" target="_blank" >待CDS的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitUpAssetAgencyReport');return false;" target="_blank" >需要上架的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('TodayInStoreAgencyReport');return false;" target="_blank" >今天入库的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('ShortHistoryAgency');return false;" target="_blank" >欠品历史一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitRepairAgencyReport');return false;" target="_blank" >待修理的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('WaitAbandonAssetAgency');return false;" target="_blank" >待废弃备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('AngecyMonthAssetReport');return false;" target="_blank" >现地备品月报一览</a></li>
            <hr />
            <li><a href="/apex/EquipmentRentalExtend" target="_blank">查询借出中备品</a></li>
            <hr />
            <!-- <li>window.open('/apex/WebToEquipmentSetShippmentReceived','','height=700, width=1000, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')</li> -->
        </ul>
    </apex:form>
</apex:page>
force-app/main/default/pages/AgencyGoTo.page-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <label>AgencyGoTo</label>
</ApexPage>
force-app/main/default/pages/Agencytransfer.page
New file
@@ -0,0 +1,55 @@
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
    </head>
    <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
    <apex:form id="allForm">
        <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
                  <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
            </apex:actionFunction>
            <apex:outputPanel id="message">
                    <apex:pageMessages />
                    <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
                </apex:outputPanel>
        <ul style="margin : 0 auto;">
            <li><a href="" onclick="toURLPreJs('Need_off_Shelf_Spare');return false;" target="_blank" >待下架备品一览(现地)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_Delivery_Spare');return false;" target="_blank" >待发货备品一览(现地)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_Arrival_Confirmation_Spare');return false;" target="_blank" >待到货确认备品一览(现地)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_CDS_Spare');return false;" target="_blank" >待CDS的备品一览(现地)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_On_Shelf_Spare');return false;" target="_blank" >需要上架的备品一览(现地)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_Send_Back_Spare');return false;" target="_blank" >待回寄备品一览(现地)</a></li>
            <hr />
            <!-- <li>window.open('/apex/WebToEquipmentSetShippmentReceived','','height=700, width=1000, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')</li> -->
        </ul>
</apex:form>
</apex:page>
force-app/main/default/pages/Agencytransfer.page-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <label>Agencytransfer</label>
</ApexPage>
force-app/main/default/pages/BusinessCenter.page
New file
@@ -0,0 +1,115 @@
<!--
 * @Author: zhangchunxu
 * @Date: 2023-03-17 15:19:22
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-25 15:45:21
-->
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                color: #1468b6;
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
         <base target="_blank" />
    </head>
        <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
<apex:form id="allForm">
    <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
              <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
                <apex:pageMessages />
                <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
            </apex:outputPanel>
<ul style="margin : 0 auto;">
    <li><a href="" onclick="toURLPreJs('Equipment_Set_SplitReturn_Report');return false;" target="_blank" >备品拆单返回一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('LostSetDetailList');return false;" target="_blank" >欠品历史一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Repair_Asset_Lists');return false;" target="_blank" >维修中备品一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('ThrowAway_Set_List');return false;" target="_blank" >报废备品一览(个体管理)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Today_Planned_ReturnSETList');return false;" target="_blank" >今天返回的备品一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Today_Stored_Set_List');return false;" target="_blank" >今天入库的备品一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('UploadedSignList_new1');return false;" target="_blank" >上传签收单一览</a></li>
    <hr />
    <li><a href="/00O10000005FiXt" target="_blank" >***需要出库入库备品SET一览</a></li> <!-- 地址有问题 -->
    <hr />
    <li><a href="" onclick="toURLPreJs('Need_ShipCommand');return false;" target="_blank" >需要出库指示的备品一览</a></li>
    <hr />
    <li><a href="/00O10000003qeaR" target="_blank" >等待维修中的备品</a></li> <!-- 地址有问题 -->
    <hr />
    <li><a href="/a0u?fcf=00B10000003nG8c" target="_blank" >没回收 : 发货确认单</a></li>
    <hr />
    <li><a href="/apex/RepairPCL" target="_blank" >周会--修理管理表</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('UES_40');return false;" target="_blank" >包含UES-40的询价</a></li>
    <hr />
    <li><a href="/a0u?fcf=00B10000003nG8c" target="_blank" >没回收 : CDS确认单</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_BJ');return false;" target="_blank" >未处理的备品减价修理报价(北京)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_GZ');return false;" target="_blank" >未处理的备品减价修理报价(广州)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_SH');return false;" target="_blank" >未处理的备品减价修理报价(上海)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Inventory_Report_History');return false;" target="_blank" >查看盘点报告书</a></li>
    <hr />
    <li><a href="/apex/UserInProcess" target="_blank" >人员离职/变更管理</a></li>
    <hr />
    <li><a href="/apex/MergeAgencyActivity" target="_blank" >经销商用户更名</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Need_Assign_list');return false;" target="_blank" >等待分配备品借出申请一览</a></li>
    <hr />
    <li><a href="/00O10000005FiXs" target="_blank" >**需要借出备品SET一览</a></li>  <!-- 地址有问题-->
    <hr />
    <li><a href="" onclick="toURLPreJs('Medical_Expense_list');return false;" target="_blank" >诊疗项目一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Asset_loaner_token_photo');return false;" target="_blank" >已拍照固定资产数量分析</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Medical_expense_result');return false;" target="_blank" >诊疗项目跟进情况 汇总</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('new_report_Perfect');return false;" target="_blank" >待受理批量更新备品信息一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('OPDPlan_Real_Time');return false;" target="_blank" >OPD计划排序(实时)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('SS_OPDPlan');return false;" target="_blank" >OPD计划排序(拍照)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('OPD_PLANLIST');return false;" target="_blank" >OPD计划管理表(排序用)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Wait_Back_Detection');return false;" target="_blank" >待回收后检测的备品一览</a></li>
    <hr />
    <li><a href="/apex/ReceivingNoteListFirst" target="_blank" >集中备品收货清单一览</a></li>
    <hr />
    <li><a href="/a4h?fcf=00B10000006i07b" target="_blank" >待处理的报修子单</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Del_Cancel_RequestList');return false;" target="_blank" >删除/取消修理的备品申请一览</a></li>
    <hr />
</ul>
</apex:form>
</apex:page>
force-app/main/default/pages/BusinessCenter.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>58.0</apiVersion>
    <availableInTouch>true</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>BusinessCenter</label>
</ApexPage>
force-app/main/default/pages/BusinessManagements.page
@@ -1,4 +1,11 @@
<apex:page showHeader="true" sidebar="true" lightningStylesheets="true">
<!--*
 * @Author: zhangchunxu
 * @Date: 2023-06-28 18:00:34
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-19 09:57:32
 *
 *-->
 <apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
@@ -13,48 +20,99 @@
                /* font-size: 20px; */
            }
        </style>
         <base target="_blank" />
    </head>
<!-- Begin Default Content REMOVE THIS -->
        <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
<apex:form id="allForm">
    <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
              <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
                <apex:pageMessages />
                <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
            </apex:outputPanel>
<ul style="margin : 0 auto;">
    <!-- <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li>
<<<<<<< Updated upstream
    <li><a href="/apex/MaintenanceContractPCL" target="_blank" >周会--维修合同管理表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/ReceivingNoteQRScan','','height=500, width=500, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">ReceivingNoteQRScan</a></li> -->
    <!-- <hr /> -->
    <li><a href="#" onclick="javascript:window.open('/apex/MaintenanceContractPCL','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">周会--维修合同管理表</a></li>
    <li><a href="/apex/OpportunityPCLNew" target="_blank" >周会--询价管理表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/OpportunityPCLNew','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">周会--询价管理表</a></li>
    <li><a href="/apex/Dealer_enquiry" target="_blank" >询价--经销商询价</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/Dealer_enquiry','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">询价--经销商询价</a></li>
    <li><a href="/apex/StatuAchievementsPCL" target="_blank" >周会--注残管理表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/StatuAchievementsPCL','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">周会--注残管理表</a></li>
    <li><a href="/apex/LeadIntention" target="_blank" >会议询问单确认一览表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/LeadIntention','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">会议询问单确认一览表</a></li>
    <li><a href="/apex/AccountPCL'" target="_blank" >周会--客户跟进管理表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/AccountPCL','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">周会--客户跟进管理表</a></li>
    <li><a href="/apex/PersonalCalendar" target="_blank" >周会--行动管理日历</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/PersonalCalenda','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">周会--行动管理日历</a></li>
    <li><a href="/apex/AssetTable'" target="_blank" >保有设备管理表</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/AssetTable','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">保有设备管理表</a></li>
    <li><a href="/apex/PersonalEvaluation" target="_blank" >个人仪表板(下属指导)</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/PersonalEvaluatio','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">个人仪表板(下属指导)</a></li>
    <li><a href="/apex/ProvinceEvaluation" target="_blank" >按省仪表板</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/ProvinceEvaluation','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">按省仪表板</a></li>
    <li><a href="/apex/NewQuoteIrai" target="_blank" >报价委托</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/NewQuoteIrai','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">报价委托</a></li>
    <li><a href="" onclick="toURLPreJs('Copy_quotation_request1024');return false;" target="_blank" >报价委托历史</a></li>
    <hr />
    <!-- <li><a href="/00O100000079blX" target="_blank" >报价委托历史</a></li> -->
    <li><a href="#" onclick="javascript:window.open('/00O100000079blX','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">报价委托历史</a></li>
    <li><a href="00O10000002kTLp'" target="_blank" >本月H0拜访情况</a></li>
    <hr />
    <!-- <li><a href="/00O10000002kTLp" target="_blank" >本月H0拜访情况</a></li> -->
    <li><a href="#" onclick="javascript:window.open('/00O10000002kTLp','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">本月H0拜访情况</a></li>
=======
    <li><a href="/apex/FrameNumUpload" target="_blank" >进口单证上传</a></li>
    <hr />
    <li><a href="/00O10000003pPUO" target="_blank" >包含停止产品询价</a></li>
    <li><a href="/apex/IDInformationAnalyseAsset" target="_blank" >ID信息分析</a></li>
    <hr />
    <li><a href="/apex/MaintenanceContractPCL" target="_blank" >周会--维修合同管理表</a></li>
    <hr />
    <li><a href="/apex/OpportunityPCLNew" target="_blank" >周会--询价管理表</a></li>
    <hr />
    <li><a href="/apex/Dealer_enquiry" target="_blank" >询价--经销商询价</a></li>
    <hr />
    <li><a href="/apex/StatuAchievementsPCL" target="_blank" >周会--注残管理表</a></li>
    <hr />
    <li><a href="/apex/LeadIntention" target="_blank" >会议询问单确认一览表</a></li>
    <hr />
    <li><a href="/apex/AccountPCL'" target="_blank" >周会--客户跟进管理表</a></li>
    <hr />
    <li><a href="/apex/PersonalCalendar" target="_blank" >周会--行动管理日历</a></li>
    <hr />
    <li><a href="/apex/AssetTable'" target="_blank" >保有设备管理表</a></li>
    <hr />
    <li><a href="/apex/PersonalEvaluation" target="_blank" >个人仪表板(下属指导)</a></li>
    <hr />
    <li><a href="/apex/ProvinceEvaluation" target="_blank" >按省仪表板</a></li>
    <hr />
    <li><a href="/apex/NewQuoteIrai" target="_blank" >报价委托</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Copy_quotation_request1024');return false;" target="_blank" >报价委托历史</a></li>
    <hr />
    <li><a href="00O10000002kTLp'" target="_blank" >本月H0拜访情况</a></li>
    <hr />
>>>>>>> Stashed changes
    <li><a href="" onclick="toURLPreJs('Contain_stop_pcl');return false;" target="_blank" >包含停止产品询价</a></li>
    <hr />
    <li><a href="/00O10000003ONn3" target="_blank" >标准配套一览</a></li> <!-- 打开页面有问题 -->
    <hr />
    <li><a href="/apex/OFSInsReportLayout?rt=EndoscopeSystem" target="_blank" >新建点检报告书</a></li>
    <hr />
    <li><a href="/00O10000003pZBf" target="_blank" >没提交日报</a></li>
    <li><a href="" onclick="toURLPreJs('Not_submit_daily_report');return false;" target="_blank" >没提交日报</a></li>
    <hr />
    <li><a href="/a0S/e?retURL=&CF00N10000006Pu4b_lkid={!$User.TongkuoZongjian__c}&CF00N10000006Pu4b={!$User.TongkuoZongjianname_text__c}
        &CF00N10000006Pu4W_lkid={!$User.ZongjianApprovalManager__c}
@@ -66,7 +124,7 @@
    <hr />
    <li><a href="/00O1000000588tQ" target="_blank" >我的周报一览</a></li>   <!-- 打开页面有问题 -->
    <hr />
    <li><a href="/00O10000004UU0q" target="_blank" >下属指导一览</a></li>
    <li><a href="" onclick="toURLPreJs('Feedback_list');return false;" target="_blank" >下属指导一览</a></li>
    <hr />
    <li><a href="/apex/ConsumableSampleApply" target="_blank" >样品申请</a></li>
    <hr />
@@ -74,9 +132,9 @@
    <hr />
    <li><a href="/apex/RentalApplySequence" target="_blank" >备品排队查看</a></li>  <!--开发清单无该url -->
    <hr />
    <li><a href="/01Z10000000efoM" target="_blank" >自我管理-基础仪表板</a></li>
    <li><a href="/01Z10000000efoM" target="_blank" >自我管理-基础仪表板</a></li> <!-- 页面正常显示 -->
    <hr />
    <li><a href="/00O10000005Fbsj" target="_blank" >修理减价申请一览</a></li>
    <li><a href="" onclick="toURLPreJs('Report201212432');return false;" target="_blank" >修理减价申请一览</a></li>
    <hr />
    <li><a href="https://adfs.olympus.com.cn/EnrollmentServer/otaprofile/" target="_blank" >移动设备注册</a></li>
    <hr />
@@ -92,10 +150,6 @@
    <hr />
    <li><a href="/apex/BatchSelectRepairPage" target="_blank" >批量选择修理功能</a></li>
    <hr />
    <!-- <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=500, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=500, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li> -->
<!-- <li>window.open('/apex/WebToEquipmentSetShippmentReceived','','height=700, width=1000, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')</li> -->
</ul>
<!-- End Default Content REMOVE THIS -->
</apex:form>
</apex:page>
force-app/main/default/pages/ConsumApplySplit.page
@@ -1,5 +1,5 @@
<!--20230427 zq <apex:page controller="ConsumApplySplitController" action="{!init}" showHeader="false"> -->
  <apex:page lightningStylesheets="true" controller="ConsumApplySplitController" action="{!init}" showHeader="false">
<apex:page lightningStylesheets="true" controller="ConsumApplySplitController" action="{!init}" showHeader="false">
    <head>
      <title>备品借出申请分单</title>
      <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
force-app/main/default/pages/ConsumAssignCancel.page
@@ -1,107 +1,107 @@
<!--20230427 zq <apex:page controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
    <apex:page lightningStylesheets="true" controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
        <head>
            <title>耗材取消明细申请</title>
            <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
            <apex:stylesheet value="{!URLFOR($Resource.AccessorySelectCss)}"/>
            <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
            <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
            <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
            <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
        </head>
        <!-- zq 修改表格宽度 -->
        <style>
            table.list .col_Model_No__c {width:80px;}
            table.list .col_RetalFSetDetail_Cnt__c {width:30px;}
            table.list .col_VF_Cancel_Detail_Count__c {width:50px;}
            table.list .col_Cancel_Reason__c {width:30px;}
            table.list .col_Loaner_cancel_Remarks__c {width:80px;}
        </style>
        <script type="text/javascript">
            // 編集チェック
            function setChangeFlg(lineno) {
                // with checkbox
                if(document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck') !=null){
                    var nowChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked;
                    var oldChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked;
                    console.log(nowChk,oldChk);
                    if (nowChk || (nowChk != oldChk)) {
                        document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
                        // reset orderNo
                        document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = nowChk;
                        resetOrderNo();
                    }
                    if (nowChk == false && nowChk == oldChk) {
                        document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
                        document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = true;
                    }
                }else{
                    document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
                    document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
<apex:page lightningStylesheets="true" controller="ConsumAssignCancelController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
<head>
    <title>耗材取消明细申请</title>
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.AccessorySelectCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
</head>
<!-- zq 修改表格宽度 -->
<style>
    table.list .col_Model_No__c {width:120px;}
    table.list .col_RetalFSetDetail_Cnt__c {width:100px;}
    table.list .col_VF_Cancel_Detail_Count__c {width:150px;}
    table.list .col_Cancel_Reason__c {width:100px;}
    table.list .col_Loaner_cancel_Remarks__c {width:100px;}
</style>
<script type="text/javascript">
    // 編集チェック
    function setChangeFlg(lineno) {
        // with checkbox
        if(document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck') !=null){
            var nowChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked;
            var oldChk = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked;
            console.log(nowChk,oldChk);
            if (nowChk || (nowChk != oldChk)) {
                document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
                // reset orderNo
                document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = nowChk;
                resetOrderNo();
            }
            if (nowChk == false && nowChk == oldChk) {
                document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
                document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowOldCheck').checked = true;
            }
        }else{
            document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
            document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + lineno + ':changeFlg').value = 1;
        }
    }
    function applyJs() {
        var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
        var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:Cancel_Reason')).value();
        var cancel_count = j$(escapeVfId('allPage:allForm:searchBlock:VF_Cancel_Detail_Count')).value();
        var cancel_comment = j$(escapeVfId('allPage:allForm:searchBlock:Loaner_cancel_Remarks')).value();
        var cancel_Reasons = [];
        j$("td.dataCellBorder1.col_Cancel_Reason__c").each(function () {
            cancel_Reasons.push(j$(this))
        });
        var cancel_counts = [];
        j$("td.dataCellBorder1.col_VF_Cancel_Detail_Count__c").each(function () {
            cancel_counts.push(j$(this))
        });
        var cancel_comments = [];
        j$("td.dataCellBorder1.col_Loaner_cancel_Remarks__c").each(function () {
            cancel_comments.push(j$(this))
        });
        for (var i = 0; i < cnt; i++) {
            var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck'));
            if(lock.prop('checked') == true){
                if(Cancel_Reason !== ""){
                    cancel_Reasons[i].find("Select").val(Cancel_Reason);
                }
                if(cancel_count !== ""){
                    cancel_counts[i].find("input").val(cancel_count);
                }
                if(cancel_comment!==""){
                    cancel_comments[i].find("input").val(cancel_comment);
                }
            }
            function applyJs() {
                var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
                var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:Cancel_Reason')).value();
                var cancel_count = j$(escapeVfId('allPage:allForm:searchBlock:VF_Cancel_Detail_Count')).value();
                var cancel_comment = j$(escapeVfId('allPage:allForm:searchBlock:Loaner_cancel_Remarks')).value();
                var cancel_Reasons = [];
                j$("td.dataCellBorder1.col_Cancel_Reason__c").each(function () {
                    cancel_Reasons.push(j$(this))
                });
                var cancel_counts = [];
                j$("td.dataCellBorder1.col_VF_Cancel_Detail_Count__c").each(function () {
                    cancel_counts.push(j$(this))
                });
                var cancel_comments = [];
                j$("td.dataCellBorder1.col_Loaner_cancel_Remarks__c").each(function () {
                    cancel_comments.push(j$(this))
                });
                for (var i = 0; i < cnt; i++) {
                    var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck'));
                    if(lock.prop('checked') == true){
                        if(Cancel_Reason !== ""){
                            cancel_Reasons[i].find("Select").val(Cancel_Reason);
                        }
                        if(cancel_count !== ""){
                            cancel_counts[i].find("input").val(cancel_count);
                        }
                        if(cancel_comment!==""){
                            cancel_comments[i].find("input").val(cancel_comment);
                        }
                    }
                }
            }
        </script>
            <apex:form id="allForm">
                <apex:outputPanel id="pageallPanel">
                    <apex:pageBlock id="searchBlock" tabStyle="Report">
                        <apex:pageBlockSection title="取消明细申请">
                            <apex:outputField value="{!parentObj.Name}"/>
                            <apex:outputField value="{!parentObj.Person_In_Charge__c}"/>
                            <apex:outputField value="{!parentObj.Salesdept__c}"/>
                            <apex:outputField value="{!parentObj.WorkPlace__c}"/>
                            <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
                            <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
                            <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
                            <apex:outputField value="{!parentObj.Asset_loaner_start_date__c}"/>
                        </apex:pageBlockSection>
                        <apex:outputPanel >
                            <apex:outputLabel value="{!SUBSTITUTE($ObjectType.Consum_Apply_Equipment_Set__c.fields.VF_Cancel_Detail_Count__c.label,'(Sys)','')}" for="VF_Cancel_Detail_Count"/>
                            <apex:inputField style="margin-left: 5px;" value="{!pageCaes.VF_Cancel_Detail_Count__c}" id="VF_Cancel_Detail_Count"/>
                            <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" for="Cancel_Reason"/>
                            <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Cancel_Reason__c}" id="Cancel_Reason"/>
                            <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="VF_Cancel_Detail_Count"/>
                            <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_Remarks"/>
                            <apex:commandButton style="margin-left: 30px;" rerender="allForm,checEventFrame" value="适用" onclick="applyJs(); return flase;" />
                            <apex:commandButton style="margin-left: 10px;" action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="windowResize();unblockUI();" />
                        </apex:outputPanel>
                    </apex:pageBlock>
                    <apex:outputPanel id="message">
                        <apex:pageMessages />
                    </apex:outputPanel>
                    <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
        }
    }
</script>
    <apex:form id="allForm">
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockSection title="取消明细申请">
                    <apex:outputField value="{!parentObj.Name}"/>
                    <apex:outputField value="{!parentObj.Person_In_Charge__c}"/>
                    <apex:outputField value="{!parentObj.Salesdept__c}"/>
                    <apex:outputField value="{!parentObj.WorkPlace__c}"/>
                    <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
                    <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
                    <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
                    <apex:outputField value="{!parentObj.Asset_loaner_start_date__c}"/>
                </apex:pageBlockSection>
                <apex:outputPanel >
                    <apex:outputLabel value="{!SUBSTITUTE($ObjectType.Consum_Apply_Equipment_Set__c.fields.VF_Cancel_Detail_Count__c.label,'(Sys)','')}" for="VF_Cancel_Detail_Count"/>
                    <apex:inputField style="margin-left: 5px;" value="{!pageCaes.VF_Cancel_Detail_Count__c}" id="VF_Cancel_Detail_Count"/>
                    <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" for="Cancel_Reason"/>
                    <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Cancel_Reason__c}" id="Cancel_Reason"/>
                    <apex:outputLabel style="margin-left: 30px;" value="{!$ObjectType.Consum_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="VF_Cancel_Detail_Count"/>
                    <apex:inputField style="margin-left: 5px;" value="{!pageCaes.Loaner_cancel_Remarks__c}" id="Loaner_cancel_Remarks"/>
                    <apex:commandButton style="margin-left: 30px;" rerender="allForm,checEventFrame" value="适用" onclick="applyJs(); return flase;" />
                    <apex:commandButton style="margin-left: 10px;" action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="windowResize();unblockUI();" />
                </apex:outputPanel>
            </apex:form>
        </apex:page>
            </apex:pageBlock>
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
        </apex:outputPanel>
    </apex:form>
</apex:page>
force-app/main/default/pages/ConsumDefaultSelect.page
@@ -18,6 +18,7 @@
    table.list .col_Consumable_Guaranteen_end_F__c{width:100px;}
    table.list .col_You_Xiao_Ku_Cun_Jia__c{width:100px;}
    table.list .col_Jie_Chu_Fen_Pei_Jia__c{width:100px;}
    table.list .col_Qu_Xiao_Fen_Pei_Shu_Liang_Jia__c{width: 150px;}
    tr.headerRow {
        height: 40px;
    }
force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page
@@ -6,7 +6,10 @@
<!-- 20230718 zq add -->
<style type="text/css">
    table.mytable tr{
        height:35px;
        height:35px !important;
    }
    body select{
        margin: 5px;
    }
</style>
<script>
@@ -98,7 +101,7 @@
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <!--zq <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;"/> -->
                            <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;margin:10px 0px;"/>
                            <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;margin:10px 10px;"/>
                        </td>
                    </tr>
                </table>
force-app/main/default/pages/ConsumEquipmentSetReceived.page
@@ -87,13 +87,13 @@
}
/*add end by youc 2021-12-07 耗材追溯 -收货*/
table.list .col_Fixture_Model_No__c {width:100px;}
table.list .col_Fixture_Model_No__c {width:120px;}
table.list .col_Consumable_Guaranteen_end_F__c {width:100px;}
table.list .col_SerialNumber_F__c {width:100px;}
table.list .col_Salesdepartment__c {width:100px;}
table.list .col_Salesdepartment__c {width:150px;}
table.list .col_Asset_return_Day__c {width:100px;}
table.list .col_Return_DeliverySlip__r_Name {width:100px;}
table.list .col_Hui_Ji_Jia__c {width:100px;}
table.list .col_Hui_Ji_Jia__c {width:50px;}
table.list .col_Yi_Zhi_Bao_Fei_Jia__c {width:100px;}
table.list .col_Yi_Zhi_Guo_Qi_Jia__c {width:100px;}
table.list .col_Shang_Jia_Jia__c {width:100px;}
@@ -105,12 +105,7 @@
table.list .col_boxbarcodeforReceipt__c {width:100px;}
table.list .col_EquipmentManagementCode_OldData__c {width:100px;}
table.list .col_Scroll {width:100px;}
tr.headerRow {
    height: 40px;
}
input.btn {
    padding: 2px 15px !important;
}
</style>
<script type="text/javascript">
    sforce.connection.sessionId = "{!$Api.Session_ID}";
force-app/main/default/pages/ConsumEquipmentSetReturn.page
@@ -35,20 +35,20 @@
.col_EquipmentManagementCode_OldData__c {display: none;}
.col_Scroll{display: none;}
table.list .col_Fixture_Model_No__c colViewing{width:100px;}
table.list .col_Consumable_Guaranteen_end_F__c colViewing{width:100px;}
table.list .col_SerialNumber_F__c colViewing{width:100px;}
table.list .col_Salesdepartment__c colViewing{width:100px;}
table.list .col_Yi_Fa_Huo_Jia__c colViewing{width:100px;}
table.list .col_Dao_Huo_OK_Jia__c colViewing{width:100px;}
table.list .col_Dao_Huo_NG_Jia__c colViewing{width:100px;}
table.list .col_Yi_Xiao_Hao_Jia__c colViewing{width:100px;}
table.list .col_Hui_Ji_Jia__c colViewing{width:100px;}
table.list .col_Dai_Xiao_Hao_Jia__c colViewing{width:100px;}
table.list .col_ManagementCode__c colViewing{width:100px;}
table.list .col_EquipmentManagementCode__c colViewing{width:100px;}
table.list .col_EquipmentManagementCode_OldData__c colViewing" style="{width:100px;}
table.list .col_Scroll{width:100px;}
table.list .col_Fixture_Model_No__c {width:100px;}
table.list .col_Consumable_Guaranteen_end_F__c {width:100px;}
table.list .col_SerialNumber_F__c {width:100px;}
table.list .col_Salesdepartment__c {width:100px;}
table.list .col_Yi_Fa_Huo_Jia__c {width:100px;}
table.list .col_Dao_Huo_OK_Jia__c {width:100px;}
table.list .col_Dao_Huo_NG_Jia__c {width:100px;}
table.list .col_Yi_Xiao_Hao_Jia__c {width:100px;}
table.list .col_Hui_Ji_Jia__c {width:100px;}
table.list .col_Dai_Xiao_Hao_Jia__c {width:100px;}
table.list .col_ManagementCode__c {width:100px;}
table.list .col_EquipmentManagementCode__c {width:100px;}
table.list .col_EquipmentManagementCode_OldData__c {width:100px;}
tr.headerRow {
    height: 40px;
}
@@ -60,6 +60,7 @@
}
body select {
    width: 177px;
    margin: 10px 0px;
}
span.lookupInput {
    width: inherit;
force-app/main/default/pages/ConsumFixtureSetSelect.page
@@ -40,6 +40,13 @@
        font-size: 10px;
        font-weight:normal;
      }
    table.list .col_Model_No__c {width:120px;}
    table.list .col_Consum_Start_Date__c {width:100px;}
    table.list .col_Consum_Num__c {width:100px;}
    table.list .col_You_Xiao_Ku_Cun_Jia__c {width:100px;}
    table.list .col_You_Xiao_Qi_Ku_Cun_Jia__c {width:100px;}
    table.list .col_Yi_Guo_Qi_Ku_Cun_Jia__c {width:100px;}
</style>
</head>
    <apex:form id="allForm">
force-app/main/default/pages/ConsumReassign.page
@@ -1,9 +1,11 @@
<apex:page Controller="ConsumReassignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="重新分配">
<apex:page Controller="ConsumReassignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="重新分配"  lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
<style>
    .decrypt {
        position: absolute;
@@ -17,6 +19,10 @@
    a:hover .decrypt {
        display: block;
        width: 100px
    }
    th > input{
        margin-left: revert;
    }
</style>
<script type="text/javascript">
@@ -56,33 +62,36 @@
    var awsdata_map = {};
    function DecryptContactName(callback) {
        //2023 08 02 张赫阳 PIPL改造 Start
        console.log('awsdata_map' + JSON.stringify(awsdata_map));
        let no_in_ids = [];
        j$("[aws-data-id]").each(function (i, e) {
            let id = e.getAttribute("aws-data-id");
            if (!(id && awsdata_map.hasOwnProperty(id))) {
                no_in_ids.push(id);
            }
        });
        if (no_in_ids.length > 0) {
            AWSService.search(staticResource.searchUrl, JSON.stringify({
                "dataIds": no_in_ids
            }), function (data) {
                if (data.object && data.object.length > 0) {
                    for (let d of data.object) {
                        if (d.dataId) {
                            awsdata_map[d.dataId] = d;
                        }
                if (no_in_ids.length > 0) {
                AWSService.query(staticResource.queryUrl, id, function (data) {
                    console.log('data' + JSON.stringify(data));
                    if (data.object) {
                        awsdata_map[data.object.dataId] = data.object;
                        console.log('data.object.dataId' + data.object.dataId);
                        console.log('data.object' + data.object);
                    }
                }
                    BindToTile();
                    if (callback) callback();
                }, staticResource.token);
            }
            else {
                BindToTile();
                if (callback) callback();
            }, staticResource.token);
        }
        else {
            BindToTile();
            if (callback) callback();
        }
            }
            }
            console.log('awsdata_map' + JSON.stringify(id));
            console.log('awsdata_map' + JSON.stringify(no_in_ids));
        });
        //2023 08 02 张赫阳 PIPL改造 Start
    }
    function BindToTile() {
@@ -90,6 +99,10 @@
            let id = e.getAttribute("aws-data-id");
            if (id && awsdata_map.hasOwnProperty(id) && awsdata_map[id].trialUser) {
                j$(e).find(".decrypt").html(awsdata_map[id].trialUser);
                //2023 07 04 张赫阳 PIPL改造 Start
                document.getElementById(id).innerHTML = awsdata_map[id].trialUser;
                console.log('awsdata_map[id].trialUser' + awsdata_map[id].trialUser)
                //2023 07 04 张赫阳 PIPL改造 End
            }
        });
    }
@@ -112,18 +125,20 @@
                <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
                <apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/>
                <table class="linetable" border="1" style="border-collapse: collapse;width: 750px;">
                <table class="linetable" border="1" style="border-collapse: collapse;width: auto;">
                    <colgroup>
                        <col width="25"/>
                        <col width="60"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="175"/>
                        <col width="110"/>
                        <col width="175"/>
                    </colgroup>
                    <tr style="background-color:#DCDCDC;">
                        <th style="text-align:center">全选
                        <th style="text-align:center">全选
                            <apex:inputCheckbox id="checkAll" value="{!checkAll}" onclick="checkAll(this);" />
                        </th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Apply_Equipment_Set__c.label}</th>
@@ -159,7 +174,9 @@
                            <td align="center">
                                <apex:outputField value="{!info.caesd.RAESD_Status__c}"></apex:outputField>
                            </td>
                            <td align="center">
                            <!-- //2023 07 04 张赫阳 PIPL改造 Start -->
                            <td align="center" id="{!info.caesd.AWS_Data_Id__c}">
                                <!-- //2023 07 04 张赫阳 PIPL改造 End -->
                                <a style="position: relative" href="/{!info.caesd.Id}" aws-data-id="{!info.caesd.AWS_Data_Id__c}" title="">
                                    <span>{!info.caesd.Trial_User__c}</span>
                                    <span class="decrypt"></span>
force-app/main/default/pages/ConsumSelect.page
@@ -18,6 +18,8 @@
    table.list .col_Consumable_Guaranteen_end_F__c{width:100px;}
    table.list .col_You_Xiao_Ku_Cun_Jia__c{width:100px;}
    table.list .col_Jie_Chu_Fen_Pei_Jia__c{width:100px;}
    table.list .col_Fen_Pei_Shu_Liang_Jia__c{width:100px;}
    table.list .col_Fen_Pei_Shu_Liang_Jia__c input[type="text"] {width:100px;}
    tr.headerRow {
        height: 40px;
    }
force-app/main/default/pages/ConsumTrial.page
@@ -7,6 +7,7 @@
        <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
        <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
        <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
        <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
        
        <script type="text/javascript">
            var txIds = [];
@@ -30,6 +31,15 @@
                  background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
                  background-repeat:no-repeat;
                }
                .searchTable td {
                    display: -webkit-inline-box;
                    margin: 10px 10px;
                    line-height: 2rem;
                }
                .searchTable td:last-child {
                    display: inline-block;
                }
                #tableData td{display: inline-flex;}
            </style>
            <script type="text/javascript">
            var heightAjustment = 120;
@@ -768,7 +778,7 @@
                                        <apex:inputText value="{!var.lineNo}" styleClass="ordernocls" style="display:none;"/>
                                        <!-- <apex:inputHidden value="{!var.rnd.Degree_Of_Importance__c}"/> -->
                                    </td>
                                    <td class="col_Scroll"></td>
                                    <!-- <td class="col_Scroll"></td> -->
                                    
                                </tr>
                                <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
force-app/main/default/pages/ConsumTrialDis.page
@@ -1,4 +1,5 @@
<apex:page standardController="Consum_Apply__c">
<!-- zq20230519 加壳 -->
<apex:page standardController="Consum_Apply__c" lightningStylesheets="true">
    <script type="text/javascript">
        if ('{!Consum_Apply__c.Yi_loaner_arranged__c}' > 0
        ) {
force-app/main/default/pages/ConsumTrialUpdate.page
@@ -1,81 +1,671 @@
<apex:page controller="ConsumUploadPictureController"  lightningStylesheets="true" showHeader="false" action="{!init}" id="allPage">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
    <style>
        table {
          border-collapse: collapse;
        }
        td, th {
          border: 1px solid black;
          text-align: center;
        }
        input.btn {
            margin: 5px 0px;
        }
    </style>
    <script type="text/javascript">
        function closeWindow(){
            if (j$(escapeVfId('allPage:allForm:done_flag')).val() == 'true') {
                // window.opener.location.reload();
                if(j$(escapeVfId('allPage:allForm:hasPicture')).val() == 'true'){
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.background = '#009DDC';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.color = 'white';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_L:{!line}:rowCheck").checked = true;
<apex:page controller="ConsumTrialUpdateController" showHeader="false" action="{!init}" id="allPage" 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.ConsumTrialPageCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
    <apex:form id="allForm">
        <style>
            table.headTable td   {
                /*min-width:150px;*/
            }
            .left20 {
                margin-left: 20px;
            }
            body .pbBody table.list tr.headerRow td.colViewing {
              background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
              background-repeat:no-repeat;
            }
            body .pbBody table.list tr.headerRow td.colUnHideIcon {
              background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
              background-repeat:no-repeat;
            }
            #tableData td{display: inline-flex;}
        </style>
<script type="text/javascript">
    var heightAjustment = 120;
    var widthAjustment = 30;
    var staticResource = JSON.parse('{!staticResource}');
    // 适用按钮
    function applyJs() {
        var appliedFlag = true;
        var selectFlag = true;
        var isCheckFlag = false;
        var ConsumStartDate = j$(escapeVfId('allPage:allForm:searchBlock:ConsumStartDate}')).val();  // 预计使用日
        var TrialUser= j$(escapeVfId('allPage:allForm:searchBlock:TrialUser}')).val();  // 试用者
        var FollowerUserid = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkid')).val();  // 跟台者Id
        var FollowerUsername = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkold')).val();  // 跟台者Name
        // 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 ConsumStartDates = [];  // 备品预计使用日
        j$("td.intf.dataCellBorder1.Consum_Start_Date__c").each(function() {
            ConsumStartDates.push(j$(this));
        });
        var TrialUsers = [];  // 试用者
        j$("td.intf.dataCellBorder1.Trial_User__c").each(function() {
            TrialUsers.push(j$(this));
        });
        var FollowerUsers = [];  // 跟台者:
        j$("td.intf.dataCellBorder1.Follower_User__c").each(function() {
            FollowerUsers.push(j$(this));
        });
        var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).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 (ConsumStartDate != null && ConsumStartDate != '' && typeof(ConsumStartDate) != "undefined") {
                    // setChangeFlg();
                    ConsumStartDates[i].find("input").val(ConsumStartDate);
                    appliedFlag = false;
                }
                else{
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.background = '#e8e8e9';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.color = '#333';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_L:{!line}:rowCheck").checked = true;
                if (TrialUser != null && TrialUser != '' && typeof(TrialUser) != "undefined") {
                    // setChangeFlg();
                    TrialUsers[i].find("input").val(TrialUser);
                    appliedFlag = false;
                }
                window.close();
                // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
                if (FollowerUserid != null && parseInt(FollowerUserid) != 0 && typeof(FollowerUserid) != "undefined"
                    && FollowerUsername != null && FollowerUsername != 'null' && typeof(FollowerUsername) != "undefined") {
                    // setChangeFlg();
                    var inputs = FollowerUsers[i].find("input");
                    for (var j = 0; j < inputs.length; j++) {
                        if(inputs[j].name.endsWith('_lkid')) {
                            inputs[j].value = FollowerUserid;
                        }
                        else if (inputs[j].name.endsWith('_lkold')
                            || inputs[j].name.endsWith('inputField')) {
                            inputs[j].value = FollowerUsername;
                        }
                    }
                    appliedFlag = false;
                }
            }
        }
    </script>
    <apex:pageMessages id="message"/>
    <apex:form id="allForm">
        <apex:inputHidden value="{!done_flag}" id="done_flag"/>
        <apex:inputHidden value="{!hasPicture}" id="hasPicture"/>
        <table>
            <tr>
                <td colspan="6">
                    <apex:commandButton value="保存" action="{!save}" reRender="message,done_flag,hasPicture" oncomplete="closeWindow();"/>
                </td>
            </tr>
            <tr>
                <th>备品配套明细型号</th>
                <th>产品名称</th>
                <th>重要性程度</th>
                <th>跟台者</th>
                <th>消耗品有效期至</th>
                <th>耗材备品明细状态</th>
            </tr>
            <tr>
                <td>{!caesd.Fixture_Model_No_F__c}</td>
                <td>{!caesd.ProductName__c}</td>
                <td>{!caesd.Degree_Of_Importance__c}</td>
                <td> <apex:outputField value="{!caesd.Follower_User__c}"/> </td>
                <td>
                    <apex:outputText value="{0,date,yyyy'/'MM'/'dd}">
                        <apex:param value="{!caesd.Consumable_Guaranteen_end_F__c}" />
                    </apex:outputText>
                </td>
                <td>{!caesd.RAESD_Status__c}</td>
            </tr>
            <tr>
                <th colspan="3">图片1</th>
                <th colspan="3">图片2</th>
            </tr>
            <tr>
                <td colspan="3">
                    <apex:inputField value="{!caesd.Picture1__c}"/>
                </td>
                <td colspan="3">
                    <apex:inputField value="{!caesd.Picture2__c}"/>
                </td>
            </tr>
        </table>
        j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
        // var clearApplyFlag = false;
        window.setTimeout(function () {
            if (ConsumStartDate == null
                    && TrialUser == null
                    && (FollowerUserid== null || FollowerUsername == null)) {  // 适用入力框全为空
                // 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 (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
                        var alertMsg1 = "已将打勾数据中的 " + "备品预计使用日" + " 适用为 " + ConsumStartDate + " \r\n";
                        alertMsg += alertMsg1;
                    }
                    if (TrialUser != null && typeof(TrialUser) != "undefined") {
                        var alertMsg1 = "已将打勾数据中的 " + "试用者" + " 适用为 " + TrialUser + " \r\n";
                        alertMsg += alertMsg1;
                    }
                    if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
                    && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
                        var alertMsg2 = "已将打勾数据中的 " + "跟台者:" + " 适用为 " + FollowerUsername + " \r\n";
                        alertMsg += alertMsg2;
                    }
                    // alert(alertMsg);
                    // clearApplyFlag = true;
                    j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                    // passApplyMsgToController(alertMsg, 'Success');
                }
            } else {
                if (!appliedFlag) {
                    var alertMsg = "适用完了 \r\n";
                    if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
                        var alertMsg1 = "已将打勾数据中的 " + "备品预计使用日" + " 适用为 " + ConsumStartDate + " \r\n";
                        alertMsg += alertMsg1;
                    }
                    if (TrialUser != null && typeof(TrialUser) != "undefined") {
                        var alertMsg1 = "已将打勾数据中的 " + " 试用者" + " 适用为 " + TrialUser + " \r\n";
                        alertMsg += alertMsg1;
                    }
                    if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
                    && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
                        var alertMsg2 = "已将打勾数据中的 " + "跟台者:" + " 适用为 " + FollowerUsername + " \r\n";
                        alertMsg += alertMsg2;
                    }
                    // passApplyMsgToController(alertMsg, 'Success');
                    j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                } else {
                    var alertMsg = "其他选项: " + otherSelectOptionText +"中无此选项值" + otherSelectOptionValue + ",无法更新。";
                    // passApplyMsgToController(alertMsg, 'Fail');
                }
            }
        }, 5);
    }
    function resetMove(d, up, len) {
        var line = j$(escapeVfId(d)).find('input')[0].value;
        resetMoveUpDown(up, parseInt(line), len);
    }
    function resetMoveUpDown(up, line, len) {
        var items = j$(".dataCellBorder2");
        var item1 = j$("td.intf.dataCellBorder1.Degree_Of_Importance__c");
        // alert(item1);
        var i = line - 1;
        var i1 = line + 1;
        // var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
        if (up == true){
            var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
            if(line != 1) {
                setChangeFlg(i-1);
                setChangeFlg(i);
                j$(items[i - 1]).children('.ordernocls').val(line);
                j$(items[i]).children('.ordernocls').val(i);
                var v1 = j$(item1[i - 1]).find("input").val();
                var v2 = j$(item1[i]).find("input").val();
                j$(item1[i - 1]).find("input").val(v2);
                j$(item1[i]).find("input").val(v1);
                // j$(item1[i - 1]).children('.ordernocls').val('' + line);
                // j$(item1[i]).children('.ordernocls').val('' + i);
            }
            else {
                j$(items[i]).children('.ordernocls').val(line);
            }
            var tr1 = j$(items[i]).parents("tr");
            tr.prev().before(tr);
            tr1.prev().before(tr1);
        }
        else {
            var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
            if(line < len) {
                setChangeFlg(i);
                setChangeFlg(line);
                j$(items[i]).children('.ordernocls').val(i1);
                j$(items[line]).children('.ordernocls').val(line);
                var v1 = j$(item1[i]).find("input").val();
                var v2 = j$(item1[line]).find("input").val();
                j$(item1[i]).find("input").val(v2);
                j$(item1[line]).find("input").val(v1);
            }
            else {
                j$(items[i]).children('.ordernocls').val(line);
            }
            var tr1 = j$(items[i]).parents("tr");
            tr.next().after(tr);
            tr1.next().after(tr1);
        }
    }
    function refopener() {
        window.opener.location.href = '/apex/ConsumTrialUpdate?parid={!parId}';
    }
    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();
        }
    }
     //2022 02 24 张华建 display PI Data start
     var rowBList;
            var TrialUser = {};
            var ids = [];
            queryUser();
            function q1(){
                var p = new Promise(function(resolve, reject){
                    rowBList = JSON.parse('{!rowListString}')
                    var x = 0;
                    var y = 0;
                    let searchCallBack = function searchCallBack(result){
                        let contacts = result.object;
                        if(contacts == null){
                            return;
                        }
                        let temp = {}
                        temp.trialUser = contacts.trialUser;
                        TrialUser[contacts.dataId] = temp;
                        x++;
                    };
                    for(var i=0;i<rowBList.length;i++){
                        if(rowBList[i].AWSDataId ){
                            y++;
                            ids.push(rowBList[i].AWSDataId + '_' + rowBList[i].Id);
                            AWSService.query(staticResource.queryUrl,rowBList[i].AWSDataId,searchCallBack,staticResource.token);
                        }
                    }
                    var id = setInterval(function(){
                        if(x == y){
                            console.log('success')
                            resolve('success');
                            clearInterval(id);
                        }
                    },500);
                });
                return p;
            }
            function q2(value){
                var p = new Promise(function(resolve, reject){
                    console.log('进入q2'+value)
                    for(var i=0;i<ids.length;i++){
                        console.log('i = '+i);
                        document.getElementById(ids[i]).children[0].children[0].innerText = TrialUser[ids[i].substring(0,18)].trialUser;
                        console.log('i = '+i);
                    }
                });
                //解密信息add by xq 2023/07/06 Start ConsumTrialUpdate q2
                for(var i in rowBList){
                        console.log('robId= '+rowBList[i].AWSDataId)
                        console.log('useeId= '+TrialUser[rowBList[i].AWSDataId]["trialUser"]);
                        document.getElementById(rowBList[i].AWSDataId+'_'+rowBList[i].Id).innerText = TrialUser[rowBList[i].AWSDataId]["trialUser"];
                }
                //解密信息add by xq 2023/07/06 end
            }
            function queryUser(){
                unblockUI()
                rowBList = JSON.parse('{!rowListString}')
                console.log('pageB.fixMode = '+'{!pageB.fixMode}')
                if('{!pageB.fixMode}' == 'true'){
                    q1().then(function(data){
                        return q2(data);
                    })
                    unblockUI();
                }else{
                    blockme();
                    console.log(rowBList)
                    let searchCallBack = function searchCallBack(result){
                        let contacts = result.object;
                        if(contacts == null){
                            return;
                        }
                        let temp = {}
                        temp.trialUser = contacts.trialUser;
                        TrialUser[contacts.dataId] = temp;
                    //解密信息add by xq 2023/07/06 Start queryUser else
                   for(var i in rowBList){
                        console.log('robId= '+rowBList[i].AWSDataId)
                        console.log('useeId= '+TrialUser[rowBList[i].AWSDataId]["trialUser"]);
                        document.getElementById(rowBList[i].AWSDataId+'_'+rowBList[i].Id).innerText = TrialUser[rowBList[i].AWSDataId]["trialUser"];
                    }
                    //解密信息add by xq 2023/07/06 end
                    };
                    for(var i=0;i<rowBList.length;i++){
                        ids.push(rowBList[i].AWSDataId + '_' + rowBList[i].Id);
                        AWSService.query(staticResource.queryUrl,rowBList[i].AWSDataId,searchCallBack,staticResource.token);
                    }
                    unblockUI();
                }
            }
            function showPIDiv(awsDataId){
                if(awsDataId.length == 0){
                    return
                }
                let index = awsDataId.indexOf('_');
                console.log('show index = ' + index);
                if(TrialUser[awsDataId.substring(0,index)] == null){
                    return
                }
                console.log('awsDataId Value:'+awsDataId);
                let parentNode = document.getElementById(awsDataId);
                let createDiv = document.createElement("div");
                createDiv.id = awsDataId+"_PI";
                let piInformation = TrialUser[awsDataId.substring(0,index)].trialUser
                //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
                createDiv.innerText = piInformation;
                let x=window.event.x;
                let y=window.event.y;
                createDiv.style.left=x;
                createDiv.style.top=y;
                createDiv.style.background="#dddddd";
                createDiv.style.position = "absolute";
                parentNode.appendChild(createDiv);
                parentNode.style.position = "relative";
            }
            function hidePIDiv(awsDataId){
                if(awsDataId.length == 0){
                    return
                }
                let index = awsDataId.indexOf('_');
                console.log('hide index = ' + index);
                if(TrialUser[awsDataId.substring(0,index)] == null){
                    return
                }
                document.getElementById(awsDataId+'_PI').remove();
            }
            function q3(){
                var p = new Promise(function(resolve, reject){
                    console.log('saveRecordJS')
                    var a = 0;
                    var b = 0;
                    let newCallBack = function newCallBack(result,indexNumber){
                        console.log('result = '+JSON.stringify(result))
                        //赋值dataId和trialUser
                        document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':EditAWSDataId').value = result.object[0].dataId;
                        document.getElementById('allPage:allForm:dataBlock:dataline_R:'+indexNumber+':inputField:6:inputField').value = result.object[0].trialUser;
                        let transParameters = {
                            txId: result.txId,
                            isSuccess: 1
                        };
                        let confirmCallBack = function confirmCallBack(result){
                            console.log('confirmCallBack = '+JSON.stringify(result))
                        }
                        b++;
                        AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
                    };
                    for(var i=0;i<rowBList.length;i++){
                        if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
                            a++;
                        }
                    }
                    debugger
                    for(var i=0;i<rowBList.length;i++){
                        if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
                            //加密试用者
                            var trialUser = document.getElementById('allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86').children[0].children[0].value
                            let consumApplyPayloadList = [];
                            let consumApplyPIData = new Object();
                            consumApplyPIData.trialUser = trialUser;
                            consumApplyPIData.sfRecordId = '';
                            consumApplyPayloadList.push(consumApplyPIData);
                            AWSService.postConsumTrial(staticResource.newUrl,i,JSON.stringify(consumApplyPayloadList),newCallBack,staticResource.token);
                        }
                    }
                    var id = setInterval(function(){
                        if(a == b){
                            console.log('a==b success')
                            resolve('success');
                            clearInterval(id);
                        }
                    },500);
                });
                return p;
            }
            function q4(){
                debugger
                let b = false;
                for(var i=0;i<rowBList.length;i++){
                    if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
                        b = true;
                    }
                }
                if(!b){
                    //unblockUI();
                    refopener();
                    return;
                }
                saveRecord();
            }
            function saveRecordJS(){
                if('{!pageB.fixMode}' != 'true'){
                    unblockUI();
                        return
                    }
                // q3().then(function(data){
                //         return q4(data);
                //     })
                saveRecord();
                unblockUI();
            }
            //2022 02 24 张华建 display PI Data end
</script>
        <apex:pageMessages />
        <apex:actionFunction name="saveRecord" action="{!saveRecord}" oncomplete="unblockUI();refopener();" rerender="allForm"/>
        <apex:inputHidden id="clearApplyFlagId" />
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock">
                    <table class="searchTable" style="width:100%">
                        <tr>
                            <apex:outputPanel layout="none" rendered="{!canEdit}">
                                <td>
                                    <!-- 预计使用日 -->
                                    {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Start_Date__c.label}
                                    <apex:inputField id="ConsumStartDate" value="{!pageB.caesdInput.Consum_Start_Date__c}"/>
                                </td>
                                <td>
                                    <!-- 试用者 -->
                                    {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}
                                    <apex:inputField id="TrialUser" value="{!pageB.caesdInput.Trial_User__c}"/>
                                </td>
                                <td style="text-align: right;">
                                    <!-- 跟台者 -->
                                    {!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Follower_User__c.label}
                                </td>
                                <td>
                                    <apex:inputField style="width:150px;" id="FollowerUser" value="{!pageB.caesdInput.Follower_User__c}"/>
                                </td>
                            </apex:outputPanel>
                        <!-- </tr> -->
                        <!-- <tr> -->
                            <td>
                            <!-- </td> -->
                            <!-- <td colspan="5"> -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="编辑" rendered="{!canEdit}" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
                                    <apex:commandButton value="编辑" style="float: right; margin-right: 40px;" rendered="{!canEdit == false}" onclick="w = window.open('/apex/ConsumTrialUpdate?parId={!parId}&canedit=true', '编辑试用表上传画面', 'width='+(window.screen.width-200)+',height='+(window.screen.height-200)+',left=100,top=100'); w.focus(); return false;"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="适用" rendered="{!canEdit}" onclick="applyJs();return false;"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="保存" onclick="blockme(); saveRecordJS(); return false;" rendered="{!canEdit}" reRender="allForm"/>
                                </span>
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
                <apex:pageBlock id="dataBlock" tabStyle="Report">
                <apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
<!--                     <table id="msgtable">
                <tr>
                    <td>
                        <apex:outputPanel id="message">
                            <apex:pageMessages />
                        </apex:outputPanel>
                    </td>
                </tr>
            </table> -->
            <div id="out_Div_L">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
                    <tr class="headerRow" height="30px">
                        <apex:outputPanel layout="none" rendered="{!canEdit}">
                        <td class="col_chk" align="center">
                            <input type='checkbox' onClick='checkAll()' id="checker" />
                        </td>
                        </apex:outputPanel>
                        <apex:repeat value="{!outputFieldList}" var="info">
                            <td class="col_{!info.value}">
                               {!info.label}
                            </td>
                        </apex:repeat>
                    </tr>
                </table>
            </div>
            <div id="out_Div" >
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
                    <tr class="headerRow" height="30px">
                        <apex:repeat value="{!inputFieldList}" var="info">
                            <td class="col_{!info.value} colViewing">
                               {!info.label}
                            </td>
                        </apex:repeat>
                        <td class="col_upload_picture colViewing">上传图片</td>
                        <td class="col_Asset_Center_Confirm colViewing">备品中心确认</td>
                        <td class="col_Scroll"></td>
                    </tr>
                </table>
            </div>
            <div style="clear:both;"/>
            <div id="in_Div_L">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
                    <apex:variable value="{!0}" var="Cnt" />
                        <apex:repeat id="dataline_L" value="{!pageB.rowBList}" var="var">
                            <tr class="dataRow" id="tableData_L_{!Cnt}" >
                                <apex:outputPanel layout="none" rendered="{!canEdit}">
                                    <td class="dataCellBorder1 col_chk" align="center">
                                        <apex:inputCheckbox styleClass="rowchkcls" value="{!var.checked}" id="rowCheck" disabled="{!!var.canChange}"/>
                                    </td>
                                </apex:outputPanel>
                                <apex:repeat value="{!outputFieldList}" var="info">
                                    <td class="dataCellBorder1 col_{!info.value}" >
                                        <apex:outputField value="{!var.rnd[info.value]}" />
                                    </td>
                                </apex:repeat>
                            </tr>
                        <apex:variable value="{!Cnt+1}" var="Cnt" />
                    </apex:repeat>
                </table>
            </div>
            <apex:repeat id="dataline_R_aws" value="{!pageB.rowBList}" var="var">
                    <apex:inputHidden value="{!var.rnd.AWS_Data_Id__c}" id="EditAWSDataId"/>
                </apex:repeat>
            <div id="in_Div" style="overflow:auto;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
<apex:variable value="{!0}" var="Cnt_R" />
<apex:repeat id="dataline_R" value="{!pageB.rowBList}" var="var">
                    <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="Col_R" />
    <apex:repeat value="{!inputFieldList}" var="info" id="inputField" >
                        <td class="dataCellBorder1 intf {!info.value} col_{!info.value}" style="{!IF(info.value=='RAESD_Status__c' && var.rnd[info.value]=='申请者收货NG','background-color: #009DDC','')}" id="{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,info.value)}" onmouseover="showPIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')" onmouseout="hidePIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')">
                            <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true)}">
                                <apex:inputField id="inputField" value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo-1}');changeEditable('{!var.lineNo-1}');" rendered="{!info.value != 'Asset_loaner_category__c' || var.haveAsset}" />
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true) == false}">
                                <apex:outputField value="{!var.rnd[info.value]}" rendered="{!info.value != 'Asset_loaner_category__c' || var.haveAsset}"/>
                            </apex:outputPanel>
                        </td>
    <apex:variable value="{!Col_R+1}" var="Col_R" />
    </apex:repeat>
                        <td class="dataCellBorder1 intf col_upload_picture">
                            <apex:commandButton id="button"
                                                style="{!IF(var.rnd.Has_Picture__c,'background: #009DDC !important;color:white !important;','')}"
                                                disabled="{!NOT(canedit && pageB.fixMode && var.canChange)}"
                                                value="上传图片"
                                                onclick="window.open('ConsumUploadPicture?caesd_id={!var.rnd.Id}&line={!Cnt_R}', '上传图片','width=1000,height=600');return false;"/>
                        </td>
                        <td class="dataCellBorder1 intf col_Asset_Center_Confirm">
                            <apex:outputPanel rendered="{!pageB.fixMode && var.canChange && var.canCenterEdit}">
                                <apex:inputField id="centerConfirm" value="{!var.rnd.Asset_Center_Confirm__c}" onchange="setChangeFlg('{!var.lineNo-1}')"/>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!NOT(pageB.fixMode && var.canChange && var.canCenterEdit)}">
                                <apex:outputField value="{!var.rnd.Asset_Center_Confirm__c}"/>
                            </apex:outputPanel>
                        </td>
                        <td class="col_Scroll"></td>
                    </tr>
<apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
</apex:repeat>
                </table>
            </div>
            </apex:pageBlock>
<script type="text/javascript">
    function runSFDCAddRemote(MetadataConnectionWarning) {
        if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
    }
    function sortTableJs(key) {
      // blockme();
      sortTablefunc(key);
    }
    j$(function() {
        var tableWidth = 0;
        j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
            var colClass = getColClassName(this);
            if (colClass != 'col_Scroll') {
                var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
                tableWidth += headerCol.width() * 1.5;          // 20191211 katsu 暫定対応 * 1.5
            }
        });
        j$('table#tableData').css('width', (1740 + 2) + 'px');
        j$('table#tableHeader').css('width', (1740 + 2) + 'px');
        // list の headerRow の tdに toggleWidth() を追加
        bindTdToggleWidth();
        if( document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp')){
            document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp').style.display="none" ;
        }
    });
    windowResize();
    function changeEditable(i){
        var selectOption = document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i+ ":inputField:13:inputField").value;
        if(selectOption == 'NG'){
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":inputField:14:inputField").disabled = false;
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":button").disabled = false;
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":button").setAttribute("class",'btn');
            var centerConfirm = document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":centerConfirm");
            if(centerConfirm){
                centerConfirm.disabled = false;
            }
        }
        else {
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":inputField:14:inputField").disabled = true;
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":button").disabled = true;
            document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":button").setAttribute("class",'btnDisabled');
            var centerConfirm = document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i + ":centerConfirm");
            if(centerConfirm){
                centerConfirm.disabled = true;
            }
        }
    }
    for(var i =0;i<j$("div#in_Div_L tr.dataRow").length;i++){
        if(document.getElementById("allPage:allForm:dataBlock:dataline_R:" + i+ ":inputField:13:inputField")){
            changeEditable(i);
        }
    }
</script>
        </apex:outputPanel>
    </apex:form>
</apex:page>
force-app/main/default/pages/ConsumUploadPicture.page
@@ -1,8 +1,9 @@
<apex:page controller="ConsumUploadPictureController" showHeader="false" action="{!init}" id="allPage">
<apex:page controller="ConsumUploadPictureController"  lightningStylesheets="true" showHeader="false" action="{!init}" id="allPage">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
    <style>
        table {
          border-collapse: collapse;
@@ -11,6 +12,9 @@
          border: 1px solid black;
          text-align: center;
        }
        input.btn {
            margin: 5px 0px;
        }
    </style>
    <script type="text/javascript">
        function closeWindow(){
force-app/main/default/pages/CustomPageItem.page
New file
@@ -0,0 +1,63 @@
<!--
 * @Author: zhangchunxu
 * @Date: 2023-03-17 15:19:22
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-25 15:45:21
-->
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                color: #1468b6;
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
         <base target="_blank" />
    </head>
        <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
<apex:form id="allForm">
    <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
              <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
                <apex:pageMessages />
                <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
            </apex:outputPanel>
<ul style="margin : 0 auto;">
    <li><a href="" onclick="toURLPreJs('Need_Resign_ConsumList');return false;" target="_blank" >待重新分配耗材一览</a></li>
    <hr />
    <li><a href="/setup/ui/recordtypeselect.jsp?ent=01I10000000u0VA&retURL=%2F&save_new_url=%2Fa1E%2Fe%3FretURL%3D%252F" target="_blank" >新建:产品评价表</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Today_Planned_ReturnConsum_List');return false;" target="_blank" >今天返回的耗材一览</a></li>
    <hr />
    <li><a href="/00O10000003pX5R" target="_blank" >发货发票联络表</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Today_Stored_Consum_List');return false;" target="_blank" >今天入库的耗材一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Expired_Consum');return false;" target="_blank" >已过期耗材一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('Consumed_List');return false;" target="_blank" >已消耗耗材一览</a></li>
    <hr />
</ul>
</apex:form>
</apex:page>
force-app/main/default/pages/CustomPageItem.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>58.0</apiVersion>
    <availableInTouch>true</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>CustomPageItem</label>
</ApexPage>
force-app/main/default/pages/DealerEnquiry.page
New file
@@ -0,0 +1,67 @@
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                color: #1468b6;
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
         <base target="_blank" />
    </head>
        <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
<apex:form id="allForm">
    <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
              <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
                <apex:pageMessages />
                <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
            </apex:outputPanel>
<ul style="margin : 0 auto;">
    <li><a href="" onclick="toURLPreJs('AOppInsertLastWeekReport');return false;" target="_blank" >经销商的询价(上周追加)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('AoppOCM_Changed_OCMOpp');return false;" target="_blank" >经销商询价差异</a></li>
    <hr />
    <li><a href="/00O1000000598mg" target="_blank" >经销商客户人员(Olympus)</a></li> <!-- 地址有问题 -->
    <hr />
    <li><a href="" onclick="toURLPreJs('AgencyOppStageAmountReport');return false;" target="_blank" >经销商的询价(阶段别)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('AOppUptedLastWeekReport');return false;" target="_blank" >经销商的询价(上周更新)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('ProductOppCountReport');return false;" target="_blank" >经销商产品目标(询价状况)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('ProductRptDCCountReport');return false;" target="_blank" >经销商目标询价(活动状况)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('ProductRptCountReport');return false;" target="_blank" >经销商OPD/SIS产品(活动状况)</a></li>
    <hr />
    <li><a href="/01Z100000010qYE" target="_blank" >经销商目标成交分析</a></li>
    <hr />
    <li><a href="/apex/Dealer_enquiry" target="_blank" >询价--经销商询价</a></li> <!-- 样式有问题-->
    <hr />
    <li><a href="apex/DiscountProductApplication" target="_blank" >追溯医院特价申请</a></li>
    <hr />
    <li><a href="/apex/DealerPersonnelInformationImport" target="_blank" >经销商人员导入</a></li>
    <hr />
</ul>
</apex:form>
</apex:page>
force-app/main/default/pages/DealerEnquiry.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>true</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>DealerEnquiry</label>
</ApexPage>
force-app/main/default/pages/EquipmentManage.page
@@ -1,4 +1,4 @@
<apex:page standardController="Rental_Apply__c" showHeader="false" sidebar="false">
<apex:page standardController="Rental_Apply__c" showHeader="false" sidebar="false"  lightningStylesheets="true">
    <apex:form >
        <apex:outputPanel >
            <apex:pageBlock title="备品借出申请">
force-app/main/default/pages/EquipmentRentalResponsePopUp.page
@@ -8,6 +8,9 @@
    table.mytable tr{
        height:35px;
    }
    body select{
        margin: 5px;
    }
</style>
<script>
function savejs() {
force-app/main/default/pages/EquipmentSetShippmentReceived1.page
@@ -52,8 +52,12 @@
    j$(ele).prop("disabled", false);
}
function filljsQR(qrcode) {
    console.log('qrcode:'+qrcode);
    blockme();
    var cbox = j$("[data-qr='"+qrcode+"']").children("input[type='checkbox']");
    // 20230616 ljh start
    // var cbox = j$("[data-qr='"+qrcode+"']").children("input[type='checkbox']");
    var cbox = j$("[data-qr='"+qrcode+"']").children().children("input[type='checkbox']");
    // 20230616 ljh end
    if (cbox.size() > 1) {
        alert("数量管理附属品请手动打勾!");
    }else {
@@ -66,6 +70,7 @@
function checkMessage() {
    if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
        alert("保存完了");
        window.location.reload(false);
    }
}
@@ -84,11 +89,15 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /*width: 308px;*//*20230616 ljh*/
        text-align: left;
        margin: 0;
        /*20230623 ljh start*/
        background:#DCDCDC;
        /* background:#95aee5; */
        /*20230623 ljh end*/
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230628 ljh*/
    }
    .dateFormat {
        display: none;
@@ -105,7 +114,8 @@
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        width: 30%;
        /*width: 30%;*/
        width: 50%;/*20230616 ljh*/
        /* width: 20%; */
        /* 2023-04-23   zyh   lightning升级   end */
        float: left;
@@ -113,6 +123,10 @@
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230616 ljh*/
        height:30px;
        line-height: 30px;
        /*20230616 ljh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -128,13 +142,18 @@
    #Step_tab li.selected span {
        color: #fff;
    }
    div#main {
    /*20230615 ljh*/
    /*div#main {
        width: 320px;
    }
    }*/
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtop div {background:#DCDCDC;}
    div.rtop div {
        /*20230623 ljh start*/
        background:#DCDCDC;
        /* background:#95aee5; */
        /*20230623 ljh end*/
    }
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
@@ -147,7 +166,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230620 ljh*/
        /*width: 90%;*/
        width: 98%;
        /*20230620 ljh*/
    }
    .close {
        color: #aaaaaa;
@@ -184,7 +206,7 @@
</div>
<apex:form id="allForm">
    <apex:actionFunction name="save" action="{!save}" rerender="detail,message,done_flg" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
    <apex:actionFunction name="save" action="{!save}" rerender="detail,message,done_flg" onComplete="unblockUI();checkMessage();" />
    <apex:actionFunction name="Shippment1" action="{!Shippment1}" />
    <apex:actionFunction name="Shippment2" action="{!Shippment2}" />
    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
@@ -193,18 +215,20 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- 20230616 ljh  start-->
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" rendered="{!IF(open_type='web', true, false)}" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            </div> -->
            <!-- <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/> -->
            <!-- 20230616 ljh  end-->
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
            <!-- <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    状态切换btn
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                        <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
@@ -217,14 +241,41 @@
                        </ul>
                    </th>
                </tr>
            </table>
            <div style="text-align: right">
            </table> -->
            <!-- <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='下架', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1(this);" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='下架', true, false)}"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;">
                            <ul id="Step_tab" style="margin:0;">
                            <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                                <apex:outputPanel layout="none" rendered="{!IF(Step_status='下架', true, false)}">
                                    <li class="selected" ><span class="tabsize">下架</span></li>
                                    <li onclick="javascript:Shippment2();"><span class="tabsize">出库检测</span></li>
                                </apex:outputPanel>
                            </apex:outputPanel>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn" >
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='下架', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1(this);" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='下架', true, false)}"/>
                            <!-- 20230616 ljh  start-->
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" rendered="{!IF(open_type='web', true, false)}" disabled="{!saveBtnDisabled}"/>
                            <!-- 20230616 ljh  end-->
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
        <div id="detailDiv" class="detail">
            <apex:variable var="indexloop" value="{!0}" />
            <apex:variable var="SetName" value="" />
@@ -232,16 +283,17 @@
                <apex:variable var="indexloop" value="{!indexloop+1}"/>
                <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec['Rental_Apply_Equipment_Set__r'].Id, SetName)}" />
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec['Rental_Apply_Equipment_Set__r'].Id && indexloop != 1, true, false)}">
                    <br/>
                    <!-- <br/> -->
                    <!-- 20230623 ljh -->
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec['Rental_Apply_Equipment_Set__r'].Id, false, true)}">
                    <hr/>
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rec['Rental_Apply_Equipment_Set__r'].Id}" />
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                        <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    </apex:outputPanel>
                <div class="rtop">
                    <div class="r1"></div>
@@ -251,9 +303,12 @@
                </div>
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-01 zyh 机身编号换地方 start -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                    <!-- 2023-08-01 zyh 机身编号换地方 end -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <ul style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                <ul style="padding: 1px 0.75rem; {!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='下架', true, false)}">
                        <!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}">
@@ -262,13 +317,15 @@
                            <span>下架: </span>
                            <!-- 202107721 ljh 1719  end -->
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                            <!-- 2023-04-23   zyh   lightning升级   start -->
                            <apex:inputField id="inspectionResult" value="{!esdInfo.rec.StockDown__c}" style="margin:3px;" />
                            <!-- 20230616 ljh  -->
                            <!-- <apex:inputField id="inspectionResult" value="{!esdInfo.rec.StockDown__c}" style="margin:3px;width:75px;" /> -->
                            <!-- 2023-04-23   zyh   lightning升级   end -->
                            <span><apex:inputField id="inspectionResult" value="{!esdInfo.rec.StockDown__c}" style="margin:3px;" /></span>
                            <!-- 20230616 ljh -->
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                            <span><apex:outputField id="inspectionResult1" value="{!esdInfo.rec.StockDown__c}" style="margin:3px;width:75px;" /></span>
                            <span style="height: 35px;line-height: 35px;">
                                <!-- 20230620 ljh style="height: 35px;line-height: 35px;" -->
                                <apex:outputField id="inspectionResult1" value="{!esdInfo.rec.StockDown__c}" style="margin:3px;width:75px;" /></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt__c > 0 && esdInfo.rec.Is_Body__c}">
                                <input type="hidden" name="onetoone_main" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
@@ -282,6 +339,13 @@
                            <span>{!$ObjectType.Asset.fields.WH_location__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <!-- 20230721 ljh 机身编码换位置 -->
                        <!-- 2023-08-01 zyh 机身编号换地方 start -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li> -->
                        <!-- 2023-08-01 zyh 机身编号换地方 end -->
                        <li>
                            <span>上次回收后检测时间: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
@@ -290,10 +354,11 @@
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_After_Inspection_elapsed_days__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Pre_After_Inspection_elapsed_days__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 20230721 ljh 机身编码换位置 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- </div> -->
                    </apex:outputPanel>
                </ul>
@@ -310,17 +375,29 @@
        </apex:outputPanel>
    </div>
    <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 = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
        // let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), refractoryPeriod: 5000,scanPeriod: 5 ,mirror: false});
        // scanner.addListener('scan', function (content) {
        //   filljsQR(content);
        // });
        var standalone = window.navigator.standalone,
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), refractoryPeriod: 5000,scanPeriod: 5 ,mirror: false});
            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});
        scanner.addListener('scan', function (content) {
          filljsQR(content);
        });
        function qrsacn() {
            if (!standalone && !safari && ios) {
                window.location.href="sfqr://scan";
force-app/main/default/pages/EquipmentSetShippmentReceived2.page
@@ -119,11 +119,17 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /* width: 308px;  20230719 zyh */
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        border-radius:8px 8px 0 0;
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230629 zyh */
    }
    .menu {
        border-radius:8px;
        border:1px solid #D1D1D1;
    }
    .dateFormat {
        display: none;
@@ -134,13 +140,14 @@
        /* 2023-04-23   zyh   lightning升级   start */
        /* height: 25px; */
        height: 30px;
        margin-left:0;
        /* 2023-04-23   zyh   lightning升级   end */
        border-bottom: 5px solid #3b5998;
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        width: 30%;
        width: 50%;
        /* width: 24%; */
        /* 2023-04-23   zyh   lightning升级   end */
        float: left;
@@ -148,6 +155,10 @@
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230719 zyh*/
        height:30px;
        line-height: 30px;
        /*20230719 zyh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -165,7 +176,7 @@
    }
    
    div#main {
        width: 320px;
        /* width: 320px; */
    }
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
@@ -182,7 +193,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230719 zyh*/
        /*width: 90%;*/
        width: 98%;
        /*20230719 zyh*/
    }
    .close {
        color: #aaaaaa;
@@ -229,19 +243,19 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- <div style="text-align: right;margin-top: 10px;">
              <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/> -->
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
            <!-- <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                <tr> -->
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                    <!-- <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                        <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
@@ -260,7 +274,37 @@
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th style="font-size:20px;text-align: center;width:280px;height: 50px;">
                            <ul id="Step_tab">
                            <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                                <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
                                    <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">发货前检查</span></li>
                                    <li onclick="javascript:Shippment2();"><span class="tabsize">发货</span></li>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货', true, false)}">
                                    <li onclick="javascript:Shippment1();"><span class="tabsize">发货前检测</span></li>
                                    <li onclick="javascript:Shippment2();" class="selected"><span class="tabsize">发货</span></li>
                                </apex:outputPanel>
                            </apex:outputPanel>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='发货前', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -271,31 +315,38 @@
                <apex:variable var="indexloop" value="{!indexloop+1}"/>
                <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                    <br/>
                    <!-- <br/> -->
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                    <hr/>
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <!-- 20230721 ljh -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    </apex:outputPanel>
                <div class="rtop">
                    <!-- 20230721 ljh -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                </apex:outputPanel>
                <!-- <div class="rtop">
                    <div class="r1"></div>
                    <div class="r2"></div>
                    <div class="r3"></div>
                    <div class="r4"></div>
                </div>
                </div> -->
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-01 zyh 机身编码换位置 start -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                    <!-- 2023-08-01 zyh 机身编码换位置 end -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <ul style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                <!-- 20230721 ljh -->
                <ul style="padding: 1px 0.75rem;{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货前', true, false)}">
                        <!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <!-- 20210721 ljh 1719 start -->
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span> -->
                            <span>发货前-检测结果: </span> 
@@ -307,7 +358,8 @@
                            <span><apex:outputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:75px;" /></span>
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                            <span><apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:75px;"/></span>
@@ -317,7 +369,8 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_NG_abord_reason__c.label}:</span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                            <span>
@@ -340,11 +393,14 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_Inspection_Comment__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}" >
                                <span>
                                    <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/>
                                    <!-- 20230721 ljh -->
                                    <!-- <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/> -->
                                    <apex:inputField value="{!esdInfo.rec.Pre_Inspection_Comment__c}" style="margin:3px;"/>
                                </span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
@@ -354,7 +410,8 @@
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                        <!-- <li style="{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}"> -->
                        <li style="{!IF(esdInfo.quickCheck, 'background:#A3DE59;', '')}">
                            <span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
@@ -362,21 +419,23 @@
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Pre_After_Inspection_elapsed_days__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Pre_After_Inspection_elapsed_days__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 2023-08-01 zyh 机身编码换位置 start -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-01 zyh 机身编码换位置 end -->
                        <!-- </div> -->
                    </apex:outputPanel>
                </ul>
                
                </div>
                <div class="rbottom">
                <!-- <div class="rbottom">
                    <div class="r4"></div>
                    <div class="r3"></div>
                    <div class="r2"></div>
                    <div class="r1"></div>
                </div>
                </div> -->
                
            </apex:repeat>
        </div>
@@ -387,7 +446,10 @@
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            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});
        scanner.addListener('scan', function (content) {
          filljsQR(content);
force-app/main/default/pages/EquipmentSetShippmentReceived3.page
@@ -1,530 +1,594 @@
<!-- <apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="备品出库入库"> -->
<apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true" title="备品出库入库">
<!-- 2023-04-23   zyh   lightning升级 -->
<head>
    <meta name="format-detection" content="telephone=no"/>
</head>
<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.EquipmentSetShippmentReceivedcss)}"/>
<script type="text/javascript">
function savejs() {
    blockme();
    save();
}
function deleteDetailJs(ele) {
    blockme();
    deleteDetail(j$(ele).next().val());
}
var scanType;
function filljsQR(qrcode) {
    if(!qrcode)return;
    blockme();
    if(scanType == 1){
        j$("input[name$='SlipNo']").val(qrcode);
        unblockUI();
    }
    else{
        var aId = j$(escapeVfId('allPage:allForm:applyId')).val();
        aId = aId + "," + qrcode;
        var resdid = '';
        j$("input[type=checkbox]:checked").each(function() {
            resdid += j$(this).next().val()+",";
        });
        resdid = resdid.slice(0,-1);
        filljsQRAction(aId, resdid);
    }
    j$("#scanedqr").append("<li>"+qrcode+"</li>");
    j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
}
function addToDetail() {
    blockme();
    var resdid = '';
    var warning = false;
    j$("input[type=checkbox]:checked").each(function() {
        resdid += j$(this).next().val()+":";
        var applyid = j$(this).next().next().val();
        if (!warning) warning = j$("[data-ngnum='"+applyid+"']").val() > 0;
    });
    resdid = resdid.slice(0,-1);
    if (warning) {
        alert("申请单内存在不符合发货状态的配套,请跟进完成配套后续操作或分割申请单!")
        unblockUI();
        return;
    }
    ShippmentDetail(resdid);
}
function checkAllDetail() {
    j$('input[type="checkbox"]').prop("checked",true);
}
function ShippmentAddJs() {
    j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
    ShippmentAdd();
}
function checkMessage() {
    if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
        alert("保存完了");
    }
}
function fixDeliveryType() {
    j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
        if (this.value == '回寄') j$(this).remove();
    })
}
function resetDetailDivMargintop() {
    var handerHeight = document.getElementById('hander').clientHeight;
    document.getElementById('detailDiv').style.marginTop = handerHeight + 'px';
}
window.onload = function hiddenName(){
    if( document.getElementById('allPage:allForm:CDS_staff_mlktp')){
        document.getElementById('allPage:allForm:CDS_staff_mlktp').style.visibility="hidden" ;
        document.getElementById('allPage:allForm:CDS_staff_mlktp').style.width="200px" ;
    }
    resetDetailDivMargintop();
}
</script>
<style type="text/css">
    .hideDropdown select{
        display: none
    }
    .menu div.m_title{
        width: 308px;
        text-align: left;
        margin: 0;
        background:#95aee5;
        /*height: 42px;*/
    }
    .menu div.m_titleg{
        width: 308px;
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        /*height: 42px;*/
    }
    .dateFormat {
        display: none;
    }
    #Step_tab {
        list-style-type: none;
        padding: 0;
        /* 2023-04-23   zyh   lightning升级   start */
        /* height: 25px; */
        height: 30px;
        /* 2023-04-23   zyh   lightning升级   end */
        border-bottom: 5px solid #3b5998;
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        width: 30%;
        /* width: 20%; */
        /* 2023-04-23   zyh   lightning升级   end */
        float: left;
        margin: 0;
        padding: 0;
        text-align: center;
        cursor: pointer;
    }
    #Step_tab li span {
        margin: 0;
        padding: 15px 0 11px;
        color: #2daae1;
        font-size: 12px;
        font-weight: bold;
        line-height: 1;
    }
    #Step_tab li.selected {
        background: #3b5998;
    }
    #Step_tab li.selected span {
        color: #fff;
    }
    div#main {
        width: 320px;
    }
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtop div {background:#95aee5;}
    div.rtopg div {background:#DCDCDC;}
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
    div.r1 {margin: 0 5px; background:silver;}
    div.r2 {margin: 0 3px; border-width:0 2px;}
    div.r3 {margin: 0 2px;}
    div.r4 {margin: 0 1px; height: 2px;}
    hr {
        border-top: 2px dotted #f00;
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
    }
    .close {
        color: #aaaaaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
    }
    .close:hover,
    .close:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }
    .menu blockquote{
        margin: 0;
        padding: 1px;
        list-style: none;
        border-top: 1px solid #ddd;
    }
</style>
<div id="myModal" 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>
    <video playsinline="true" id="preview" style="width: 100%;z-index: 11;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>
<apex:form id="allForm">
    <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
    <apex:actionFunction name="filljsQRAction" action="{!filljsQRAction}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
        <apex:param name="firstParam" assignTo="{!ApplyId}" value="" />
        <apex:param name="secondParam" assignTo="{!CheckedId}" value="" />
    </apex:actionFunction>
    <apex:actionRegion >
        <apex:actionFunction name="deleteDetail" action="{!deleteDetail}" rerender="detail,message" oncomplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
        </apex:actionFunction>
    </apex:actionRegion>
    <!-- <apex:actionFunction name="Shippment" action="{!Shippment}" /> -->
    <apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
    <apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" >
        <apex:param name="firstParam" assignTo="{!CheckedId}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" >
        <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
    </apex:actionFunction>
    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
    <div id="main">
        <div id="hander" class="freezehander">
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                <div style="text-align: right;margin-top: 10px;">
                    <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                </div>
                <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            </apex:outputPanel>
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                            <!-- <apex:outputPanel layout="none" rendered="{!IF(Step_status='运输单', true, false)}">
                                <li onclick="javascript:Shippment();return false" class="selected"><span>运输单</span></li>
                                <li onclick="javascript:ShippmentDetail();return false"><span>明细</span></li>
                                <li onclick="javascript:ShippmentAdd();return false"><span>追加</span></li>
                            </apex:outputPanel> -->
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                                <li onclick="javascript:ShippmentAddJs();return false"><span class="tabsize">追加</span></li>
                                <li class="selected"><span>明细</span></li>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='追加', true, false)}">
                                <li class="selected"><span>追加</span></li>
                                <li onclick="javascript:ShippmentDetail();return false"><span class="tabsize">明细</span></li>
                            </apex:outputPanel>
                        </ul>
                    </th>
                </tr>
                <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}" id="slipPanel">
                    <tr>
                        <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;font-size: 15px;">新建</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">编辑:[{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
                    </tr>
                    <tr>
                        <td style="text-align: right;" class="deliveryslip">发货-运输单号 : </td>
                        <td align="left">
                            <!-- 2023-04-23   zyh   lightning升级 -->
                            <apex:inputField value="{!slip.Name}" style="width:100px;float:left" id="SlipNo"/>
                            <!-- <apex:inputField value="{!slip.Name}" style="width:120px;float:left" id="SlipNo"/> -->
                            <apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left" value="检索" rerender="dummy"/>
                            <!-- <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="扫运输单号" rerender="dummy"/> -->
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="扫运输单号" rerender="dummy" style="margin-left:0; "/>
                            <!-- 2023-04-23   zyh   lightning升级 -->
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;" id="DeliveryType"/></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;" id="DistributorMethod"/></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;" id="DeliveryCompany"/></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.label}   </td>
                        <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Combine_Pack__c.label}   </td>
                        <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Combine_Pack__c}" style="width:130px;" /></td>
                    </tr>
                    <!-- <tr>
                        <td colspan="2"><apex:inputField value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
                    </tr> -->
                </apex:outputPanel>
            </table>
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn(0)" value="扫一扫申请书" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="全选" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="追加" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
            </div>
        </div>
        <apex:outputPanel id="detail">
        <div id="detailDiv" class="detail">
            <apex:inputHidden value="{!ApplyId}" id="applyId"/>
            <apex:outputPanel layout="none" rendered="{!IF(Step_status='追加', true, false)}">
                <apex:variable var="indexloop" value="{!0}" />
                <apex:variable var="applychange" value="{!0}" />
                <apex:variable var="SetName" value="" />
                <apex:variable var="SetName2" value="" />
                <apex:repeat value="{!esdList}" var="esdInfo" id="esdList2">
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, SetName)}" />
                    <apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName2)}" />
                    <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                        <br/>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, false, true)}">
                        <hr/>
                        <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
                        <br/>
                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
                        <apex:variable var="applychange" value="{!1}" />
                        <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                        <apex:outputPanel layout="none" rendered="{!IF(applychange=1, false, true)}">
                        <hr/>
                        </apex:outputPanel>
                        <apex:variable var="applychange" value="{!0}" />
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
                        <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
                            </apex:outputPanel>
                        <!-- 2023-04-26   zyh   lightning升级   start -->
                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2> -->
                        <span style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <!-- 2023-04-26   zyh   lightning升级   end -->
                        <apex:variable var="SetName2" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <!-- 2023-04-26   zyh   lightning升级   start -->
                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
                        <br/> -->
                        <div style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</div>
                        <!-- 2023-04-26   zyh   lightning升级   end -->
                        <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
                        <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
                        </apex:outputPanel>
                        <!-- 2023-04-26   zyh   lightning升级   start -->
                        <span style="padding: 5px; font-weight: blod;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <!-- 2023-04-26   zyh   lightning升级   end -->
                    </apex:outputPanel>
                    <div class="rtop">
                        <div class="r1"></div>
                        <div class="r2"></div>
                        <div class="r3"></div>
                        <div class="r4"></div>
                    </div>
                    <div class="menu">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    </div></h2>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul>
                        <li>
                            <!-- 20210721 ljh 1719 start -->
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span> -->
                            <span>发货前-检测结果: </span>
                            <!-- 20210721 ljh 1719 end -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
                        </li>
                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
                        </li>
                        <li><span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                    </ul>
                    </div>
                    <div class="rbottom">
                        <div class="r4"></div>
                        <div class="r3"></div>
                        <div class="r2"></div>
                        <div class="r1"></div>
                    </div>
                    </apex:outputPanel>
                </apex:repeat>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                <apex:variable var="indexloop" value="{!0}" />
                <apex:variable var="SetName" value="" />
                <apex:repeat value="{!esdList}" var="esdInfo" id="esdList">
                <apex:outputPanel layout="none" rendered="{!esdInfo.isChecked || esdInfo.hasSended}">
                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                        <br/>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                        <hr/>
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3><apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3><apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
                    <div class="rtopg">
                        <div class="r1"></div>
                        <div class="r2"></div>
                        <div class="r3"></div>
                        <div class="r4"></div>
                    </div>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <div class="rtop">
                        <div class="r1"></div>
                        <div class="r2"></div>
                        <div class="r3"></div>
                        <div class="r4"></div>
                    </div>
                    </apex:outputPanel>
                    <div class="menu">
                    <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
                    <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;已发送</div>
                    </h2>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;</div>
                    </h2>
                    </apex:outputPanel>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul>
                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
                        </li>
                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
                        </li>
                        <li><span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                    </ul>
                    </div>
                    <div class="rbottom">
                        <div class="r4"></div>
                        <div class="r3"></div>
                        <div class="r2"></div>
                        <div class="r1"></div>
                    </div>
                </apex:outputPanel>
                <apex:inputCheckbox value="{!esdInfo.isChecked}" style="display: none"/>
                </apex:repeat>
            </apex:outputPanel>
        </div>
        </apex:outputPanel>
    </div>
    <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 = (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});
        scanner.addListener('scan', function (content) {
          filljsQR(content);
        });
        function qrsacn(stype) {
            scanType = stype;
            if (!standalone && !safari && ios) {
                window.location.href="sfqr://scan";
            } else {
                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);
    <apex:page Controller="EquipmentSetShippmentReceived3Controller" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true" title="备品出库入库">
        <!-- 2023-04-23   zyh   lightning升级 -->
        <head>
            <meta name="format-detection" content="telephone=no"/>
        </head>
        <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.EquipmentSetShippmentReceivedcss)}"/>
        <script type="text/javascript">
        function savejs() {
            blockme();
            save();
        }
        function deleteDetailJs(ele) {
            blockme();
            deleteDetail(j$(ele).next().val());
        }
        var scanType;
        function filljsQR(qrcode) {
            if(!qrcode)return;
            blockme();
            if(scanType == 1){
                j$("input[name$='SlipNo']").val(qrcode);
                unblockUI();
            }
            else{
                var aId = j$(escapeVfId('allPage:allForm:applyId')).val();
                aId = aId + "," + qrcode;
                var resdid = '';
                j$("input[type=checkbox]:checked").each(function() {
                    resdid += j$(this).next().val()+",";
                });
                resdid = resdid.slice(0,-1);
                filljsQRAction(aId, resdid);
            }
            j$("#scanedqr").append("<li>"+qrcode+"</li>");
            j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
        }
        function addToDetail() {
            blockme();
            var resdid = '';
            var warning = false;
            j$("input[type=checkbox]:checked").each(function() {
                resdid += j$(this).next().val()+":";
                var applyid = j$(this).next().next().val();
                if (!warning) warning = j$("[data-ngnum='"+applyid+"']").val() > 0;
            });
            resdid = resdid.slice(0,-1);
            if (warning) {
                alert("申请单内存在不符合发货状态的配套,请跟进完成配套后续操作或分割申请单!")
                unblockUI();
                return;
            }
            ShippmentDetail(resdid);
            // resetDetailDivMargintop();
        }
        function checkAllDetail() {
            j$('input[type="checkbox"]').prop("checked",true);
        }
        function ShippmentAddJs() {
            // 20230620 ljh start
            // j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
            // j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
            // j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
            // j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
            j$(escapeVfId('allPage:allForm:newHeader:SlipNo')).prop("disabled", true);
            j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).prop("disabled", true);
            j$(escapeVfId('allPage:allForm:newHeader:DistributorMethod')).prop("disabled", true);
            j$(escapeVfId('allPage:allForm:newHeader:DeliveryCompany')).prop("disabled", true);
            // 20230620 ljh end
            ShippmentAdd();
            // resetDetailDivMargintop();
        }
        function checkMessage() {
            if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
                alert("保存完了");
            }
        }
        function stopScan() {
            scanner.stop().then(function () {
                j$(".modal").hide();
            });
            j$("#scanedqr").children().remove();
        function fixDeliveryType() {
            // 20230620 ljh start
            // j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
            j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).children().each(function() {
            // 20230620 ljh end
                if (this.value == '回寄') j$(this).remove();
            })
        }
        j$(document).ready(function(){
            j$( '#qrcode' ).unbind();
            j$( '#qrcode' ).keypress( function ( e ) {
                if ( e.which == 13 ) {
                    filljsQR(j$( '#qrcode' ).val());
                    return false;
        function resetDetailDivMargintop() {
            var handerHeight = document.getElementById('hander').clientHeight;
            document.getElementById('detailDiv').style.marginTop = handerHeight + 'px';
        }
        window.onload = function hiddenName(){
            if( document.getElementById('allPage:allForm:CDS_staff_mlktp')){
                document.getElementById('allPage:allForm:CDS_staff_mlktp').style.visibility="hidden" ;
                document.getElementById('allPage:allForm:CDS_staff_mlktp').style.width="200px" ;
            }
            resetDetailDivMargintop();
        }
        </script>
        <style type="text/css">
            .hideDropdown select{
                display: none
            }
            .menu div.m_title{
                /*width: 308px;*//*20230619 ljh*/
                text-align: left;
                margin: 0;
                /* background:#95aee5; */
                background:#dcdcdc;
                /*height: 42px;*/
                padding-left: 0.75rem;/*20230721 ljh  */
            }
            .menu div.m_titleg{
                /*width: 308px;*//*20230619 ljh*/
                text-align: left;
                margin: 0;
                background:#DCDCDC;
                /*height: 42px;*/
            }
            .dateFormat {
                display: none;
            }
            #Step_tab {
                list-style-type: none;
                padding: 0;
                /* 2023-04-23   zyh   lightning升级   start */
                /* height: 25px; */
                height: 30px;
                /* 2023-04-23   zyh   lightning升级   end */
                border-bottom: 5px solid #3b5998;
            }
            #Step_tab li {
                position: relative;
                /* 20230619 ljh*/
                /* width: 20%; */
                width: 50%;
                /* 20230619 ljh*/
                float: left;
                margin: 0;
                padding: 0;
                text-align: center;
                cursor: pointer;
                /*20230620 ljh*/
                height:30px;
                line-height: 30px;
                /*20230620 ljh*/
            }
            #Step_tab li span {
                margin: 0;
                padding: 15px 0 11px;
                color: #2daae1;
                font-size: 12px;
                font-weight: bold;
                line-height: 1;
            }
            #Step_tab li.selected {
                background: #3b5998;
            }
            #Step_tab li.selected span {
                color: #fff;
            }
            /*20230620 ljh*/
            /*div#main {
                width: 320px;
            }*/
            /*20230620 ljh*/
            div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
            div.rtop div {background:#DCDCDC;}
            /* div.rtop div {background:#95aee5;} */
            div.rtopg div {background:#DCDCDC;}
            div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
            div.r1, div.r2, div.r3 {height:1px;}
            div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
            div.r1 {margin: 0 5px; background:silver;}
            div.r2 {margin: 0 3px; border-width:0 2px;}
            div.r3 {margin: 0 2px;}
            div.r4 {margin: 0 1px; height: 2px;}
            hr {
                border-top: 2px dotted #f00;
                color: #fff;
                background-color: #fff;
                height: 1px;
                /*20230620 ljh start*/
                /*width: 90%;*/
                width: 98%;
                /*20230620 ljh end*/
            }
            .close {
                color: #aaaaaa;
                float: right;
                font-size: 28px;
                font-weight: bold;
            }
            .close:hover,
            .close:focus {
                color: #000;
                text-decoration: none;
                cursor: pointer;
            }
            .menu blockquote{
                margin: 0;
                padding: 1px;
                list-style: none;
                border-top: 1px solid #ddd;
            }
            /*20230621 ljh start*/
            .lookupInput{
                display: inline-block;
                position: relative;
                width: 145px;
                padding: 0;
            }
            .lookupInput input[type="text"]{
                padding: 0;
            }
            /*20230621 ljh end*/
        </style>
        <div id="myModal" 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>
            <video playsinline="true" id="preview" style="width: 100%;z-index: 11;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>
        <apex:form id="allForm">
            <!-- 20230721 ljh resetDetailDivMargintop() -->
            <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
            <apex:actionFunction name="filljsQRAction" action="{!filljsQRAction}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
                <apex:param name="firstParam" assignTo="{!ApplyId}" value="" />
                <apex:param name="secondParam" assignTo="{!CheckedId}" value="" />
            </apex:actionFunction>
            <apex:actionRegion >
                <apex:actionFunction name="deleteDetail" action="{!deleteDetail}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
                    <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
                </apex:actionFunction>
            </apex:actionRegion>
            <!-- <apex:actionFunction name="Shippment" action="{!Shippment}" /> -->
            <!-- 20230722 ljh -->
            <apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
            <!-- 20230722 ljh -->
            <apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" >
                <apex:param name="firstParam" assignTo="{!CheckedId}" value="" />
            </apex:actionFunction>
            <apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" >
                <apex:param name="firstParam" assignTo="{!UnCheckedId}" value="" />
            </apex:actionFunction>
            <apex:inputHidden value="{!done_flg}" id="done_flg"/>
            <div id="main">
                <div id="hander" class="freezehander">
                    <apex:outputPanel id="message">
                        <apex:pageMessages />
                    </apex:outputPanel>
                    <apex:pageBlock id="newHeader">
                        <table style="border-collapse: collapse; font-size:13px;">
                            <colgroup>
                                <col width="20%" />
                                <col width="80%" />
                            </colgroup>
                            <tr>
                                <!-- 状态切换btn -->
                                <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                                    <ul id="Step_tab" style="margin:0;">
                                        <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                                            <li onclick="javascript:ShippmentAddJs();return false"><span class="tabsize">追加</span></li>
                                            <li class="selected"><span>明细</span></li>
                                        </apex:outputPanel>
                                        <apex:outputPanel layout="none" rendered="{!IF(Step_status='追加', true, false)}">
                                            <li class="selected"><span>追加</span></li>
                                            <li onclick="javascript:ShippmentDetail();return false"><span class="tabsize">明细</span></li>
                                        </apex:outputPanel>
                                    </ul>
                                </th>
                                <th width="900px;" style="padding-left:50px;" class="myBtn">
                                    <apex:commandButton styleClass="commandbutton" onclick="qrsacn(0)" value="扫一扫申请书" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
                                    <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="全选" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
                                    <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="追加" rerender="dummy" rendered="{!IF(Step_status='追加', true, false)}"/>
                                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                                        <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                                        <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                                    </apex:outputPanel>
                                </th>
                            </tr>
                        </table>
                        <table style="border-collapse: collapse; font-size:13px;" width="80%">
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}" id="slipPanel">
                                <tr>
                                    <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;font-size: 15px;">新建</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">编辑:[{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;" class="deliveryslip">发货-运输单号 : </td>
                                    <td align="left">
                                        <!-- 2023-04-23   zyh   lightning升级 -->
                                        <apex:inputField value="{!slip.Name}" style="width:145px;padding: 0;float:left" id="SlipNo"/>
                                        <!-- <apex:inputField value="{!slip.Name}" style="width:120px;float:left" id="SlipNo"/> -->
                                        <apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left;" value="检索" rerender="dummy"/>
                                        <!-- <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="扫运输单号" rerender="dummy"/> -->
                                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn(1)" value="扫运输单号" rerender="dummy" style="margin-left:5px;"/>
                                        <!-- 2023-04-23   zyh   lightning升级 -->
                                    </td>
                                    <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.label} : </td>
                                    <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;height: 30px;padding: 0;" id="DeliveryType"/></td>
                                </tr>
                                <tr>
                                    <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.label} : </td>
                                    <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;height: 30px;padding: 0;" id="DistributorMethod"/></td>
                                    <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} : </td>
                                    <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;height: 30px;padding: 0;" id="DeliveryCompany"/></td>
                                </tr>
                                <tr>
                                    <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.label}   </td>
                                    <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Wh_Staff__c}" style="width:130px;height: 30px;" /></td>
                                    <td style="text-align: right" class="deliveryslip">发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Combine_Pack__c.label}   </td>
                                    <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Combine_Pack__c}" style="width:145px;" /></td>
                                </tr>
                                <!-- <tr>
                                    <td colspan="2"><apex:inputField value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
                                </tr> -->
                            </apex:outputPanel>
                        </table>
                    </apex:pageBlock>
                    <!-- 20230620 ljh  -->
                </div>
                <apex:outputPanel id="detail">
                <div id="detailDiv" class="detail">
                    <apex:inputHidden value="{!ApplyId}" id="applyId"/>
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='追加', true, false)}">
                        <apex:variable var="indexloop" value="{!0}" />
                        <apex:variable var="applychange" value="{!0}" />
                        <apex:variable var="SetName" value="" />
                        <apex:variable var="SetName2" value="" />
                        <apex:repeat value="{!esdList}" var="esdInfo" id="esdList2">
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                            <apex:variable var="indexloop" value="{!indexloop+1}"/>
                            <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, SetName)}" />
                            <apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName2)}" />
                            <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                                <!-- <br/> -->
                                <!-- 20230623 ljh -->
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, false, true)}">
                                <hr/>
                                <!-- 20230620 ljh start -->
                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2> -->
                                <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</span>
                                <br/>
                                <!-- 20230620 ljh end -->
                                <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
                                <apex:variable var="applychange" value="{!1}" />
                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                                <apex:outputPanel layout="none" rendered="{!IF(applychange=1, false, true)}">
                                <hr/>
                                </apex:outputPanel>
                                <apex:variable var="applychange" value="{!0}" />
                                <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
                                <!-- 20230721 ljh -->
                                <apex:inputCheckbox value="{!esdInfo.isChecked}"  style="margin:0 0 0 0.75rem;"/>
                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
                                    </apex:outputPanel>
                                <!-- 2023-04-26   zyh   lightning升级   start -->
                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2> -->
                                <span style="padding: 5px;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                                <!-- 2023-04-26   zyh   lightning升级   end -->
                                <apex:variable var="SetName2" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                                <!-- 2023-04-26   zyh   lightning升级   start -->
                                <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
                                <br/> -->
                                <div style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</div>
                                <!-- 2023-04-26   zyh   lightning升级   end -->
                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/>
                                <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}">
                                <!-- 20230721 ljh -->
                                <apex:inputCheckbox value="{!esdInfo.isChecked}"  style="margin:0 0 0 0.75rem;"/>
                                <input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/>
                                </apex:outputPanel>
                                <!-- 2023-04-26   zyh   lightning升级   start -->
                                <span style="padding: 5px; font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                                <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                                <!-- 2023-04-26   zyh   lightning升级   end -->
                            </apex:outputPanel>
                            <div class="rtop">
                                <div class="r1"></div>
                                <div class="r2"></div>
                                <div class="r3"></div>
                                <div class="r4"></div>
                            </div>
                            <div class="menu">
                            <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                                <!-- 2023-08-01 zyh 机身编码换位置 start -->
                                <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                                <!-- 2023-08-01 zyh 机身编码换位置 end -->
                            </div></h2>
                            <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                            <!-- 20230721 ljh -->
                            <ul style="padding: 1px 0.75rem;" >
                                <li>
                                    <!-- 20210721 ljh 1719 start -->
                                    <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span> -->
                                    <span>发货前-检测结果: </span>
                                    <!-- 20210721 ljh 1719 end -->
                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
                                </li>
                                <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
                                </li>
                                <li><span>上次回收后检测时间: </span>
                                    <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                                </li>
                                <!-- 2023-08-01 zyh 机身编码换位置 start -->
                                <!-- <li>
                                    <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                                    <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                                </li> -->
                                <!-- 2023-08-01 zyh 机身编码换位置 end -->
                            </ul>
                            </div>
                            <div class="rbottom">
                                <div class="r4"></div>
                                <div class="r3"></div>
                                <div class="r2"></div>
                                <div class="r1"></div>
                            </div>
                            </apex:outputPanel>
                        </apex:repeat>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                        <apex:variable var="indexloop" value="{!0}" />
                        <apex:variable var="SetName" value="" />
                        <apex:repeat value="{!esdList}" var="esdInfo" id="esdList">
                        <apex:outputPanel layout="none" rendered="{!esdInfo.isChecked || esdInfo.hasSended}">
                            <apex:variable var="indexloop" value="{!indexloop+1}"/>
                            <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                            <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                                <!-- <br/> -->
                                <!-- 20230623 ljh -->
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                                <hr/>
                                <!-- 20230721 ljh -->
                                <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3><apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                                <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                                <!-- 20230721 ljh -->
                                <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3><apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}"><apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/></apex:outputPanel><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
                            <div class="rtopg">
                                <div class="r1"></div>
                                <div class="r2"></div>
                                <div class="r3"></div>
                                <div class="r4"></div>
                            </div>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                            <div class="rtop">
                                <div class="r1"></div>
                                <div class="r2"></div>
                                <div class="r3"></div>
                                <div class="r4"></div>
                            </div>
                            </apex:outputPanel>
                            <div class="menu">
                            <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
                            <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;已发送</div>
                            </h2>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                            <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                                <!-- 2023-08-01 zyh 机身编码换位置 -->
                                <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                                <!-- 2023-08-01 zyh 机身编码换位置 -->
                            </div>
                            </h2>
                            </apex:outputPanel>
                            <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                            <!-- 20230721 ljh -->
                            <ul style="padding: 1px 0.75rem;">
                                <li>
                                    <!-- 20230626 ljh  start-->
                                    <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result__c.label}: </span> -->
                                    <span>发货前-检测结果: </span>
                                    <!-- 20230626 ljh  end-->
                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result__c}" style="margin:3px;width:150px" /></span>
                                </li>
                                <li><span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_NG__c.label}: </span>
                                    <span><apex:outputField value="{!esdInfo.rec.Inspection_result_NG__c}" style="margin:3px;width:150px" /></span>
                                </li>
                                <li><span>上次回收后检测时间: </span>
                                    <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                                </li>
                                <!-- 2023-08-01 zyh 机身编码换位置 start -->
                                <!-- <li>
                                    <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                                    <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                                </li> -->
                                <!-- 2023-08-01 zyh 机身编码换位置 end -->
                            </ul>
                            </div>
                            <div class="rbottom">
                                <div class="r4"></div>
                                <div class="r3"></div>
                                <div class="r2"></div>
                                <div class="r1"></div>
                            </div>
                        </apex:outputPanel>
                        <apex:inputCheckbox value="{!esdInfo.isChecked}" style="display: none"/>
                        </apex:repeat>
                    </apex:outputPanel>
                </div>
                </apex:outputPanel>
            </div>
            <script type="text/javascript">
                var standalone = window.navigator.standalone,
                    userAgent = window.navigator.userAgent.toLowerCase(),
                    safari = /safari/.test( userAgent ),
                    ios = /iphone|ipod|ipad/.test( userAgent ),
                    // 20230619 ljh
                    // ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
                    ver = '';
                    if (ios) {
                        ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
                    }
                    // 20230619 ljh
                let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
                scanner.addListener('scan', function (content) {
                  filljsQR(content);
                });
                function qrsacn(stype) {
                    scanType = stype;
                    if (!standalone && !safari && ios) {
                        window.location.href="sfqr://scan";
                    } else {
                        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);
                        });
                    }
                }
            });
        });
    </script>
</apex:form>
</apex:page>
                function stopScan() {
                    scanner.stop().then(function () {
                        j$(".modal").hide();
                    });
                    j$("#scanedqr").children().remove();
                }
                j$(document).ready(function(){
                    j$( '#qrcode' ).unbind();
                    j$( '#qrcode' ).keypress( function ( e ) {
                        if ( e.which == 13 ) {
                            filljsQR(j$( '#qrcode' ).val());
                            return false;
                        }
                    });
                });
            </script>
        </apex:form>
        </apex:page>
force-app/main/default/pages/EquipmentSetShippmentReceived4.page
@@ -7,6 +7,7 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
<apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<script type="text/javascript">
@@ -51,12 +52,21 @@
    deleteDetail(j$(ele).next().val());
}
function changeCheckLost(ele) {
    var ele1 = j$(ele).parent().parent().find('[name$="checkboxCDS"]');
    var ele2 = j$(ele).parent().parent().find('[name$="checkboxGiveUp"]');
    var ele3 = j$(ele).parent().parent().find('select[id$="checkLost"]');
    var ele4 = j$(ele).parent().parent().find('span[id$="checkLost3"]');
    var ele5 = j$(ele).parent().parent().find('input[id$="lostMemo"]');
    var ele6 = j$(ele).parent().parent().find('input[id$="lostMemo2"]');
    // 20230722 ljh start
    // var ele1 = j$(ele).parent().parent().find('[name$="checkboxCDS"]');
    // var ele2 = j$(ele).parent().parent().find('[name$="checkboxGiveUp"]');
    // var ele3 = j$(ele).parent().parent().find('select[id$="checkLost"]');
    // var ele4 = j$(ele).parent().parent().find('span[id$="checkLost3"]');
    // var ele5 = j$(ele).parent().parent().find('input[id$="lostMemo"]');
    // var ele6 = j$(ele).parent().parent().find('input[id$="lostMemo2"]');
    var ele1 = j$(ele).parent().parent().parent().find('[name$="checkboxCDS"]');
    var ele2 = j$(ele).parent().parent().parent().find('[name$="checkboxGiveUp"]');
    var ele3 = j$(ele).parent().parent().parent().find('select[id$="checkLost"]');
    var ele4 = j$(ele).parent().parent().parent().find('span[id$="checkLost3"]');
    var ele5 = j$(ele).parent().parent().parent().find('input[id$="lostMemo"]');
    var ele6 = j$(ele).parent().parent().parent().find('input[id$="lostMemo2"]');
    // 20230722 ljh end
    var lastken = ele3.val() == '欠品' || ele4.text() == '欠品';
    ele5.prop('disabled', true);
    ele6.prop('disabled', true);
@@ -96,8 +106,11 @@
}
function changeCheckCds(ele) {
    var ele1 = j$(ele).parent().parent().find('[name$="CDSChargement"]');
    var ele2 = j$(ele).parent().parent().find('[name$="CDSType"]');
    console.log(ele);
    // var ele1 = j$(ele).parent().parent().find('[name$="CDSChargement"]');
    // var ele2 = j$(ele).parent().parent().find('[name$="CDSType"]');
    var ele1 = j$(ele).parent().parent().parent().find('[name$="CDSChargement"]');
    var ele2 = j$(ele).parent().parent().parent().find('[name$="CDSType"]');
    if (ele1 != null && ele2 != null) {
        if (j$(ele).prop("checked") == true) {
            ele1.prop('disabled', false);
@@ -242,17 +255,29 @@
    changeCheckCds(cds);
}
function ShippmentAddJs() {
    j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
    // 20230621 ljh start
    // j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:newHeader:SlipNo')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:newHeader:DistributorMethod')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:newHeader:DeliveryCompany')).prop("disabled", true);
    // 20230621 ljh end
    ShippmentAdd();
}
function ShippmentDetailJs() {
    // 20230621 ljh start
    j$(escapeVfId('allPage:allForm:SlipNo')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryType')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DistributorMethod')).prop("disabled", true);
    j$(escapeVfId('allPage:allForm:DeliveryCompany')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:newHeader:SlipNo')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:newHeader:DistributorMethod')).prop("disabled", true);
    // j$(escapeVfId('allPage:allForm:newHeader:DeliveryCompany')).prop("disabled", true);
    // 20230621 ljh end
    ShippmentDetail();
}
@@ -279,10 +304,13 @@
}
function fixDeliveryType() {
    j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
    // 20230621 ljh start
    // j$(escapeVfId('allPage:allForm:DeliveryType')).children().each(function() {
    j$(escapeVfId('allPage:allForm:newHeader:DeliveryType')).children().each(function() {
    // 20230621 ljh end
        if (this.value == '发货') j$(this).remove();
    })
    j$("input[name='noSlip']").prev().children().each(function() {
        j$(this).children().each(function() {
            if (this.value == 'OK') j$(this).remove();
@@ -297,81 +325,106 @@
    // j$("select[name$='checkLost2']").trigger('change');
    // j$("select[name$='checkLost']").trigger('change');
    // 20230722 ljh start parent() 相关 start
    // select checkLost  最初 select checkLost2  最终
    // 文本 span  checkLost3  最初 span checkLost4  最终
    j$("select[name$='checkLost2']").each(function() {
        if (j$(this).val() == '欠品' || j$(this).val() == '消耗' || j$(this).val() == '' ) {
            j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="CDSType"]').prop('disabled',true);
        }
        if (j$(this).val() == '欠品' ) {
            j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',false);
            // j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',false);
            j$(this).parent().parent().parent().find('input[id$="lostMemo2"]').prop('disabled',false);
        } else {
            j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',true);
            // j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('input[id$="lostMemo2"]').prop('disabled',true);
        }
    })
    j$("select[name$='checkLost']").each(function() {
        if (j$(this).val() == '欠品' || j$(this).val() == '消耗' || j$(this).val() == '' ) {
            j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            // j$(this).parent().parent().find('[name$="CDSType"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="checkboxCDS"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="CDSChargement"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('[name$="CDSType"]').prop('disabled',true);
        }
        if (j$(this).val() == '欠品' ) {
            j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',false);
            // j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',false);
            j$(this).parent().parent().parent().find('input[id$="lostMemo"]').prop('disabled',false);
        } else {
            j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',true);
            // j$(this).parent().parent().find('input[id$="lostMemo"]').prop('disabled',true);
            j$(this).parent().parent().parent().find('input[id$="lostMemo"]').prop('disabled',true);
        }
    })
    j$('span[id$="checkLost3"]').each(function() {
        if (j$(this).text() == '欠品') {
            j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        }
        j$(this).parent().find('[name$="lostMemo"]').prop('disabled',true)
        j$(this).parent().find('[name$="lostMemo"]').hide()
        // j$(this).parent().find('[name$="lostMemo"]').prop('disabled',true)
        // j$(this).parent().find('[name$="lostMemo"]').hide()
        j$(this).parent().parent().find('[name$="lostMemo"]').prop('disabled',true)
        j$(this).parent().parent().find('[name$="lostMemo"]').hide()
    })
    j$('select[id$="checkLost"]').each(function() {
        if (j$(this).val() == '欠品') {
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        }
    })
    j$('span[id$="checkLost"]').each(function() {
        if (j$(this).children().text() == '欠品') {
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        }
    })
    j$('span[id$="checkLost4"]').each(function() {
        if (j$(this).text() == '欠品') {
            j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',false);
            j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',false);
            // j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',false);
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        } else if (j$(this).text() != '') {
            j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',true);
            j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            // j$(this).parent().find('input[id$="lostMemo2"]').prop('disabled',true);
            // j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            j$(this).parent().parent().find('input[id$="lostMemo2"]').prop('disabled',true);
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
        }
    })
    j$('span[id$="checkLost2"]').each(function() {
        if (j$(this).children().text() == '欠品') {
            j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        } else if (j$.trim(j$(this).text()) != '') {
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            // j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            j$(this).parent().parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
        }
    })
    j$('select[id$="checkLost2"]').each(function() {
        if (j$(this).val() == '欠品') {
            j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            // j$(this).parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        } else if (j$(this).val() != '') {
            j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            // j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
            j$(this).parent().parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',true)
        }
    })
    j$('img[alt="チェック"]').each(function() {
        // j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
        j$(this).parent().parent().find('[name$="checkboxGiveUp"]').prop('disabled',false)
    })
    // 20230722 ljh start parent() 相关 end
    j$('input[id$="noitem"]').prop('disabled', true);
}
@@ -380,7 +433,8 @@
    if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
        alert("保存完了");
        if (need_redirect){
            window.location.href = window.location.href + '&done=1';
            // window.location.href = window.location.href + '&done=1';
            window.location.reload(false);
        }
    } else if (checked_raes) {
        var carray = checked_raes.split(",");
@@ -404,8 +458,6 @@
    // j$("[name$='checkLost']").each(function() {
    //  changeCheckLost(this);
    // });
}
</script>
@@ -414,14 +466,16 @@
        display: none
    }
    .menu div.m_title{
        width: 308px;
        /*width: 308px;*//*20230620 ljh */
        text-align: left;
        margin: 0;
        background:#95aee5;
        background:#DCDCDC;
        /* background:#95aee5; */
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .menu div.m_titleg{
        width: 308px;
        /*width: 308px;*/
        text-align: left;
        margin: 0;
        background:#DCDCDC;
@@ -441,15 +495,19 @@
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        /* 20230619 ljh*/
        /* width: 20%; */
        width: 30%;
        /* 2023-04-23   zyh   lightning升级   end */
        width: 50%;
        /* 20230619 ljh*/
        float: left;
        margin: 0;
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230620 ljh*/
        height:30px;
        line-height: 30px;
        /*20230620 ljh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -465,14 +523,15 @@
    #Step_tab li.selected span {
        color: #fff;
    }
    div#main {
    /*20230620 ljh start*/
    /*div#main {
        width: 320px;
    }
    }*/
    /*20230620 ljh end*/
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtopg div {background:#DCDCDC;}
    div.rtop div {background:#95aee5;}
    div.rtop div {background:#DCDCDC;}
    /* div.rtop div {background:#95aee5;} */
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
@@ -485,7 +544,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230620 ljh start*/
        /*width: 90%;*/
        width: 98%;
        /*20230620 ljh end*/
    }
    .close {
        color: #aaaaaa;
@@ -525,6 +587,23 @@
    #alertbox > div > #alertboxbody{ background:white; padding:10px; color:red; }
    #alertbox > div > #alertboxbody1{ background:white; padding:10px; color:blue; }
    #alertbox > div > #alertboxfoot{ background:white; padding:3px; text-align:right; }
    /*20230621 ljh start*/
    .lookupInput{
        display: inline-block;
        position: relative;
        width: 145px;
        padding: 0;
    }
    .lookupInput input[type="text"]{
        padding: 0;
    }
    .errorMsg{
        width: 140px;
    }
    .mytable tr{
        height: 35px;
    }
    /*20230621 ljh end*/
</style>
<div id="myModal" class="modal">
@@ -553,7 +632,7 @@
<apex:form id="allForm">
    <!-- OCM_OLY-435 追加 window.location.reload(false) 保存后刷新画面 しないと、triggerにて更新した値がVFに反映されない -->
    <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="checkMessage(true);unblockUI();resetDetailDivMargintop();resetDetailDivMargintop();" />
    <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="checkMessage(true);unblockUI();resetDetailDivMargintop();" />
    <apex:actionFunction name="filljsQRAction" action="{!filljsQRAction}" rerender="detail,message" oncomplete="unblockUI();resetDetailDivMargintop();">
        <apex:param name="firstParam" assignTo="{!ApplyId}" value="" />
        <apex:param name="secondParam" assignTo="{!CheckedId}" value="" />
@@ -565,7 +644,8 @@
    </apex:actionRegion>
    <apex:actionFunction name="saveToSlip" action="{!ShippmentDetail}"  />
    <apex:actionFunction name="ShippmentDetail" action="{!ShippmentDetail}"  />
    <apex:actionFunction name="ShippmentDetailAdd" action="{!ShippmentDetailAdd}" rerender="allForm" onComplete="unblockUI();checkMessage(false);resetDetailDivMargintop();">
    <!-- 20230722 ljh -->
    <apex:actionFunction name="ShippmentDetailAdd" action="{!ShippmentDetailAdd}" rerender="allForm" onComplete="unblockUI();checkMessage(true);resetDetailDivMargintop();">
        <apex:param name="firstParam" assignTo="{!CheckedSetId}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="ShippmentAdd" action="{!ShippmentAdd}" />
@@ -576,24 +656,18 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                <div style="text-align: right;margin-top: 10px;">
                    <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
                </div>
                <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            </apex:outputPanel>
            <!-- 2023-04-26   zyh   lightning升级   start -->
            <!-- <table style="border-collapse: collapse; font-size:13px;"> -->
            <table style="border-collapse: collapse; font-size:13px; width:340px;">
            <!-- 2023-04-26   zyh   lightning升级   end -->
                <colgroup>
                    <col width="150" />
                    <col width="170" />
        <!-- </div> -->
        <!-- 20230621 ljh start -->
            <apex:pageBlock id="newHeader">
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="20%" />
                    <col width="80%" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                    <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                        <ul id="Step_tab" style="margin:0;">
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                                <li onclick="javascript:ShippmentAddJs();return false"><span class="tabsize">回寄</span></li>
                                <li class="selected"><span class="tabsize">欠品</span></li>
@@ -606,7 +680,29 @@
                            </apex:outputPanel>
                        </ul>
                    </th>
                    <th width="900px;" style="padding-left:50px;" class="myBtn">
                        <!-- <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}">
                            <div style="text-align: right;">
                                <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
                            </div>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </apex:outputPanel> -->
                        <apex:outputPanel rendered="{!Step_status='追加' && !isSameCity}">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫申请书" rerender="dummy" />
                            <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="全选" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="保存" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
                        </apex:outputPanel>
                        <apex:outputPanel rendered="{!Step_status!='追加'}">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacnDetail()" value="扫一扫备品" rerender="dummy" />
                            <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail2();return false" value="全部OK" rerender="dummy" />
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </apex:outputPanel>
                        <input type="hidden" id="QRType" value="1"/>
                    </th>
                </tr>
            </table>
            <table style="border-collapse: collapse; font-size:13px;" width="80%" class="mytable">
                <apex:outputPanel layout="none" rendered="{!Step_status='追加' && !isSameCity }" id="slipPanel">
                    <tr>
                        <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;">新建</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">编辑:[{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
@@ -614,41 +710,31 @@
                    <apex:actionRegion >
                    <tr>
                        <td style="text-align: right">回寄-运输单号 : </td>
                        <td align="left"><apex:inputField value="{!slip.Name}" style="width:120px;float:left" id="SlipNo"/><apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left;" value="检索"/></td>
                        <td align="left">
                            <apex:inputField value="{!slip.Name}" style="width:145px;padding: 0;float:left;" id="SlipNo"/>
                            <apex:commandButton styleClass="commandbutton" onclick="blockme();searchSlip();return false;" style="float:left;" value="检索"/>
                        </td>
                        <apex:actionFunction name="searchSlip" action="{!searchSlip}" reRender="allForm" onComplete="unblockUI();fixDeliveryType();resetDetailDivMargintop();" />
                    </tr>
                    <tr>
                        <td style="text-align: right">回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;" id="DeliveryType"/></td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryType__c}" style="width:145px;height: 30px;" id="DeliveryType"/></td>
                    </tr>
                    <tr>
                        <td style="text-align: right">回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;" id="DistributorMethod"/></td>
                    </tr>
                    <tr>
                        <td align="left"><apex:inputField value="{!slip.Distributor_method__c}" style="width:145px;height: 30px;padding: 0;" id="DistributorMethod"/></td>
                        <td style="text-align: right">回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.label} : </td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;" id="DeliveryCompany"/></td>
                        <td align="left"><apex:inputField value="{!slip.DeliveryCompany__c}" style="width:145px;height: 30px;padding: 0;" id="DeliveryCompany"/></td>
                    </tr>
                    </apex:actionRegion>
                    <tr>
                        <td style="text-align: right">回寄-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.label} : </td>
                        <td align="left"><apex:inputField styleClass="hideDropdown" value="{!slip.Wh_Staff__c}" style="width:130px;" /></td>
                        <td colspan="2"></td>
                    </tr>
                </apex:outputPanel>
            </table>
            <apex:outputPanel style="float: right;" rendered="{!Step_status='追加' && !isSameCity}">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫申请书" rerender="dummy" />
                <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail();return false" value="全选" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="addToDetail();return false" value="保存" rerender="dummy" rendered="{! (!showTab2 || isEquipmentCenter)}"/>
            </apex:outputPanel>
            <apex:outputPanel style="float: right;" rendered="{!Step_status!='追加'}">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacnDetail()" value="扫一扫备品" rerender="dummy" />
                <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail2();return false" value="全部OK" rerender="dummy" />
            </apex:outputPanel>
            <input type="hidden" id="QRType" value="1"/>
            </apex:pageBlock>
        </div>
        <!-- 20230621 ljh end -->
        <apex:outputPanel id="detail">
        <div id="detailDiv" class="detail">
            <apex:inputHidden value="{!ApplyId}" id="applyId"/>
@@ -663,12 +749,17 @@
                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, SetName)}" />
                    <apex:variable var="SetName2" value="{!IF(SetName2='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName2)}" />
                    <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                        <br/>
                        <!-- <br/> -->
                        <!-- 20230623 ljh -->
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name, false, true)}">
                        <hr/>
                        <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
                        <!-- 20230620 ljh start -->
                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</span>
                        <br/>
                        <!-- 20230620 ljh end -->
                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" />
                        <apex:variable var="applychange" value="{!1}" />
                    </apex:outputPanel>
@@ -679,19 +770,32 @@
                        </apex:outputPanel>
                        <apex:variable var="applychange" value="{!0}" />
                        <apex:outputPanel layout="none" rendered="{!esdInfo.showRaesCheck && !isSameCity}">
                        <input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" /><input type="hidden" value="{!esdInfo.overtime}"/>
                            <!-- 20230722 ljh -->
                            <input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" style="margin:0 0 0 0.75rem;" />
                            <input type="hidden" value="{!esdInfo.overtime}"/>
                        </apex:outputPanel>
                        <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2>
                        <!-- 20230620 ljh start -->
                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h2> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <br/>
                        <!-- 20230620 ljh end -->
                        <apex:variable var="SetName2" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2>
                        <!-- 20230621 ljh start -->
                        <!-- <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</span>
                        <!-- 20230621 ljh end -->
                        <br/>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.showRaesCheck && !isSameCity}">
                        <input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')"/><input type="hidden" value="{!esdInfo.overtime}"/>
                        <input type="checkbox" name="raesCheck" data-resid2="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" onchange="checkDetail(this, '{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" style="margin:0 0 0 0.75rem;"/>
                        <input type="hidden" value="{!esdInfo.overtime}"/>
                        </apex:outputPanel>
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                        <!-- lightning升级start   zyh   title -->
                        <span style="padding: 5px 0.75rem; font-weight:bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                       <!--  <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <!-- lightning升级end   zyh   title -->
                    </apex:outputPanel>
                    <div class="rtop">
                        <div class="r1"></div>
@@ -704,9 +808,13 @@
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Return_DeliverySlip__c == null && esdInfo.rec.Lost_item_giveup__c == false && esdInfo.rec.Check_lost_Item_F__c != '消耗'}">
                            <input disabled="disabled" type="checkbox" data-resid="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}" name="raesdCheck" value="{!esdInfo.rec.Id}" data-lost="{!esdInfo.rec.Check_lost_Item_Final__c == '欠品' || esdInfo.rec.Check_lost_Item__c == '欠品'}" style="float: right;"/>
                        </apex:outputPanel>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                    </div></h2>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul>
                    <!-- 20230721 ljh -->
                    <ul style="padding: 1px 0.75rem;" >
                        <li><span>{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Received_Confirm__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Received_Confirm__c}" style="margin:3px;width:150px" /></span>
                        </li>
@@ -715,14 +823,23 @@
                            <span><apex:outputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Received_ng_detail__c}" style="margin:3px;width:150px" /></span>
                        </li>
                        </apex:outputPanel>
                        <li>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}: </span>
                            <apex:inputField rendered="{!NOT(esdInfo.rec.Return_DeliverySlip__c != null)}" id="noitem" value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;" onchange="checkNoItem(this, '{!esdInfo.rec.Id}')"/>
                            <span><apex:outputField rendered="{!esdInfo.rec.Return_DeliverySlip__c != null}" value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230621 ljh start-->
                            <!-- <apex:inputField rendered="{!NOT(esdInfo.rec.Return_DeliverySlip__c != null)}" id="noitem" value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;" onchange="checkNoItem(this, '{!esdInfo.rec.Id}')"/> -->
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.rec.Return_DeliverySlip__c != null)}">
                            <span><apex:inputField id="noitem" value="{!esdInfo.rec.NoItemReturn__c}"  onchange="checkNoItem(this, '{!esdInfo.rec.Id}')"/></span>
                            </apex:outputPanel>
                            <!-- 20230621 ljh end -->
                            <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Return_DeliverySlip__c != null}">
                            <span><apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/></span>
                            </apex:outputPanel>
                        </li>
                    </ul>
                    </div>
@@ -743,16 +860,19 @@
                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                        <br/>
                        <!-- <br/> -->
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                        <hr/>
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                        <!-- 20230722 ljh -->
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <div class="rtop">
@@ -772,84 +892,180 @@
                    </apex:outputPanel>
                    <div class="menu">
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;<!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/> --></div>
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />
                    &nbsp;&nbsp;<!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/> -->
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <span>
                            (<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)
                        </span>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        </div>
                    </h2>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!esdInfo.hasSended}">
                    <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;<!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/>已回收 --></div>
                    <h2><div class="m_titleg">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;<!-- <apex:commandButton styleClass="commandbutton" onclick="deleteDetailJs(this)" style="float:right;margin-top: -2px;" value="删除" rerender="dummy"/><input type="hidden" value="{!esdInfo.rec.Id}"/>已回收 -->
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <span>
                            (<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)
                        </span>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                    </div>
                    </h2>
                    </apex:outputPanel>
                    <!-- 20230620 ljh 欠品 -------------- -->
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="font-size:14px;">
                    <!-- 20230721 ljh -->
                    <ul data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="font-size:14px;padding: 1px 0.75rem;">
                        <apex:inputField value="{!esdInfo.rec.Loaner_accsessary__c}" style="display:none"/>
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), true, false)}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><apex:inputField id="checkLost" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}"><apex:outputField value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" /></apex:outputPanel>
                        <li>
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label}: </span> -->
                            <span>欠品结果(最初):</span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                                <apex:inputField id="checkLost" value="{!esdInfo.rec.Check_lost_Item__c}"  onchange="changeCheckLost(this)"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                                <apex:outputField value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" />
                            </apex:outputPanel>
                        </li>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true   )}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label} : </span>
                        <apex:outputField id="checkLost3" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px"/><br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item_Final__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" /></apex:outputPanel>
                        <!-- #################上下一对####################### -->
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true)}">
                        <li>
                            <!-- 20230623 ljh  start-->
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item__c.label}: </span> -->
                            <span>欠品结果(最初):</span>
                            <!-- 20230623 ljh  end-->
                            <apex:outputField id="checkLost3" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px"/>
                        </li>
                        <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item_Final__c.label}: </span> -->
                        <!-- <li>
                            <span>欠品结果(最终):</span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                <span><apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                <span><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" /></span>
                            </apex:outputPanel>
                        </li> -->
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, true, false)}">
                        <input type="hidden" name="noSlip" value="1"/>
                        </apex:outputPanel>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}: </span>
                        <apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo__c.label}: </span>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                        <apex:inputField id="lostMemo" value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}:</span>
                            <span><apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/></span>
                        </li> -->
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo__c.label}:</span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                                <span><apex:inputField id="lostMemo" value="{!esdInfo.rec.Lost_item_Memo__c}" style="width:75px;"/>
                                </span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || (esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK'))}">
                                <span><apex:outputField value="{!esdInfo.rec.Lost_item_Memo__c}" style="width:75px;"/></span>
                            </apex:outputPanel>
                        </li>
                        <!-- 20230722 ljh 最终一对 start -->
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true)}">
                        <li>
                            <span>欠品结果(最终):</span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                <apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                <span><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" /></span>
                            </apex:outputPanel>
                        </li>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <li>
                                <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                                <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
                                    <span><apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="width:75px;"/></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
                                    <span><apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="width:75px;"/></span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || (esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK'))}">
                        <apex:outputField value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
                            <apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
                            <apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
                            </apex:outputPanel>
                        </apex:outputPanel>
                        <br/>
                        <!-- 20230722 ljh 最终一对end-->
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.NoItemReturn__c.label}:</span>
                            <span><apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <!-- <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <li>
                                <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                                <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
                                    <span><apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="width:75px;"/></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
                                    <span><apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="width:75px;"/></span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel> -->
                        <apex:outputPanel layout="none" rendered="{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.accessible}">
                        &nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.label} : <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Lost_item_giveup__c || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
                        <br/>
                        <li>
                            <span>
                                {!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.label} :
                            </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                <span><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Lost_item_giveup__c || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                <span><apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}"/></span>
                            </apex:outputPanel>
                        </li>
                        </apex:outputPanel>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDS_complete__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, false, true)}">
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxCDS" value="{!esdInfo.rec.CDS_complete__c}" onchange="changeCheckCds(this);"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDS_complete__c}"/></apex:outputPanel>
                        </apex:outputPanel>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDS_complete__c.label} : </span>
                            <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, false, true)}">
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                    <span><apex:inputField id="checkboxCDS" value="{!esdInfo.rec.CDS_complete__c}" onchange="changeCheckCds(this);"/></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                    <span><apex:outputField value="{!esdInfo.rec.CDS_complete__c}"/></span>
                                </apex:outputPanel>
                            </apex:outputPanel>
                        </li>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Return_DeliverySlip__c=null, false, esdInfo.rec.Is_Body__c)}">
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSChargement__c.label} : </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSChargement" value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSType__c.label} : </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSType" value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
                            <li>
                                <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSChargement__c.label} : </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                    <span><apex:inputField id="CDSChargement" value="{!esdInfo.rec.CDSChargement__c}"/></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                    <span><apex:outputField value="{!esdInfo.rec.CDSChargement__c}"/></span>
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.CDSType__c.label} : </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}">
                                    <span><apex:inputField id="CDSType" value="{!esdInfo.rec.CDSType__c}"/></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}">
                                    <span><apex:outputField value="{!esdInfo.rec.CDSType__c}"/>
                                </span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                        <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span>
                                <apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>
                            </span>
                        </li> -->
                        <!-- 2023-08-01 zyh 机身编码换位置 -->
                    </ul>
                    </div>
                    <div class="rbottom">
                    <!-- <div class="rbottom">
                        <div class="r4"></div>
                        <div class="r3"></div>
                        <div class="r2"></div>
                        <div class="r1"></div>
                    </div>
                    </div> -->
                </apex:outputPanel>
                <apex:inputCheckbox Id="bbbaaa" value="{!esdInfo.isChecked}" style="display: none"/>
                </apex:repeat>
force-app/main/default/pages/EquipmentSetShippmentReceived5.page
@@ -7,6 +7,7 @@
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
<apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<script type="text/javascript">
@@ -63,6 +64,54 @@
        })
    }
}
var standalone = window.navigator.standalone,
    userAgent = window.navigator.userAgent.toLowerCase(),
    safari = /safari/.test( userAgent ),
    ios = /iphone|ipod|ipad/.test( userAgent ),
    // ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
    ver = '';
    if(ios) {
        ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
    }
function OpenRentalApplyFault(faultReportFlag, radetailId, radetailName, personId, personName, purpose2, name, hospitalName, serialNumber, fixtureNo, workPlace, deptCategory){
    console.log(!standalone && !safari && ios);
    if (!standalone && !safari && ios) {
        if(faultReportFlag == '不存在故障报告单'){
        window.open("/a5C/e?Name=*" + "&CF00N10000009I5UX_lKid=" + radetailId + "&CF00N10000009I5UX=" + radetailName + "&CF00N10000009I5UV_lKid=" + personId + "&CF00N10000009I5UV=" + personName + "&00N10000009I5Uh=" + purpose2 + "&00N10000009I5UW=" + name + "&00N10000009I6jv=" + hospitalName + "&00N10000009I5Ua=" + serialNumber + "&00N10000009I5UP=" + fixtureNo + "&00N10000009I5Uf=" + workPlace + "&00N10000009I5UU=" + deptCategory);
        }else{
            if(confirm('已存在检测分析报告')){
                window.open("/" + faultReportFlag);
            }
        }
    }else{
        if(faultReportFlag == '不存在故障报告单'){
            // window.open("/a5C/e?Name=*" + "&CF00N10000009I5UX_lKid=" + radetailId + "&CF00N10000009I5UX=" + radetailName + "&CF00N10000009I5UV_lKid=" + personId + "&CF00N10000009I5UV=" + personName + "&00N10000009I5Uh=" + purpose2 + "&00N10000009I5UW=" + name + "&00N10000009I6jv=" + hospitalName + "&00N10000009I5Ua=" + serialNumber + "&00N10000009I5UP=" + fixtureNo + "&00N10000009I5Uf=" + workPlace + "&00N10000009I5UU=" + deptCategory);
            //window.open("/a5F/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&00N9D000007yNXu=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
            var url = '/lightning/o/Rental_Apply_Fault__c/new?defaultFieldValues=Name=*,Rental_Apply_Equipment_Set_Detail__c='+radetailId+',Person_In_Charge_User__c='+personId
            +',demo_purpose2__c='+purpose2
            +',RentalApplyNo__c='+name
            +',HospitalText__c='+hospitalName
            +',Repair_product_body_number__c='+serialNumber
            +',Fixture_Model_No__c='+fixtureNo
            +',WorkPlace__c='+workPlace
            +',OCM_dept_category__c='+deptCategory;
            // console.log(url);
            window.open(url);
        }else{
            // if(confirm('是否打开或创建新的检测分析报告?')){
            //     if (faultReportFlag == '存在故障报告单'){
            //         window.open("/a5C/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name +  + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory);
            //     }else{
            //         window.open("/" + faultReportFlag);
            //     }
            // }
            if(confirm('已存在检测分析报告')){
                window.open("/" + faultReportFlag);
            }
        }
    }
}
function filljs1() {
   j$("select[name$='inspectionResult']").val("OK");
   j$("select[name$='inspectionResultNg']").prop("selectedIndex", 0);
@@ -96,6 +145,26 @@
function resetDetailDivMargintop() {
    var handerHeight = document.getElementById('hander').clientHeight;
    document.getElementById('detailDiv').style.marginTop = handerHeight + 'px';
    // 20230624 ljh start
    j$("select[name$='inspectionResult']").each(function() {
        j$(this).height('30px');
    })
    j$("select[name$='inspectionResultNg']").each(function() {
        j$(this).height('30px');
    })
    j$("select[name$='inspectionResultNg3']").each(function() {
        j$(this).height('30px');
    })
    j$("select[name$='inspectionResult2']").each(function() {
        j$(this).height('30px');
    })
    j$("select[name$='inspectionResultNg2']").each(function() {
        j$(this).height('30px');
    })
    j$("select[name$='inspectionResultNg4']").each(function() {
        j$(this).height('30px');
    })
    // 20230624 ljh end
}
window.onload = function hiddenName(){
@@ -114,11 +183,13 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /*width: 308px;*/
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        /* background:#95aee5; */
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .dateFormat {
        display: none;
@@ -126,23 +197,23 @@
    #Step_tab {
        list-style-type: none;
        padding: 0;
        /* 2023-04-23   zyh   lightning升级   start */
        /* height: 25px; */
        height: 30px;
        /* 2023-04-23   zyh   lightning升级   end */
        border-bottom: 5px solid #3b5998;
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        /* width: 24%; */
        width: 30%;
        /* 2023-04-23   zyh   lightning升级   end */
        width: 50%;
        float: left;
        margin: 0;
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230619 ljh*/
        height:30px;
        line-height: 30px;
        /*20230619 ljh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -159,12 +230,12 @@
        color: #fff;
    }
    
    div#main {
    /*div#main {
        width: 320px;
    }
    }*/
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtop div {background:#DCDCDC;}
    div.rtop div {background:#DCDCDC;/*background:#95aee5;*/}
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
@@ -177,7 +248,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230619 ljh start*/
        /*width: 90%;*/
        width: 98%;
        /*20230619 ljh end*/
    }
    .close {
        color: #aaaaaa;
@@ -224,38 +298,37 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                        <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='回收后检测', true, false)}">
                                <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">回收后检测</span></li>
                                <li onclick="javascript:Shippment2();"><span class="tabsize">上架</span></li>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货', true, false)}">
                                <li onclick="javascript:Shippment1();"><span class="tabsize">回收后检测</span></li>
                                <li onclick="javascript:Shippment2();" class="selected"><span class="tabsize">上架</span></li>
                            </apex:outputPanel>
                        </apex:outputPanel>
                        </ul>
                    </th>
                </tr>
            </table>
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
            </div>
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab"  style="margin:0;">
                                <apex:outputPanel layout="none" rendered="{!IF(SR_status='Shippment', true, false)}">
                                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='回收后检测', true, false)}">
                                        <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">回收后检测</span></li>
                                        <li onclick="javascript:Shippment2();"><span class="tabsize">上架</span></li>
                                    </apex:outputPanel>
                                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='发货', true, false)}">
                                        <li onclick="javascript:Shippment1();"><span class="tabsize">回收后检测</span></li>
                                        <li onclick="javascript:Shippment2();" class="selected"><span class="tabsize">上架</span></li>
                                    </apex:outputPanel>
                                </apex:outputPanel>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='回收后检测', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -266,16 +339,18 @@
                <apex:variable var="indexloop" value="{!indexloop+1}"/>
                <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                    <br/>
                    <!-- <br/> -->
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                    <hr/>
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <!-- 20230722 ljh     -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                <!-- 20230722 ljh     -->
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                </apex:outputPanel>
                <div class="rtop">
                    <div class="r1"></div>
@@ -285,55 +360,72 @@
                </div>
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-01 zyh 机身编号换地方 -->
                    <span>(<apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" >{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink>)</span>
                    <!-- 2023-08-01 zyh 机身编号换地方 -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <ul>
                <!-- 20230722 ljh -->
                <ul style="padding: 1px 0.75rem;" >
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='回收后检测', true, false)}">
                        <!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Check_lost_Item_F__c.label}: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Check_lost_Item_F__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230722 ljh width:75px; -->
                            <apex:outputField value="{!esdInfo.rec.Check_lost_Item_F__c}" style="margin:3px;"/></span>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Lost_item_giveup__c.label}: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230722 ljh width:75px; -->
                            <apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}" style="margin:3px;"/></span>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
                            <span>检测结果: </span><span>
                            <!-- 20230722 ljh -->
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" />
                            </span>
                            <!-- <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> -->
                            <apex:commandButton styleClass="commandbutton" style="margin-left: 20px;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/>
                            </span>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
                            <span>检测NG区分: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230722 ljh width:75px; -->
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;"/></span>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
                            <span>最终检测结果: </span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c='维修')}">
                            <apex:inputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" />
                            <!-- 20230722 ljh width:75px; -->
                            <apex:inputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 2);" />
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" /></span>
                            <!-- 20230722 ljh width:75px; -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;" /></span>
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
                            <span>最终NG区分: </span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable,esdInfo.rec.Inspection_result_after_NG__c='维修')}"><span>
                            <apex:inputField id="inspectionResultNg2" value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" /></span>
                            <!-- 20230722 ljh width:75px; -->
                            <apex:inputField id="inspectionResultNg2" value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 2);" /></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" /></span>
                            <!-- 20230722 ljh width:75px; -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;" /></span>
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', '', 'display: none;')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable,esdInfo.rec.Inspection_result_after_NG__c='维修')}">
                            <span>
                                <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" />
                                <!-- 20230722 ljh -->
                                <!-- <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /> -->
                                <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" />
                            </span>
                            <script>
                                disabledShowNg4();
@@ -346,34 +438,44 @@
                            </script>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
                            </apex:outputPanel>
                            <!-- 20230722 ljh -->
                            <!-- <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span> -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}"  /></span>
                        </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
                            <span>检测结果: </span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
                            <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" />
                                <!-- 20230722 ljh width:75px; -->
                                <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 1)" />
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /></span>
                                <!-- 20230722 ljh     -->
                                <!-- <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> -->
                                <output>{!esdInfo.rec.Inspection_result_after__c}</output>
                            </apex:outputPanel>
                            <apex:commandButton styleClass="commandbutton" style="margin-left: 20px;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="故障报告" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}">
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
                            <span>检测NG区分: </span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}"><span>
                            <apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /></span>
                            <!-- 20230722 ljh width:75px; -->
                            <apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 1)" /></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;width:75px;" /></span>
                            <!-- 20230722 ljh width:75px; -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG__c}" style="margin:3px;" /></span>
                            </apex:outputPanel>
                        </li>
                        <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='维修', 'display: none;', '')}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
                            <apex:outputPanel layout="none" rendered="{!AND(esdInfo.editable, esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
                            <span>
                                <apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;"/>
                                <!-- 20230722 ljh -->
                                <!-- <apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;"/> -->
                                <apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" />
                            </span>
                            <script>
                                disabledShowNg3();
@@ -386,22 +488,33 @@
                            </script>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='维修')}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
                            </apex:outputPanel>
                            <!-- 20230722 ljh -->
                            <!-- <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span> -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" /></span>
                        </apex:outputPanel>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_Comment__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
                            <apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
                            <!-- 20230722 ljh -->
                            <!-- <apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span> -->
                            <apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" /></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
                            </apex:outputPanel>
                            <!-- 20230722 ljh -->
                            <!-- <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span> -->
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}"/></span>
                        </apex:outputPanel>
                        </li>
                        <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <!-- <li> -->
                            <!-- 2023-08-01 zyh 机身编号换地方 -->
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span> -->
                            <!-- <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span> -->
                            <!-- 20230722 ljh -->
                            <!-- <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" style="margin:3px;width:140px;float: left;text-align:left;margin-left:3px;margin-top:0px;">{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span> -->
                            <!-- <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" >{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span> -->
                            <!-- 2023-08-01 zyh 机身编号换地方 -->
                        <!-- </li> -->
                        <!-- </div> -->
                        <script>
@@ -449,7 +562,11 @@
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            // ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            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});
        scanner.addListener('scan', function (content) {
          filljsQR(content);
force-app/main/default/pages/EquipmentSetShippmentReceived6.page
@@ -123,11 +123,15 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /*width: 308px;*/
        text-align: left;
        margin: 0;
        /*20230623 ljh start*/
        background:#DCDCDC;
        /* background:#95aee5; */
        /*20230623 ljh end*/
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .dateFormat {
        display: none;
@@ -143,15 +147,19 @@
    }
    #Step_tab li {
        position: relative;
        /* 2023-04-23   zyh   lightning升级   start */
        /* 20230619 ljh*/
        /* width: 20%; */
        width: 30%;
        /* 2023-04-23   zyh   lightning升级   end */
        width: 50%;
        /* 20230619 ljh*/
        float: left;
        margin: 0;
        padding: 0;
        text-align: center;
        cursor: pointer;
        /*20230619 ljh*/
        height:30px;
        line-height: 30px;
        /*20230619 ljh*/
    }
    #Step_tab li span {
        margin: 0;
@@ -168,12 +176,17 @@
        color: #fff;
    }
    
    div#main {
    /*div#main {
        width: 320px;
    }
    }*/
    div.rtop, div.rbottom {display:block; background: transparent; font-size:1px;}
    div.rtop div {background:#DCDCDC;}
    div.rtop div {
        /*20230623 ljh start*/
        background:#DCDCDC;
        /* background:#95aee5; */
        /*20230623 ljh end*/
    }
    div.r1, div.r2, div.r3, div.r4 {display:block; overflow:hidden;}
    div.r1, div.r2, div.r3 {height:1px;}
    div.r2, div.r3, div.r4 {border-left:1px solid silver; border-right:1px solid silver;}
@@ -186,7 +199,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230619 ljh start*/
        /*width: 90%;*/
        width: 98%;
        /*20230619 ljh end*/
    }
    .close {
        color: #aaaaaa;
@@ -246,33 +262,29 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <!-- 2023-04-26   zyh   lightning升级   start -->
                        <!-- <ul id="Step_tab"> -->
                        <ul id="Step_tab" style="margin-left:0px;">
                        <!-- 2023-04-26   zyh   lightning升级   end -->
                            <li class="selected"><span class="tabsize">上架</span></li>
                        </ul>
                    </th>
                </tr>
            </table>
            <div style="font-size: 14px;">缺少一对一回库:<apex:inputCheckbox value="{!forceSave}" /></div>
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
            </div>
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab" style="margin:0;">
                                <li class="selected"><span class="tabsize">上架</span></li>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </th>
                    </tr>
                </table>
                <div style="font-size: 14px;">缺少一对一回库:<apex:inputCheckbox value="{!forceSave}" /></div>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -318,19 +330,23 @@
                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
                    <apex:variable var="SetName" value="{!IF(SetName='', esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, SetName)}" />
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id && indexloop != 1, true, false)}">
                        <br/>
                        <!-- <br/> -->
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}">
                        <hr/>
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                        <!-- 20230722 ljh -->
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}" style="margin-bottom: 5px;" />
                        <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Id}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                            <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3>
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                        </apex:outputPanel>
                        <!-- 20230722 ljh -->
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</h3> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Name}:{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name}</span>
                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.Rental_Apply_Equipment_Set__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}" style="margin-bottom: 5px;"/>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(esdInfo.errorInfo=null, false, true)}">
                        <div>
                        <span style="color:red;font-weight: bold;">异常: </span><span style="color:red;font-weight: bold;">{!esdInfo.errorInfo}</span>
@@ -344,28 +360,31 @@
                    </div>
                    <div class="menu">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp;<apex:outputPanel layout="none" rendered="{!esdInfo.rec.Fixture_Set_Detail__r.Is_OneToOne__c && !esdInfo.rec.Substitute_flag__c}">(一对一附属品)</apex:outputPanel>
                        <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/>)</span>
                    </div></h2>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul>
                    <!-- 20230722 ljh -->
                    <ul style="padding: 1px 0.75rem;" >
                        <!-- <div style="position: relative; padding-left: 50px; background:{!IF(esdInfo.quickCheck, '#BBFF66', '')}"> -->
                        <li>
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}: </span> -->
                            <span>检测结果: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_F__c}" style="margin:3px;width:75px;"/></span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_F__c}" style="margin:3px;"/></span>
                        </li>
                        <li>
                            <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}: </span> -->
                            <span>检测NG区分: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_F__c}" style="margin:3px;width:75px;"/></span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_F__c}" style="margin:3px;"/></span>
                        </li>
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.OneToOne_Flag__c.label}: </span><span>
                            <apex:outputField value="{!esdInfo.rec.OneToOne_Flag__c}" style="margin:3px;width:75px;"/></span>
                            <apex:outputField value="{!esdInfo.rec.OneToOne_Flag__c}" style="margin:3px;"/></span>
                        </li> -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Arrival_in_wh__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                            <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;width:75px;" />
                            <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;" />
                            <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt_F__c > 0 && esdInfo.rec.Fixture_Set_Detail__r.Is_OneToOne__c && !esdInfo.rec.Substitute_flag__c}">
                                <input type="hidden" name="onetoone" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                            </apex:outputPanel>
@@ -375,25 +394,24 @@
                            </apex:outputPanel>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                            <span><apex:outputField value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;width:75px;"/></span>
                            <span><apex:outputField value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;"/></span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt_F__c > 0 && esdInfo.rec.Is_Body__c}">
                                <apex:variable var="main_loc" value="{!esdInfo.rec.Asset__r.WH_location__c}" />
                            </apex:outputPanel>
                            </apex:outputPanel>
                        </li>
                        <!-- SFDC-C63DFK 上架时镜箱/周转箱不符的标记   thh 2021-09-07 start -->
                        <!-- SFDC-C63DFK 上架时镜箱/周转箱不符的标记   thh 2021-09-07 start -->
                        <apex:outputPanel layout="none" rendered="{!esdInfo.isShow}">
                            <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}">
                                <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.BoxInconsistent__c.label}: </span>
                                <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                                    <apex:inputField id="inconsistent" value="{!esdInfo.rec.BoxInconsistent__c}" style="margin:3px;width:75px;" />
                                </apex:outputPanel>
                                    <span><apex:inputField id="inconsistent" value="{!esdInfo.rec.BoxInconsistent__c}" style="margin:3px;" /></span></apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                                    <span><apex:outputField value="{!esdInfo.rec.BoxInconsistent__c}" style="margin:3px;width:75px;" /></span>
                                    <span><apex:outputField value="{!esdInfo.rec.BoxInconsistent__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <!-- SFDC-C63DFK 上架时镜箱/周转箱不符的标记   thh 2021-09-07 end -->
                        <!-- SFDC-C63DFK 上架时镜箱/周转箱不符的标记   thh 2021-09-07 end -->
                        <!-- <apex:outputPanel layout="none" rendered="{!esdInfo.discardFlg}">
                        <li>
@@ -408,16 +426,15 @@
                                <span><span>废弃区</span></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable && NOT(esdInfo.discardFlg)}">
                                <apex:inputField id="WHlocation" value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;width:75px;" onchange="changeloc(this)"/>
                            </apex:outputPanel>
                                <span><apex:inputField id="WHlocation" value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;" onchange="changeloc(this)"/></span></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) && NOT(esdInfo.discardFlg)}">
                                <span><apex:outputField value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;width:75px;"/></span>
                                <span><apex:outputField value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;"/></span>
                            </apex:outputPanel>
                        </li>
                        <li>
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/></span>
                        </li> -->
                        <!-- </apex:outputPanel> -->
                        <!-- </div> -->
                    </ul>
@@ -439,7 +456,14 @@
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            // 20230619 ljh
            // ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            ver = '';
            if (ios) {
                ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            }
            // 20230619 ljh
        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
        function filljsQR(content) {
force-app/main/default/pages/FixtureSetManage.page
@@ -9,6 +9,7 @@
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->  
<!-- 20230426 zq add style -->
<style>
@@ -19,6 +20,17 @@
    body input[type="submit"], body input.btn{
        padding: 0 10px;
    }
    table.list .col_SortInt_F__c {width:100px;}
    table.list .col_Name_CHN__c {width:100px;}
    table.list .col_Fixture_Model_No_F__c {width:150px;}
    table.list .col_Is_Body__c {width:100px;}
    table.list .col_Is_Optional__c {width:100px;}
    table.list .col_Quantity__c {width:100px;}
    table.list .col_Is_OneToOne__c {width:100px;}
    table.list .col_Is_Special_Product__c {width:100px;}
    table.list .col_Fixture_Set_New__c {width:100px;}
    table.list .col_Fixture_Set_New_Quantity__c {width:100px;}
    table.list .col_Scroll {width:100px;}
</style>
<script type="text/javascript">
force-app/main/default/pages/Lost_Return_DeliverySlip.page
@@ -97,7 +97,6 @@
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Name.Label}"/>
                <apex:outputPanel >
                    <!-- 修改款到 290 改为181 -->
                    <apex:inputField style="min-width: 181px;" value="{!slip.Name}" id="SlipNo"/>
                    <apex:commandButton value="扫运输单" onclick="qrscan(1);return false;" disabled="{!readOnly}"/>
                    <apex:commandButton value="检索" onclick="blockme();searchSlip(); return false;" disabled="{!readOnly}" oncomplete="checEventFrame();"/>
force-app/main/default/pages/MainFixtureSelect.page
@@ -33,7 +33,7 @@
        right: 0;
        left: 0;
        margin: 0;
        z-index: 9999;
        z-index: 2;
        display: inline-block;
        background-color: white;
        border-radius: 0.25rem;/*20230607 ljh lightning*/
@@ -68,6 +68,10 @@
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 20230628 ljh */
    .menu ul li:first-child{
        padding-left: 0.75rem;
    }
</style>
@@ -503,6 +507,7 @@
                        </td>
                        <td style="width:50%">
                            <div style="text-align: center;">
                                <input type="hidden" name="hidden" /> <!-- 20230706 ljh 为了按钮对齐 -->
                                <apex:commandButton action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();" />
                                <apex:commandButton style="margin-left:20px;" onclick="clickunassign(); return false;" value="取消分配" rerender="allForm,checEventFrame"/>
                                <apex:commandButton style="margin-left:20px;" value="取消" onclick="clickCancel(); return false;"/>
force-app/main/default/pages/MainFixtureSelect.page.bak
New file
@@ -0,0 +1,695 @@
<!-- 20230529 ljh lightning -->
<!-- <apex:page controller="MainFixtureSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> -->
<apex:page controller="MainFixtureSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<head>
<title>主体备品选择</title>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<style type="text/css">
    .hideDropdown select{
        display: none
    }
    /*以下是下拉复选框的样式  start*/
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .nav {
        width: 170px;/*20230606 ljh*/
        line-height: 30px;/*20230606 ljh*/
        /* border: 1px solid #000; *//*20230610 ljh lightning*/
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        position: absolute;
        top: -15px;/*20230606 ljh*/
        right: 0;
        left: 0;
        margin: 0;
        z-index: 9999;
        display: inline-block;
        background-color: white;
        border-radius: 0.25rem;/*20230607 ljh lightning*/
        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
    }
    ul,
    li {
        list-style: none;
    }
    .nav li input {
        margin: 0px 3px 0px 3px;
    }
    .nav li p:hover {
        background: #1e90ff;
        color: #fff;
    }
    .nav_a li input {
        margin: 0px 3px 0px 3px;
    }
    .nav_a li p:hover {
        background: #1e90ff;
        color: #fff;
    }
    #classification {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #classification_a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
function clickCancel(){
    if (confirm('是否操作取消?')) {
        blockme();
        cancel();
    }
}
function clickunassign(){
    if (confirm('是否操作取消分配?')) {
        blockme();
        unassign();
    }
}
//下拉多选框  strat
j$(document).bind("click",function(e){
    var e = e || window.event;    //事件对象,兼容IE
    var target = e.target || e.srcElement;  //源对象,兼容火狐和IE
    while(target){
        // console.log(target.id);
        if (target.id && (target.id == "nav" ||target.id == "nav_a")){
         //循环判断至根节点,防止点击的是#selected和它的子元素
            return;
        }
       target = target.parentNode;
    }
    j$("#selectCheckId").hide();   //点击的不是#selected和它的子元素,隐藏下拉菜单
    j$("#selectCheckId_a").hide();
})
//选择备品存放地 下拉框值有变动以后触发
function reloadBenBu(Obj){
    var selectId = Obj.value;
    //如果备品存放地选择无
    // console.log('00:'+selectId);
    //消除选择的其他选项
    if(j$("#classification").children().text() != "--无--"){
        j$("#classification").children().remove();
        j$("#classification").append("<span class='valClass_CF' id='initial'>--无--</span>");
    }
    var inputObj = j$(".li-input");
    if(inputObj != null){
        for(var i = 0; i < inputObj.length;i++){
            if(inputObj[i].checked){
                inputObj[i].checked = false;
            }
        }
    }
    j$("#selectCheckId").show();
    // j$("#selectCheckId_a").hide();
}
//点击 本部选择
function selectBenBu(obj,name){
    var checked1 = j$(obj).prop("checked");
    if (checked1 == true) {
        j$("#classification").children("#initial").remove();
        var idTemp = j$(obj).value().trim();
        idTemp = 'Id'+idTemp.split('.')[0];
        j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
            .value().trim() + ",") + "</span>");
    } else {
        var idTemp = 'Id'+name.split('.')[0];
        j$("#classification").children("#" + (idTemp)).remove();
        var length = j$("#classification").html().length;
        if (length === 0) {
            j$("#classification").append("<span class='valClass' id='initial'>--无--</span>");
        }
    }
    var optioncheck = j$(".valClass");
    var hint = '';
    for(var i = 0;i<optioncheck.length;i++){
        if(optioncheck[i].innerText != '--无--'){
            hint +=optioncheck[i].innerText;
        }
    }
    console.log(hint);
    // j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyBB:bieBenBu')).val(hint);
    j$(escapeVfId('allPage:allForm:searchBlock:bieBenBu')).val(hint);
}
function navClose(){
    j$("#selectCheckId").toggle();
}
// 备品分类点击选择
function selectAgency(obj,name){
    var checked1 = j$(obj).prop("checked");
    if (checked1 == true) {
        j$("#classification_a").children("#initial_a").remove();
        var idTemp = j$(obj).value().trim();
        idTemp = 'Id'+idTemp.split('.')[0];
        j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (j$(obj)
            .value().trim() + ",") + "</span>");
    } else {
        var idTemp = 'Id'+name.split('.')[0];
        j$("#classification_a").children("#" + (idTemp)).remove();
        var length = j$("#classification_a").html().length;
        if (length === 0) {
            j$("#classification_a").append("<span class='valClass_a' id='initial_a'>--无--</span>");
        }
    }
    var optioncheck = j$(".valClass_a");
    var hint = '';
    for(var i = 0;i<optioncheck.length;i++){
        if(optioncheck[i].innerText != '--无--' ){
            hint +=optioncheck[i].innerText;
        }
    }
    // j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyAA:bieBeiPinFenLei')).val(hint);
    j$(escapeVfId('allPage:allForm:searchBlock:bieBeiPinFenLei')).val(hint);
}
function navClose_a(){
    j$("#selectCheckId_a").toggle();
}
function searchJs() {
    blockme();
    searchfunc();
}
function checkEventJs(obj){
    blockme();
    j$(escapeVfId('allPage:allForm:checkEventId')).val(obj);
    checkEvent();
}
</script>
</head>
    <apex:form id="allForm">
        <apex:inputHidden id="changeCampaignType" value="{!changeCampaignType}"/>
        <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!saveType}" value="" />
        </apex:actionFunction>
        <apex:actionFunction name="saveAndSort" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!saveType}" value="" />
            <apex:param name="secondParam" assignTo="{!sortKey}" value="" />
        </apex:actionFunction>
        <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction action="{!cancel}" name="cancel" rerender="allForm,checEventFrame" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!unassign}" name="unassign" rerender="allForm,checEventFrame" oncomplete="unblockUI();"/>
        <apex:actionFunction name="changebenbu" rerender="S_bieBenBuApply" oncomplete="unblockUI();"/>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockSection title="主体备品选择" id="mainSection">
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Name}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Demo_purpose1__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Owner.Name}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.demo_purpose2__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Salesdept__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Product_category__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.WorkPlace__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Equipment_Type_F__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Internal_asset_location_F__c}"/>
                    <apex:outputField value="{!parentObj.Irreplaceable_flag__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Request_shipping_day__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Apply__r.Request_return_day__c}"/>
                    <apex:outputField value="{!parentObj.Fixture_Set__r.Fixture_Set_Body_Model_No__c}"/>
                    <apex:outputField value="{!parentObj.Rental_End_Date__c}"/>
                    <apex:outputField value="{!parentObj.Fu_Shu_Pin_Fen_Pei_Jia__c}"/>
                    <apex:outputField value="{!parentObj.Rental_Start_Date__c}"/>
                    <!-- 20230605 ljh lightning start -->
                    <!-- <apex:pageBlockSectionItem >
                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="备品存放地" />
                        <apex:selectList value="{!bieCunFangDi}" onchange="blockme(); changebenbu(); reloadBenBu(this);return false" size="1" style="margin-left: 0px; width:110px" id="bieCunFangDi">
                            <apex:selectOptions value="{!bieCunFangDiOps}"/>
                        </apex:selectList>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="产品分类(GI/SP)" />
                            <apex:selectList value="{!bieChanPinFenLei}" size="1" style="margin-left: 0px; width:60px" id="bieChanPinFenLei">
                                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
                            </apex:selectList>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem id="ApplyBB">
                        <apex:outputLabel for="S_bieBenBuApply" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="本部" />
                        <apex:outputPanel style="position: relative; " id="S_bieBenBuApply">
                            <apex:inputHidden id="bieBenBu" value="{!bieBenBu}" />
                            <ul class="nav" id="nav" style="left:0px;">
                                <li id="classification" class="transparent_class" style="margin-left:0px;height:20px;" onclick="navClose();return false;">
                                    <span id="initial">--无--</span>
                                </li>
                                <li id="selectCheckId" style="margin-left:0px;display: none;">
                                    <ul style="background-color: #FFFFFF;">
                                        <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSD">
                                            <li class="sdclass" style="margin-left:0px">
                                                <p class="ul-nav" name="cate_id[]" >
                                                    <input type="checkbox" value="{!orr.label}" class="li-input" onclick="selectBenBu(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
                                                    <font style="">{!orr.label}</font>
                                                </p>
                                            </li>
                                        </apex:repeat>
                                    </ul>
                                </li>
                            </ul>
                            <div class="nav_close"></div>
                            <script>
                                initShowBenbu();
                                function initShowBenbu() {
                                    var bieBenBuTemp = '{!bieBenBu}';
                                    if (bieBenBuTemp != null && bieBenBuTemp != undefined && bieBenBuTemp != "") {
                                        j$("#classification").children("#initial").remove();
                                        var bieBenBuList = bieBenBuTemp.split(',');
                                        for(var i=0; i< bieBenBuList.length; i++) {
                                            var idTemp = bieBenBuList[i].trim();
                                            idTemp = 'Id'+idTemp.split('.')[0];
                                            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (bieBenBuList[i].trim() + ",") + "</span>");
                                        }
                                        var inputObj = j$(".li-input");
                                        if(inputObj != null){
                                            for(var i = 0; i < inputObj.length;i++){
                                                if(bieBenBuTemp.includes(inputObj[i].value)){
                                                    inputObj[i].checked = true;
                                                }
                                            }
                                        }
                                    }
                                }
                            </script>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem id="ApplyAA" >
                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="备品分类" />
                        <apex:outputPanel style="position: relative;" id="S_AgencyApply">
                            <apex:inputHidden id="bieBeiPinFenLei" value="{!bieBeiPinFenLei}" />
                            <ul class="nav" id="nav_a" style="left:0px;">
                                <li id="classification_a" class="transparent_class" style="margin-left:0px;height:20px;" onclick="navClose_a();return false;">
                                    <span id="initial_a">--无--</span>
                                </li>
                                <li id="selectCheckId_a" style="margin-left:0px;display: none;">
                                    <ul style="background-color: #FFFFFF;">
                                        <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selSD">
                                            <li class="sdclass" style="margin-left:0px">
                                                <p class="ul-nav" name="cate_id[]" >
                                                    <input type="checkbox" value="{!orr.label}" class="li-input_a" onclick="selectAgency(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
                                                    <font style="">{!orr.label}</font>
                                                </p>
                                            </li>
                                        </apex:repeat>
                                    </ul>
                                </li>
                            </ul>
                            <script>
                                initShowFenlei();
                                function initShowFenlei() {
                                    var bieBeiPinFenLeiTemp = '{!bieBeiPinFenLei}';
                                    if (bieBeiPinFenLeiTemp != null && bieBeiPinFenLeiTemp != undefined && bieBeiPinFenLeiTemp != "") {
                                        j$("#classification_a").children("#initial_a").remove();
                                        var bieBeiPinFenLeiList = bieBeiPinFenLeiTemp.split(',');
                                        for(var i=0; i< bieBeiPinFenLeiList.length; i++) {
                                            var idTemp = bieBeiPinFenLeiList[i].trim();
                                            idTemp = 'Id'+idTemp.split('.')[0];
                                            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (bieBeiPinFenLeiList[i].trim() + ",") + "</span>");
                                        }
                                        var inputObj = j$(".li-input_a");
                                        if(inputObj != null){
                                            for(var i = 0; i < inputObj.length;i++){
                                                if(bieBeiPinFenLeiTemp.includes(inputObj[i].value)){
                                                    inputObj[i].checked = true;
                                                }
                                            }
                                        }
                                    }
                                }
                            </script>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>-->
                </apex:pageBlockSection>
                <table style="width:100%;margin:10px 0;">
                    <!-- <tr/><tr/><tr/><tr/><tr/><tr/><tr/><tr/>
                    <tr>
                        <td width="50px">关键字</td>
                        <td><apex:inputText value="{!keyword}" style="width:200px"/></td>
                        <td width="20px"/>
                        <td><apex:commandButton value="検索" onclick=" searchOppJs(); return false;"/></td>
                    </tr>
                    <tr/><tr/><tr/><tr/><tr/><tr/> -->
                    <colgroup>
                        <col width="6%" />
                        <col width="12%" />
                        <col width="12%" />
                        <col width="6%" />
                        <col width="6%"/>
                        <col width="12%"/>
                        <col width="6%"/>
                        <col width="12%"/>
                        <col width="6%"/>
                        <col width="12%"/>
                        <col width="10%"/>
                    </colgroup>
                    <tr>
                        <td align="right" style="padding-right:5px;" >备品存放地</td>
                        <td align="left">
                            <apex:selectList value="{!bieCunFangDi}" onchange="blockme(); changebenbu(); reloadBenBu(this);return false" size="1" style="margin-left: 0px; width:110px" id="bieCunFangDi">
                                <apex:selectOptions value="{!bieCunFangDiOps}"/>
                            </apex:selectList>
                        </td>
                        <td align="right" style="padding-right:5px;">产品分类(GI/SP)</td>
                        <td align="left">
                            <apex:selectList value="{!bieChanPinFenLei}" size="1" style="margin-left: 0px; width:60px" id="bieChanPinFenLei">
                                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
                            </apex:selectList>
                        </td>
                        <td align="right" style="padding-right:5px;" >本部</td>
                        <td align="left">
                            <apex:outputPanel style="position: absolute;" id="S_bieBenBuApply">
                            <apex:inputHidden id="bieBenBu" value="{!bieBenBu}" />
                            <ul class="nav" id="nav" style="left:0px;">
                                <li id="classification" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose();return false;">
                                    <span id="initial">--无--</span>
                                </li>
                                <li id="selectCheckId" style="margin-left:0px;display: none;">
                                    <ul style="background-color: #FFFFFF;margin-left: 0;">
                                        <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSDBB">
                                            <li class="sdclass" style="margin-left:0px">
                                                <p class="ul-nav" name="cate_id[]" >
                                                    <input type="checkbox" value="{!orr.label}" class="li-input" onclick="selectBenBu(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
                                                    <font style="">{!orr.label}</font>
                                                </p>
                                            </li>
                                        </apex:repeat>
                                    </ul>
                                </li>
                            </ul>
                            <script>
                                initShowBenbu();
                                function initShowBenbu() {
                                    var bieBenBuTemp = '{!bieBenBu}';
                                    if (bieBenBuTemp != null && bieBenBuTemp != undefined && bieBenBuTemp != "") {
                                        j$("#classification").children("#initial").remove();
                                        var bieBenBuList = bieBenBuTemp.split(',');
                                        for(var i=0; i< bieBenBuList.length; i++) {
                                            var idTemp = bieBenBuList[i].trim();
                                            idTemp = 'Id'+idTemp.split('.')[0];
                                            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (bieBenBuList[i].trim() + ",") + "</span>");
                                        }
                                        var inputObj = j$(".li-input");
                                        if(inputObj != null){
                                            for(var i = 0; i < inputObj.length;i++){
                                                if(bieBenBuTemp.includes(inputObj[i].value)){
                                                    inputObj[i].checked = true;
                                                }
                                            }
                                        }
                                    }
                                }
                            </script>
                        </apex:outputPanel>
                        </td>
                        <td align="right" style="padding-right:5px;" >备品分类</td>
                        <td align="left" >
                            <apex:outputPanel style="position: absolute;" id="S_AgencyApply">
                            <apex:inputHidden id="bieBeiPinFenLei" value="{!bieBeiPinFenLei}" />
                            <ul class="nav" id="nav_a" style="left:0px;">
                                <li id="classification_a" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_a();return false;">
                                    <span id="initial_a">--无--</span>
                                </li>
                                <li id="selectCheckId_a" style="margin-left:0px;display: none;">
                                    <ul style="background-color: #FFFFFF;margin-left: 0;">
                                        <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selSD">
                                            <li class="sdclass" style="margin-left:0px">
                                                <p class="ul-nav" name="cate_id[]" >
                                                    <input type="checkbox" value="{!orr.label}" class="li-input_a" onclick="selectAgency(this,'{!orr.label}');" style="display: inline-block;vertical-align: middle;" />
                                                    <font style="">{!orr.label}</font>
                                                </p>
                                            </li>
                                        </apex:repeat>
                                    </ul>
                                </li>
                            </ul>
                            <script>
                                initShowFenlei();
                                function initShowFenlei() {
                                    var bieBeiPinFenLeiTemp = '{!bieBeiPinFenLei}';
                                    if (bieBeiPinFenLeiTemp != null && bieBeiPinFenLeiTemp != undefined && bieBeiPinFenLeiTemp != "") {
                                        j$("#classification_a").children("#initial_a").remove();
                                        var bieBeiPinFenLeiList = bieBeiPinFenLeiTemp.split(',');
                                        for(var i=0; i< bieBeiPinFenLeiList.length; i++) {
                                            var idTemp = bieBeiPinFenLeiList[i].trim();
                                            idTemp = 'Id'+idTemp.split('.')[0];
                                            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (bieBeiPinFenLeiList[i].trim() + ",") + "</span>");
                                        }
                                        var inputObj = j$(".li-input_a");
                                        if(inputObj != null){
                                            for(var i = 0; i < inputObj.length;i++){
                                                if(bieBeiPinFenLeiTemp.includes(inputObj[i].value)){
                                                    inputObj[i].checked = true;
                                                }
                                            }
                                        }
                                    }
                                }
                            </script>
                        </apex:outputPanel>
                        </td>
                        <td  align="right" style="padding-right:5px;">关键字</td>
                        <td align="left" ><apex:inputText value="{!keyword}"/></td>
                        <td style="padding-left:20px;"><apex:commandButton value="検索" onclick=" searchOppJs(); return false;"/></td>
                    </tr>
                </table>
                <!-- 20230605 ljh lightning end -->
                <table style="width:100%">
                    <tr>
                        <td style="width:40%">
                            <apex:outputPanel rendered="{!parentObj.Rental_Apply__r.demo_purpose2__c=='学会展会'&&NOT((contains(parentObj.Rental_Apply__r.Salesdepartment__c,'MA本部')||contains(parentObj.Rental_Apply__r.Salesdepartment__c,'产品培训')))}">
                                <apex:outputLabel for="campaignType" value="学会类型" style="font-weight: bold;font-family: Arial,Helvetica,sans-serif;font-size: 91%;color: #4a4a56;" />
                                <apex:selectList value="{!campaignType}" size="1" style="margin-left: 20px; width:120px;" id="campaignType">
                                    <apex:selectOptions value="{!campaignTypeOps}"/>
                                </apex:selectList>
                            </apex:outputPanel>
                            <apex:commandButton style="margin-left:5px;" action="{!defaultScheduel}" disabled="{!parentObj.Rental_Apply__r.Demo_purpose1__c=='其他'||(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="if(!confirmDefualt()) return false;blockme();" oncomplete="unblockUI();" value="默认排队" rerender="allForm,checEventFrame"/>
                            <apex:commandButton style="margin-left:20px;" action="{!specialScheduel}" disabled="{!parentObj.Rental_Apply__r.Demo_purpose1__c=='维修代用'||parentObj.Rental_Apply__r.Demo_purpose1__c=='协议借用'||(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="if(!confirmSpecial()) return false;blockme();" oncomplete="unblockUI();" value="特殊排队" rerender="message,checEventFrame"/>
                            <apex:commandButton style="margin-left:20px;" action="{!topInLine}" disabled="{!(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}" onclick="blockme();" oncomplete="unblockUI();" value="排队No.置顶" rerender="allForm,checEventFrame"/>
                        </td>
                        <td style="width:50%">
                            <div style="text-align: center;">
                                <apex:commandButton action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();" />
                                <apex:commandButton style="margin-left:20px;" onclick="clickunassign(); return false;" value="取消分配" rerender="allForm,checEventFrame"/>
                                <apex:commandButton style="margin-left:20px;" value="取消" onclick="clickCancel(); return false;"/>
                            </div>
                        </td>
                        <td>
                            <div style="text-align: right;">
                                <apex:commandButton action="{!turnback}" value="返回" rerender="allForm,checEventFrame"/>
                            </div>
                        </td>
                    </tr>
                </table>
                <div style="clear:both;"></div>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                </apex:outputPanel>
            </apex:pageBlock>
            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true"/>
        </apex:outputPanel>
    </apex:form>
    <apex:outputPanel id="checEventFrame">
        <apex:form >
            <!-- <apex:inputHidden id="assetId" value="{!assetId}" />
            <apex:inputHidden id="rentalId" value="{!rentalId}" /> -->
<!--             <apex:inputHidden id="modelNo" value="{!modelNo}" />
            <apex:inputHidden id="raesdId" value="{!raesdId}" /> -->
        </apex:form>
        <apex:iframe id="theIframe" rendered="{!IF(!ISBLANK(queueByAsset),true,false)}" title="排队一览" src="{!queueByAsset}"/>
        <!-- add by rentx 20210813 start SFDC-C448KZ -->
        <script>
            addlinkbutton();
            function addlinkbutton(){
              // 次の画面遷移click
              var ele = j$(".dataCellBorder1.col_Asset__r_Fixture_Status__c");
              var isShowButton = '{!(sonObj.Asset__c!=''&&sonObj.Select_Time__c!=null)||(sonObj.Asset__c!=''&&sonObj.Queue_Number__c==0)}';
              // alert(ele.length);
              if(ele.length) {
                var i = 0;
                ele.each(function () {
                    j$(this).css('align-items','center');
                    console.log(j$(this).children("span")[0].innerText);
                    var value = j$(this).children("span")[0].innerText;
                    if(value == '暂定分配'){
                        if (isShowButton=='false') {
                            j$(this).append('<input type="button" style="width: auto;" value="抢夺暂定分配" onclick="derectlyAssign('+i+');" />');
                        } else {
                            j$(this).append('<input type="button" style="width: auto;" value="抢夺暂定分配" onclick="derectlyAssign('+i+');" disabled="true" />');
                        }
                    }
                    i = i + 1;
                })
              }
            }
            function derectlyAssign(index) {
                // var viewList = JSONCODE(viewListStr);
                var viewList = eval("({!JSENCODE(WrapperJSON)})");
                var targetId = '{!parentId}';
                console.log(viewList[index]);
                var rasdId = viewList[index].sobj.Asset__r.Last_Reserve_RAES_Detail__r.Rental_Apply_Equipment_Set__c;
                window.location.href = '/apex/DirectAssign?oldquenId=' + rasdId + '&targetId=' + targetId;
            }
            function confirmDefualt() {
                var queenType = '{!sonObj.QuenType__c}';
                if (queenType=='特殊排队') {
                    if (confirm("已参与特殊排队,是否继续?")) {
                        var campaignTemp1 = '{!parentObj.Rental_Apply__r.CampaignType__c}';
                        var campaignTemp2 = j$(escapeVfId('allPage:allForm:searchBlock:campaignType')).value();
                        if (campaignTemp1 !="" && campaignTemp1 != undefined && campaignTemp1 != campaignTemp2) {
                            if(confirm("选择的学会类型与申请单中的学会类型不一致,请确认是否更新?")){
                                j$("[id*='changeCampaignType']").val(true);
                            } else {
                                j$("[id*='changeCampaignType']").val(false);
                            }
                        }
                        return true;
                    }
                } else {
                    if (confirm("是否默认排队?")) {
                        var campaignTemp1 = '{!parentObj.Rental_Apply__r.CampaignType__c}';
                        var campaignTemp2 = j$(escapeVfId('allPage:allForm:searchBlock:campaignType')).value();
                        if (campaignTemp1 !="" && campaignTemp1 != undefined && campaignTemp1 != campaignTemp2) {
                            if (confirm("选择的学会类型与申请单中的学会类型不一致,请确认是否更新?")) {
                                j$("[id*='changeCampaignType']").val(true);
                            } else {
                                j$("[id*='changeCampaignType']").val(false);
                            }
                        }
                        return true;
                    }
                }
                return false;
            }
            function confirmSpecial() {
                var queenType = '{!sonObj.QuenType__c}';
                if (queenType=='特殊排队') {
                    if(confirm("已参与特殊排队,是否继续?")){
                        return true;
                    }
                } else if (queenType=='默认排队') {
                    if(confirm("已参与默认排队,是否继续?")){
                        return true;
                    }
                } else {
                    if(confirm("是否特殊排队?")){
                        return true;
                    }
                }
                return false;
            }
            // 20210817 ljh add
            function changeCancleReasonJs(){
                var Cancel_Reason = j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Cancel_Reason')).value();
                if((Cancel_Reason != null && Cancel_Reason == '主动取消') || Cancel_Reason == ''){
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).val('');
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
                }else if(Cancel_Reason != null && Cancel_Reason == '重新分配'){
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',false);
                }
            }
            function changeReasonJs(){
                var reason = j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_reason')).value();
                if(reason != null && reason == '其他'){
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',false);
                }else{
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).val('');
                    j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
                }
            }
            // 20210817 ljh add end
            //add by rentx 20210813 start SFDC-C448KZ
            //1.默认设置"取消备注理由"不可编辑
            j$(escapeVfId('allPage:allForm:searchBlock:mainSection:pbId:Loaner_cancel_Remarks')).attr('disabled',true);
            //设置明细行的不可编辑
            j$(".dataCellBorder1.col_Loaner_cancel_Remarks__c input").each(function () {
                //设置只读
                j$(this).prop('disabled', true)
            });
            //2.设置只有明细取消理由为 '其他' 时 取消理由备注 可编辑
            //设置当明细取消原因为 其他时可编辑
            j$(".dataCellBorder1.col_Loaner_cancel_reason__c span").each(function () {
                //判断当前标签下的select标签值是否为取消--
                // var aaa = j$(this);
                var Loaner_cancel_reason = j$(this).children()[0].value;
                if (Loaner_cancel_reason == '其他') {
                    //拿到输入框 设置可以编辑
                    j$(this).parent().parent().find("input[type=text]").prop("disabled",false);
                    j$(this).parent().parent().find("input[type=text]").prop("required","required");
                }
            });
            //为明细取消原因添加change时间 如果变为其他 则设置可编辑 反之设置不可编辑
            j$(".dataCellBorder1.col_Cancel_Reason__c").on("change", function () {
                //判断当前标签下的select标签值是否为取消--
                var Cancel_Reason = j$(this).children()[0].value;
                if((Cancel_Reason != null && Cancel_Reason == '主动取消') ||Cancel_Reason == ''){
                    //清空输入框 设置不可编辑
                    j$(this).parent().find("input[type=text]").val('');
                    j$(this).parent().find("input[type=text]").prop("disabled",true);
                }else if(Cancel_Reason != null && Cancel_Reason == '重新分配'){
                    j$(this).parent().find("input[type=text]").prop("disabled",false);
                }
            });
            j$(".dataCellBorder1.col_Loaner_cancel_reason__c span").on("change", function () {
                //判断当前标签下的select标签值是否为取消--
                var Loaner_cancel_reason = j$(this).children()[0].value;
                if (Loaner_cancel_reason == '其他') {
                    //拿到输入框 设置可以编辑
                    j$(this).parent().parent().find("input[type=text]").prop("disabled",false);
                }else{
                    //清空输入框 设置不可编辑
                    j$(this).parent().parent().find("input[type=text]").val('');
                    j$(this).parent().parent().find("input[type=text]").prop("disabled",true);
                }
            });
        </script>
        <!-- add by rentx 20210813 end SFDC-C448KZ -->
    </apex:outputPanel>
</apex:page>
force-app/main/default/pages/NotReceivingNoteListFirst.page
@@ -1,10 +1,11 @@
<apex:page controller="NotReceivingNoteListFirstController" action="{!init}" showHeader="false" sidebar="false" id="allPage" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/>
<!-- <apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/> -->
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<!-- <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> -->
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
@@ -12,6 +13,23 @@
    searchOpp();
}
</script>
<style type="text/css">
table.list .col_Internal_asset_location__c{width:100px;}
table.list .col_Sales_order_number__c{width:100px;}
table.list .col_OrderCode__c{width:100px;}
table.list .col_ApprovalNumber__c{width:100px;}
table.list .col_Asset_loaner_category__c{width:100px;}
table.list .col_DateOfDelivery__c{width:100px;}
table.list .col_ReceivingNoteSummary_Cnt__c{width:100px;}
table.list .col_ContactPerson__c{width:100px;}
table.list .col_ReceivingNoteNo_New__c{width:100px;}
table.list .col_RN_Status__c{width:100px;}
table.list .col_NotReceivingNoteListFirst_Link__c{width:100px;}
body .bPageBlock .detailList .dataCol{
    width: 8%;
}
</style>
<apex:form id="allForm">
        <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
        </apex:actionFunction>
@@ -78,7 +96,7 @@
    </apex:form>
    <apex:outputPanel id="checEventFrame">
      <script type="text/javascript">
        j$("table#tableData").disabled = true;
        /*j$("table#tableData").disabled = true;
        function windowResize() {
            var heightsp = 0;
            if( typeof bottomspace != 'undefined' ){
@@ -124,7 +142,7 @@
                    j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
                }
            }
        }
        } */
      </script>
    </apex:outputPanel>
</apex:page>
force-app/main/default/pages/NotReceivingNoteWaitingReceipt.page
@@ -1,10 +1,11 @@
<apex:page controller="NotReceivingNoteWaitingReceiptController" showHeader="false" action="{!init}" id="allPage">
<apex:page controller="NotReceivingNoteWaitingReceiptController" showHeader="false" action="{!init}" id="allPage" 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.ReceivingNotePageCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <apex:form >
        <!-- 此处隐式生成二维码图片,防止PDF页上的二维码崩坏 -->
        <!-- <apex:includeScript value="{!URLFOR($Resource.qrcode)}"/> -->
@@ -37,6 +38,18 @@
            }
            td.newed {
                color: #f00 !important;
            }
            table.list td.col_chk  {width:3%;}
            table.list td.col_Chk  {width:3%;}
            table.list td.col_ReceivingNoteDetailNo__c  {width:10%;}
            table.list td.col_OT_CODE__c  {width:10%;}
            table.list td.col_Fixture_Model_No_F__c  {width:15%;}
            table.list td.col_Internal_Asset_number_key__c  {width:10%;}
            table.list td.col_SerialNumber_Origin__c  {width:10%;}
            table.list td.col_SerialNumber__c  {width:15%;}
            table.list td.col_SerialNumber__c input {width:90%;}
            .buttonSave{
                display: none;
            }
        </style>
        <script type="text/javascript">
@@ -99,7 +112,7 @@
        <apex:inputHidden value="{!done_flg}" id="done_flg"/>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock">
                    <table class="headTable" style="width:100%">
                    <table class="headTable" style="width:100%;margin-bottom:10px;">
                        <tr>
                            <td>
                                <span style="font-weight:bold;">
@@ -147,7 +160,7 @@
                            </td>
                        </tr>
                    </table>
                    <table class="searchTable" style="width:100%">
                    <table class="searchTable" style="width:100%;margin-bottom:10px;">
                        <tr>
                            <td>
                                <span>
@@ -171,6 +184,7 @@
                            </td>
                            <td>
                                <span style="margin-left: 50px;float: right;">
                                    <input class="buttonSave" type="button" style="width:0;height:0;" />
                                    <apex:commandButton style="" value="数据确认" action="{!defineSaveRecord}" onclick="blockme();" reRender="allForm"  oncomplete="unblockUI();checkMessage();"/>
                                    <apex:commandButton style="" value="保存" action="{!saveRecord}" onclick="blockme();" reRender="allForm"  oncomplete="unblockUI();checkMessage();"/>
                                    <apex:commandButton value="返回" onclick="closeCurrentPage();"/>
@@ -188,7 +202,7 @@
                    {!nowPage}/{!maxPage}
                    <apex:commandButton reRender="allForm" onclick="blockme();" disabled="{!canNext = false}" action="{!nextPage}" value="next" oncomplete="unblockUI();"/>
                </div>
            <div id="out_Div_L" style="width: 100%;">
            <div id="out_Div_L" style="width: 100%;overflow: auto;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
                    <tr class="headerRow" height="30px">
                        <td class="col_chk" align="center">
force-app/main/default/pages/QueuePageByAssetId.page
@@ -61,6 +61,7 @@
            </apex:pageBlockSection>
            <!-- <apex:commandButton onclick="lineMoveUp();return false;" value="上"/> -->
            <!-- <apex:commandButton onclick="lineMoveDown();return false;" value="下"/> -->
            <input type="hidden" name="hidden" /> <!-- 20230610 ljh 为了按钮对齐 -->
            <apex:commandButton onclick="lineMoveTopUp();return false;" value="置顶"/>
            <apex:commandButton onclick="lineMoveTopDown();return false;" value="置底"/>
            <apex:commandButton value="申请单置顶" reRender="allForm,message" onclick="blockme();" action="{!upRentalApply}" oncomplete="unblockUI();" rendered="{!!isNotShow}" />
force-app/main/default/pages/QueuePageByAssetId.page.bak
New file
@@ -0,0 +1,184 @@
<!-- 20230526 ljh lightning -->
<!-- <apex:page controller="QueuePageByAssetIdController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true"> -->
<apex:page controller="QueuePageByAssetIdController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.QueuePageByAssetIdCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
    <style>
        /* 20230526 ljh lightning start */
        /* table.list{
            width: 100%!important;
        } */
        body .detailList .dataCol input[type="text"]{min-width: 60px;width:60px;}
        /* 20230526 ljh lightning end */
    </style>
    <script type="text/javascript">
        var heightAjustment = 120;
        var widthAjustment = 30;
    </script>
    <apex:form id="allForm">
    <apex:outputPanel id="message">
        <apex:pageMessages />
    </apex:outputPanel>
    <!-- <apex:actionFunction action="{!saveQueue}" name="saveQueue();" oncomplete="unblockUI();"/> -->
    <apex:inputHidden value="{!inputUpDownFlag}" id="hiddenFlag"/>
    <apex:inputHidden value="{!inptNum}" id="hiddenNum"/>
    <apex:outputPanel id="pageallPanel">
        <apex:pageBlock id="searchBlock" tabStyle="Asset">
            <apex:pageBlockSection columns="3" id="aa">
                <apex:outputPanel >
                <apex:outputText value="队列信息:"/>
                </apex:outputPanel>
                <apex:outputPanel >
                </apex:outputPanel>
                <apex:outputPanel >
                </apex:outputPanel>
                <!-- ++++ -->
                <apex:outputPanel >
                    <!-- 20211104 ljh 排队 start-->
                    <!-- <apex:outputText value="{!$ObjectType.Asset.Fields.Fixture_Model_No_F__c.Label + ':'}"/><apex:outputField value="{!aset.Fixture_Model_No_F__c}"/> -->
                    <apex:outputText value="{!$ObjectType.Asset.Fields.Fixture_Model_No_F__c.Label + ':'}"/><apex:outputField value="{!raesd.Fixture_Model_No_F__c}"/>
                    <!-- 20211104 ljh 排队 end-->
                </apex:outputPanel>
                <apex:outputPanel >
                    <apex:outputText value="备品存放地:"/><apex:outputField value="{!raesd.Internal_asset_location_before__c}"/>
                </apex:outputPanel>
                <apex:outputPanel >
                    <apex:outputText value="产品分类(GI/SP):"/><apex:outputField value="{!raesd.Product_category_text__c}"/>
                </apex:outputPanel>
                <apex:outputPanel >
                    <apex:outputText value="所在地区(本部):"/><apex:outputField value="{!raesd.Salesdepartment_before__c}"/>
                </apex:outputPanel>
                <apex:outputPanel >
                    <apex:outputText value="备品分类:"/><apex:outputField value="{!raesd.Equipment_Type_text__c}"/>
                </apex:outputPanel>
                <apex:outputPanel >
                    <apex:outputText value="指定排队NO.:"/><apex:inputText id="strNum" value="{!inptNumStr}" onChange="changeNum();return false;"/>
                </apex:outputPanel>
                <!-- 20211104  排队 add end-->
            </apex:pageBlockSection>
            <!-- <apex:commandButton onclick="lineMoveUp();return false;" value="上"/> -->
            <!-- <apex:commandButton onclick="lineMoveDown();return false;" value="下"/> -->
            <apex:commandButton onclick="lineMoveTopUp();return false;" value="置顶"/>
            <apex:commandButton onclick="lineMoveTopDown();return false;" value="置底"/>
            <apex:commandButton value="申请单置顶" reRender="allForm,message" onclick="blockme();" action="{!upRentalApply}" oncomplete="unblockUI();" rendered="{!!isNotShow}" />
            <apex:commandButton value="保存排队" reRender="allForm,message" onclick="blockme();" style="margin-left:400px;" action="{!saveQueue}" oncomplete="unblockUI();"/>
        </apex:pageBlock>
        <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="true" tabStyle="Report" />
    </apex:outputPanel>
    </apex:form>
    <script type="text/javascript">
        /*function disableCheckboxJs(){
            var ele = j$(".dataCellBorder1.col_Allow_Adjust_Queue_Flag__c");
            if (ele.length) {
                var i = 0;
                ele.each(function () {
                    var value = j$(this).children("span")[0].innerText;
                    if(value == 'false'){
                        j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowRadioCheck')).disabled = true;
                    }
                    i = i + 1;
                })
            }
        }*/
        function lineMoveUp() {
            var i = 1;
            var line = 0;
            var nowitem;
            j$(".rowchkcls:checkbox").each(function() {
                nowitem = j$(this);
                if (this.checked == true) {
                    line = i;
                    //break;
                    return false
                }
                i++;
            });
            if (line > 0) {
                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
                hiddenNum.value = i - 1;
                hiddenFlag.value = true;
                return resetOrderNoMoveUpDown(true, line);
            }
        }
        function lineMoveDown() {
            var i = 1;
            var line = 0;
            j$(".rowchkcls:checkbox").each(function() {
                nowitem = j$(this);
                if (this.checked == true) {
                    line = i;
                    //break;
                    return false
                }
                i++;
            });
            if (line > 0) {
                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
                hiddenNum.value = i + 1;
                hiddenFlag.value = false;
                return resetOrderNoMoveUpDown(false, line);
            }
        }
        function lineMoveTopUp() {
            var i = 1;
            var line = 0;
            var nowitem;
            j$(".rowchkcls:checkbox").each(function() {
                nowitem = j$(this);
                if (this.checked == true) {
                    line = i;
                    //break;
                    return false
                }
                i++;
            });
            if (line > 0) {
                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
                hiddenNum.value = 1;
                hiddenFlag.value = true;
                return resetOrderNoMoveTopUpDown(true, line);
            }
        }
        function lineMoveTopDown() {
            var i = 1;
            var line = 0;
            j$(".rowchkcls:checkbox").each(function() {
                nowitem = j$(this);
                if (this.checked == true) {
                    line = i;
                    //break;
                    return false
                }
                i++;
            });
            if (line > 0) {
                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
                // 为了区分保存排队备注的情况,此处给排队No设置,但后台处理时不使用
                hiddenNum.value = 99;
                hiddenFlag.value = false;
                return resetOrderNoMoveTopUpDown(false, line);
            }
        }
        function changeNum() {
            var numStr = document.getElementById('allPage:allForm:searchBlock:aa:strNum').value;
            if (numStr === undefined || numStr === '') {
                return;
            } else {
                var hiddenFlag = document.getElementById('allPage:allForm:hiddenFlag');
                var hiddenNum = document.getElementById('allPage:allForm:hiddenNum');
                hiddenNum.value = numStr;
                hiddenFlag.value = true;
            }
        }
    </script>
</apex:page>
force-app/main/default/pages/ReantalApplySeriesNo.page
@@ -1,12 +1,11 @@
<!-- <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看"> -->
<apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看" lightningStylesheets="true">
<!-- 20230525 ljh lightning -->
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning  -->
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/>
    <!-- 20230525 ljh lightning  -->
    <style type="text/css">
    .bPageBlock .detailList .dataCol {
        width: auto;
@@ -26,6 +25,7 @@
        }
    </script>
    <apex:form id="allForm">
        <apex:outputPanel id="pageallPanel">
        <apex:pageBlock id="searchBlock" title="序列信息">
            <!-- 20230525 ljh lightning start -->
            <!-- <apex:pageBlockSection columns="3" id="mainSection">
@@ -54,26 +54,27 @@
                    <apex:outputText value="{!IF(Isadmix,'混合','单一')}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection> -->
            <table style="width:100%;margin:10px 0;" >
            <table style="width:100%;margin:10px 0;" class="detailList" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td>型号:</td>
                    <td>{!raq.Fixture_Model_No__c}</td>
                    <td>备品存放地:</td>
                    <td>{!raq.Internal_asset_location__c}</td>
                    <td>本部:</td>
                    <td>{!raq.Salesdepartment__c}</td>
                    <td align="right" style="padding-right:5px;">型号:</td>
                    <td align="left" >{!raq.Fixture_Model_No__c}</td>
                    <td align="right" style="padding-right:5px;">备品存放地:</td>
                    <td align="left" >{!raq.Internal_asset_location__c}</td>
                    <td align="right" style="padding-right:5px;">本部:</td>
                    <td align="left" >{!raq.Salesdepartment__c}</td>
                </tr>
                <tr>
                    <td>备品分类:</td>
                    <td>{!raq.Equipment_Type__c}</td>
                    <td>产品分类:</td>
                    <td>{!raq.Product_category__c}</td>
                    <td>序列类型:</td>
                    <td>{!IF(Isadmix,'混合','单一')}</td>
                    <td align="right" style="padding-right:5px;">备品分类:</td>
                    <td align="left" >{!raq.Equipment_Type__c}</td>
                    <td align="right" style="padding-right:5px;">产品分类:</td>
                    <td align="left" >{!raq.Product_category__c}</td>
                    <td align="right" style="padding-right:5px;" >序列类型:</td>
                    <td align="left" >{!IF(Isadmix,'混合','单一')}</td>
                </tr>
            </table>
            <!-- 20230525 ljh lightning end -->
        </apex:pageBlock>
        </apex:outputPanel>
        <apex:outputPanel id="message">
            <apex:pageMessages />
        </apex:outputPanel>
force-app/main/default/pages/ReantalApplySeriesNo.page.bak
New file
@@ -0,0 +1,156 @@
<!-- <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看"> -->
<apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看" lightningStylesheets="true">
<!-- 20230525 ljh lightning -->
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning  -->
    <style type="text/css">
    .bPageBlock .detailList .dataCol {
        width: auto;
    }
    .table-head{padding-right:17px;}
    .tablehead0{padding-right:0;}
    .table-body table tr:nth-child(2n){background-color:#f2f2f2;}
    </style>
    <script>
        // window.onload = () => {
        window.onload = function gunzhou(){
            if(j$('#tablebody').height() >= 270){
                j$('#table-head').addClass("table-head");
            }else{
                j$('#table-head').addClass("tablehead0");
            }
        }
    </script>
    <apex:form id="allForm">
        <apex:pageBlock id="searchBlock" title="序列信息">
            <!-- 20230525 ljh lightning start -->
            <!-- <apex:pageBlockSection columns="3" id="mainSection">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="型号:" />
                    <apex:outputField value="{!raq.Fixture_Model_No__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="备品存放地:"/>
                    <apex:outputField value="{!raq.Internal_asset_location__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="本部:"/>
                    <apex:outputField value="{!raq.Salesdepartment__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="备品分类:"/>
                    <apex:outputField value="{!raq.Equipment_Type__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="产品分类:"/>
                    <apex:outputField value="{!raq.Product_category__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="序列类型:"/>
                    <apex:outputText value="{!IF(Isadmix,'混合','单一')}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection> -->
            <table style="width:100%;margin:10px 0;" >
                <tr>
                    <td>型号:</td>
                    <td>{!raq.Fixture_Model_No__c}</td>
                    <td>备品存放地:</td>
                    <td>{!raq.Internal_asset_location__c}</td>
                    <td>本部:</td>
                    <td>{!raq.Salesdepartment__c}</td>
                </tr>
                <tr>
                    <td>备品分类:</td>
                    <td>{!raq.Equipment_Type__c}</td>
                    <td>产品分类:</td>
                    <td>{!raq.Product_category__c}</td>
                    <td>序列类型:</td>
                    <td>{!IF(Isadmix,'混合','单一')}</td>
                </tr>
            </table>
            <!-- 20230525 ljh lightning end -->
        </apex:pageBlock>
        <apex:outputPanel id="message">
            <apex:pageMessages />
        </apex:outputPanel>
        <apex:pageBlock id="raqList" title="查看序列情况">
        <div class="" id="table-head">
            <table class="list" border="0" cellpadding="0" cellspacing="0" width="100%" >
                <colgroup>
                <col width="4%" />
                <col width="4%" />
                <col width="10%" />
                <col width="10%"/>
                <col width="8%"/>
                <col width="8%"/>
                <col width="7%"/>
                <col width="10%"/>
                <col width="8%"/>
                <col width="5%"/>
                <col width="13%"/>
                <col width="13%"/>
                </colgroup>
                <thead>
                <tr class="headerRow" >
                    <th style="padding-bottom: 6px;">序列号</th>
                    <th style="padding-bottom: 6px;">排队NO.</th>
                    <th style="padding-bottom: 6px;">申请单NO.</th>
                    <th style="padding-bottom: 6px;">排队时间</th>
                    <th style="padding-bottom: 6px;">申请者办事处</th>
                    <th style="padding-bottom: 6px;">备品出借担当</th>
                    <th style="padding-bottom: 6px;">希望到货日</th>
                    <th style="padding-bottom: 6px;">批准时间</th>
                    <th style="padding-bottom: 6px;">使用目的2</th>
                    <th style="padding-bottom: 6px;">负责人</th>
                    <th style="padding-bottom: 6px;">医院</th>
                    <th style="padding-bottom: 6px;">学会</th>
                </tr>
                </thead>
                </table>
            </div>
            <div class="table-body" id="table-body" style="height: 270px;overflow-y:auto;">
            <table class="list" border="0" cellpadding="0" cellspacing="0" id="tablebody">
                <colgroup>
                <col width="4%" />
                <col width="4%" />
                <col width="10%" />
                <col width="10%"/>
                <col width="8%"/>
                <col width="8%"/>
                <col width="7%"/>
                <col width="10%"/>
                <col width="8%"/>
                <col width="5%"/>
                <col width="13%"/>
                <col width="13%"/>
                </colgroup>
                <tbody>
                <apex:repeat value="{!raqList}" var="info"  id="info">
                <tr height="48px">
                <!-- <apex:outputLink value="/{!info.Id}">{!info.Series_No__c}</apex:outputLink>-->
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Series_No__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_Number__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_Time_F__c}"/></td>
                    <apex:outputPanel layout="none">
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.WorkPlace__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Person_In_Charge__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Request_shipping_day__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Request_approval_time__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.demo_purpose2__c}"/></td>
                    </apex:outputPanel>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Apply_Set_Detail__r.Queue_User__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Hospital__c}"/></td>
                    <td style="white-space: pre-wrap;"><apex:outputField value="{!info.Rental_Apply__r.Campaign__c}"/></td>
                </tr>
                </apex:repeat>
                </tbody>
            </table>
        </div>
        </apex:pageBlock>
    </apex:form>
</apex:page>
force-app/main/default/pages/ReceivingNoteAcceptance.page
@@ -138,18 +138,22 @@
        border-top-right-radius:10px;
        text-align: left;
        margin: 0;
        padding: 1%;
        width: 98%;
        background:#DCDCDC;
        /* lightning改造   zyh   start */
        /* padding: 1%; */
        /* width: 98%; */
        /* background:#DCDCDC; */
        background:#95aee5;
        padding-left: 0.75rem;
        /* lightning改造   zyh   end */
        position: relative;
    }
    .checkintitle{
        position:absolute;
        right:10px;   
    }
    .disableInput {
    input.disableInput[type="text"] {
        pointer-events: none;
        background-color: #ccc;
        background-color: #8c8c8c5b;
    }
    .dateFormat {
        display: none;
@@ -157,18 +161,26 @@
    #Step_tab {
        list-style-type: none;
        padding: 0;
        margin: 0;
        height: 31px;
        border-bottom: 5px solid #3b5998;
    }
    #Step_tab li {
        position: relative;
        width: 20%;
        /* lightning改造   zyh   start */
        /* width: 20%; */
        width: 50%;
        /* lightning改造   zyh   end */
        float: left;
        margin: 0;
        padding: 0;
        text-align: center;
        cursor: pointer;
        height: 25px;
        /* lightning改造   zyh   start */
        /* height: 25px; */
        height: 30px;
        line-height: 30px;
        /* lightning改造   zyh   end */
    }
    #Step_tab li span {
        margin: 0;
@@ -185,8 +197,11 @@
        color: #fff;
    }
    div.menu{
        margin-bottom: 20px;
        width: 490px;
        /* lightning改造   zyh   start */
        /* margin-bottom: 20px;  */
        margin-bottom: 2px;
        /* width: 490px; */
        /* lightning改造   zyh   end */
    }
    hr {
@@ -194,7 +209,10 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /* lightning改造   zyh   start */
        /* width: 90%; */
        width: 98%;
        /* lightning改造   zyh   end */
    }
    .close {
        color: #aaaaaa;
@@ -218,7 +236,9 @@
    .menu{
        border:1px solid #a1a1a1;
        border-radius:10px;
        width: 400px;
        /* lightning改造   zyh   start */
        /* width: 400px; */
        /* lightning改造   zyh   end */
    }
    .menu li .fieldname {
        width: 30%;
@@ -240,7 +260,14 @@
        margin-left: 20px !important;
    }
    div.freezehander{
        width:500px;
        /* lightning改造   zyh   start */
        /* width:500px; */
        /* lightning改造   zyh   end */
    }
    .titleCheckbox[type="checkbox"]{
        margin-bottom: 4px;
        margin-right: 0;
        margin-left: 10px;
    }
</style>
@@ -262,26 +289,27 @@
<apex:form id="allForm">
    <apex:actionFunction name="save" action="{!save}" rerender="allForm" onComplete="unblockUI();checkMessage();resetDetailDivMargintop();" />
    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
    <div id="main">
    <div id="main" style="margin-bottom:20px;">
        <input type="hidden" id="QRType" value="1"/>
        <input type="hidden" id="QRTypeID" value=""/>
        <div id="hander" class="freezehander">
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- lightning改造   zyh   start -->
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/> -->
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
            <!-- <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                <tr> -->
                    <!-- 状态切换btn -->
                    <th colspan="2" style="font-size:20px;text-align: center;width:500px;">
                    <!-- <th colspan="2" style="font-size:20px;text-align: center;width:500px;">
                        <ul id="Step_tab">
                            <li class="selected"><span class="tabsize">清点</span></li>
                        </ul>
@@ -293,7 +321,29 @@
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy"/>
                <apex:commandButton styleClass="commandbutton" onclick="checkAll();" value="全选" rerender="dummy" />
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px; margin-bottom:10px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <th style="font-size:20px;text-align: center;width:280px;">
                            <ul id="Step_tab">
                                <li class="selected"><span class="tabsize">清点</span></li>
                            </ul>
                        </th>
                        <th width="1900px;">
                            <apex:commandButton styleClass="commandbutton" onclick="changeAccessory()" value="附属品调整" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="checkAll();" value="全选" rerender="dummy" />
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -304,24 +354,26 @@
            <apex:repeat value="{!esdList}" var="esdInfo" id="esdList">
                <!-- <apex:outputPanel rendered="{!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id,false,true)}"> -->
                <div style="margin-bottom: -20px;display: {!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id,'none','block')}">
                <!-- <div style="margin-bottom: -20px;display: {!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id,'none','block')}"> -->
                <div style="display: {!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id,'none','block')}">
                    <apex:outputPanel rendered="{!IF(indexloop=0,false,true)}">
                        <hr/>
                    </apex:outputPanel>
                    <label style="font-size: 14px;font-weight: bold;" >
                        <apex:outputPanel rendered="{!esdInfo.rnd.ReceivingNoteSummary__r.Package_Status__c=='OK'}">
                            <apex:inputCheckbox id="checkedRN" value="{!esdInfo.isChecked}" html-data-rnId="{!esdInfo.rnd.ReceivingNoteSummary__c}" html-data-fsId="{!esdInfo.rnd.Fixture_Set_Detail__r.Fixture_Set__c}"/>
                            <apex:inputCheckbox id="checkedRN" styleClass="titleCheckbox" value="{!esdInfo.isChecked}" html-data-rnId="{!esdInfo.rnd.ReceivingNoteSummary__c}" html-data-fsId="{!esdInfo.rnd.Fixture_Set_Detail__r.Fixture_Set__c}"/>
                        </apex:outputPanel>
                        &nbsp;{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}
                        {!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}
                        <!-- &nbsp;{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c} -->
                    </label>
                    <apex:variable var="SetName" value="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" />
                    <apex:variable var="indexloop" value="{!indexloop+1}"/>
                </div>
                <!-- </apex:outputPanel> -->
                <!-- <br /> -->
                <apex:outputPanel layout="none" rendered="true" >
                    <br/>
                    <!-- <br/> -->
                    
                    <div class="menu">
                        
@@ -338,31 +390,52 @@
                        
                        <ul data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__c}" data-model="{!IF(esdInfo.rnd.Fixture_Arrival_Process__c=='变体',esdInfo.rnd.Fixture_Arrival_Product__r.Fixture_Model_No_T__c, esdInfo.rnd.Fixture_Model_No_F__c)}">
                            <li>
                                <span class="fieldname">明细No.</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">明细No.</span> -->
                                <span class="fieldvalue">明细No.</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue" style="width: 65%;">{!esdInfo.rnd.ReceivingNoteDetailNo__c}</span>
                            </li>
                            <li style="{!IF(ISBLANK(esdInfo.rnd.Fixture_Arrival_Process__c),'display: none;','')}">
                                <span class="fieldname">备品入库处理</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">备品入库处理</span> -->
                                <span class="fieldvalue">备品入库处理</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue" style="width: 65%;">{!esdInfo.rnd.Fixture_Arrival_Process__c}</span>
                            </li>
                            <li style="{!IF(esdInfo.rnd.Fixture_Arrival_Process__c == '变体','','display: none;')}">
                                <span class="fieldname">备品入库产品</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">备品入库产品</span> -->
                                <span class="fieldvalue">备品入库产品</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue" style="width: 65%;">{!esdInfo.rnd.Fixture_Arrival_Product__r.Name}</span>
                            </li>
                            <li>
                                <span class="fieldname">规格</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">规格</span> -->
                                <span class="fieldvalue">规格</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue">{!esdInfo.rnd.Packing_list_Fixture_F__c}</span>
                            </li>
                            <li style="{!IF(esdInfo.rnd.unknow_serial_NO_product__c = 'TRUE', '', 'display: none;')}">
                                <span class="fieldname">无机身号码设备</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">无机身号码设备</span> -->
                                <span class="fieldvalue">无机身号码设备</span>
                                <!-- lightning改造   zyh   end -->
                                <apex:outputText styleclass="fieldvalue" id="isNoSerialNumber" value="{!esdInfo.rnd.unknow_serial_NO_product__c}" />
                            </li>
                            <li style="{!IF(esdInfo.rnd.unknow_serial_NO_product__c = 'TRUE', '', 'display: none;')}">
                                <span class="fieldname">机身编码</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">机身编码</span> -->
                                <span class="fieldvalue">机身编码</span>
                                <!-- lightning改造   zyh   end -->
                                <apex:outputText styleClass="fieldvalue" value="{!esdInfo.rnd.SerialNumber_F__c}"/>
                            </li>
                            <li style="{!IF(esdInfo.rnd.unknow_serial_NO_product__c != 'TRUE', '', 'display: none;')}">
                                <span class="fieldname">机身编码</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">机身编码</span> -->
                                <span class="fieldvalue">机身编码</span>
                                <!-- lightning改造   zyh   end -->
                                <apex:inputHidden value="{!esdInfo.rnd.unknow_serial_NO_product__c}" />
                                <apex:outputText styleClass="fieldvalue" value="{!esdInfo.rnd.SerialNumber_Origin__c}"/>
                                <apex:outputPanel rendered="{!esdInfo.canChange==true}" layout="none">
@@ -370,26 +443,41 @@
                                </apex:outputPanel>
                            </li>
                            <li style="{!IF(esdInfo.rnd.unknow_serial_NO_product__c != 'TRUE', '', 'display: none;')}">
                                <span class="fieldname">机身编码(更新)</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">机身编码(更新)</span> -->
                                <span class="fieldvalue">机身编码(更新)</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue"><apex:inputField id="serialNumberfix" styleclass="disableInput" value="{!esdInfo.rnd.SerialNumber__c}" /></span>
                            </li>
                            <li style="{!IF(esdInfo.rnd.Asset_loaner_category_F__c != '耗材','','display: none;')}">
                                <span class="fieldname">使用期限(修改前)</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">使用期限(修改前)</span> -->
                                <span class="fieldvalue">使用期限(修改前)</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue"> <apex:outputField id="PeriodOfUse_Old_F__c" value="{!esdInfo.rnd.PeriodOfUse_Old_F__c}" /> </span>
                            </li>
                            <li style="{!IF(esdInfo.rnd.Asset_loaner_category_F__c != '耗材','','display: none;')}">
                                <span class="fieldname">使用期限(修改后)</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">使用期限(修改后)</span> -->
                                <span class="fieldvalue">使用期限(修改后)</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue">
                                    <apex:inputField id="PeriodOfUse_Final__c" value="{!esdInfo.rnd.PeriodOfUse_Final__c}" rendered="{!esdInfo.canChange==true}" />
                                    <apex:outputField value="{!esdInfo.rnd.PeriodOfUse_Final__c}" rendered="{!esdInfo.canChange==false}"  />
                                </span>
                            </li>
                            <li style="{!IF(esdInfo.rnd.Asset_loaner_category_F__c == '耗材','','display: none;')}">
                                <span class="fieldname">使用期限</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">使用期限</span> -->
                                <span class="fieldvalue">使用期限</span>
                                <!-- lightning改造   zyh   end -->
                                <span class="fieldvalue"> <apex:outputField value="{!esdInfo.rnd.PeriodOfUse__c}" /> </span>
                            </li>
                            <li data-qr="{!esdInfo.rnd.Fixture_QRCode_F__c}" data-bar="{!esdInfo.rnd.Barcode_F__c}" data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__c}">
                                <span class="fieldname">清点结果</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">清点结果</span> -->
                                <span class="fieldvalue">清点结果</span>
                                <!-- lightning改造   zyh   end -->
                                <apex:outputPanel layout="none" rendered="{!esdInfo.canChange==false}" >
                                   <span class="fieldvalue"><apex:outputField value="{!esdInfo.rnd.AcceptanceResult__c}"/></span>
                                </apex:outputPanel>
@@ -398,7 +486,10 @@
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span class="fieldname">清点备注</span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <span class="fieldname">清点备注</span> -->
                                <span class="fieldvalue">清点备注</span>
                                <!-- lightning改造   zyh   end -->
                                <apex:outputPanel layout="none" rendered="{!esdInfo.canChange==false}" >
                                   <span class="fieldvalue"><apex:outputField value="{!esdInfo.rnd.AcceptanceComments__c}"/></span>
                                </apex:outputPanel>
@@ -416,11 +507,21 @@
        </apex:outputPanel>
    </div>
    <script type="text/javascript">
        // lightning改造   zyh   start
        // var standalone = window.navigator.standalone,
        //     userAgent = window.navigator.userAgent.toLowerCase(),
        //     safari = /safari/.test( userAgent ),
        //     ios = /iphone|ipod|ipad/.test( userAgent ),
        //     ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
        var standalone = window.navigator.standalone,
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            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 ","");
            }
        // lightning改造   zyh   end
        let scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 ,mirror: false});
        function filljsQR(content) {
force-app/main/default/pages/ReceivingNoteDetailSelect.page
@@ -1,4 +1,4 @@
<apex:page controller="ReceivingNoteDetailSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
<apex:page controller="ReceivingNoteDetailSelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<head>
<apex:outputPanel rendered="{!isAcceptance}">
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
@@ -11,7 +11,12 @@
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<!-- lightning改造   zyh   start -->
<style type="text/css">
    table.list td  input[type="text"]{width:55%;}
</style>
<!-- lightning改造   zyh   end -->
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
@@ -90,10 +95,16 @@
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockButtons location="bottom">
                        <apex:commandButton style="float:left;" action="{!save}" value="确定" onclick="blockme();" rerender="allForm, checEventFrame" oncomplete="unblockUI();" />
                        <apex:commandButton style="float:left;" value="无配套明细提醒邮件" onclick="setEmailBody();" rerender="allForm, checEventFrame"/>
                        <apex:commandButton style="float:right;" value="{!IF(isAcceptance, '返回', '返回上一级')}" action="{!goBack}"/>
                        <apex:commandButton rendered="{!isAcceptance == false}" style="float:right;" value="返回数据确认画面" action="{!cancel}"/>
                        <!-- lightning改造   zyh   start -->
                        <!-- <apex:commandButton style="float:left;" action="{!save}" value="确定" onclick="blockme();" rerender="allForm, checEventFrame" oncomplete="unblockUI();" /> -->
                        <!-- <apex:commandButton style="float:left; margin-left:12px;" action="{!save}" value="确定" onclick="blockme();" rerender="allForm, checEventFrame" oncomplete="unblockUI();" /> -->
                        <!-- lightning改造   zyh   end -->
                        <!-- <apex:commandButton style="float:left;" value="无配套明细提醒邮件" onclick="setEmailBody();" rerender="allForm, checEventFrame"/> -->
                        <!-- lightning改造   zyh   start -->
                        <!-- <apex:commandButton style="float:right;" value="{!IF(isAcceptance, '返回', '返回上一级')}" action="{!goBack}"/> -->
                        <!-- <apex:commandButton style="float:right; margin-right:12px;" value="{!IF(isAcceptance, '返回', '返回上一级')}" action="{!goBack}"/> -->
                        <!-- lightning改造   zyh   end -->
                        <!-- <apex:commandButton rendered="{!isAcceptance == false}" style="float:right;" value="返回数据确认画面" action="{!cancel}"/> -->
                </apex:pageBlockButtons>
                <div style="clear:both;"></div>
@@ -121,6 +132,14 @@
 <!--TODO  同一附属品:レ -->
                    </table>
                    <!-- lightning改造   zyh   start -->
                    <div style="margin-top: 15px;">
                        <apex:commandButton style="float:left; margin-left:12px;" action="{!save}" value="确定" onclick="blockme();" rerender="allForm, checEventFrame" oncomplete="unblockUI();" />
                        <apex:commandButton style="float:left;" value="无配套明细提醒邮件" onclick="setEmailBody();" rerender="allForm, checEventFrame"/>
                        <apex:commandButton style="float:right; margin-right:12px;" value="{!IF(isAcceptance, '返回', '返回上一级')}" action="{!goBack}"/>
                        <apex:commandButton rendered="{!isAcceptance == false}" style="float:right;" value="返回数据确认画面" action="{!cancel}"/>
                    </div>
                    <!-- lightning改造   zyh   end -->
            </apex:pageBlock>
            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="false" noSort="true"/>
        </apex:outputPanel>
@@ -130,6 +149,16 @@
      table.list .col_Fixture_Set_New_Quantity__c input {width:55%;}
      /*没找着这个输入框在哪设置的 就直接设置隐藏了 */
      table.list .col_Rental_Num__c input { display: none;}
      /* table.list .col_SortInt_F__c{height: 40px;} */
      /* <!-- lightning改造   zyh   start --> */
      table.list .col_Fixture_Set_New_Quantity__c {width: 200px;}
      table.list .col_Fixture_Set_Detail__r_Fixture_Model_No_F__c {width: 150px;}
      table.list .col_Fixture_Set_Detail__r_Name_CHN__c {width: 100px;}
      table.list .col_Is_Optional_F__c {width: 100px;}
      table.list .col_OneToOne_Flag__c {width: 150px;}
      table.list .col_Fixture_Set_Detail__r_Fixture_Set_New__c {width: 100px;}
      /* table.list .col_Fixture_Set_New_Quantity__c {width: 100px;} */
      /* <!-- lightning改造   zyh   end --> */
    </style>
    <!-- add by rentx 20210729 end 新品收货_集中备品_建立新品入库标准配套 -->
    <apex:outputPanel id="checEventFrame">
@@ -189,7 +218,10 @@
                        j$(this).find("input[type=text]")[0].style.display = "None";
                    }else{
                        j$(this).find("input[type=text]")[0].readonly = true;
                        j$(this).append('<input type="button" style="width: auto;" class="inc btn" value="+" /><input type="button" style="width: auto;" class="dec btn" value="-" /> <input type="hidden" style="width: auto;" class="dec btn" value="'+oldValue+'" />');
                        // lightning改造   zyh   start
                        // j$(this).append('<input type="button" style="width: auto;" class="inc btn" value="+" /><input type="button" style="width: auto;" class="dec btn" value="-" /> <input type="hidden" style="width: auto;" class="dec btn" value="'+oldValue+'" />');
                        j$(this).append('<input type="button" style="width: 1.5rem; height: 22px; font-size: 18px; line-height: 20px; margin-top: 5px;" class="inc btn" value="+" /><input type="button" style="width: 22px; height: 22px; font-size: 18px; line-height: 20px; margin-top: 5px;" class="dec btn" value="-" /> <input type="hidden" style="width: auto;" class="dec btn" value="'+oldValue+'" />');
                        // lightning改造   zyh   end
                    }   
                i ++;
            });
force-app/main/default/pages/ReceivingNoteExamination.page
@@ -7,7 +7,7 @@
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.instascan)}"/>
<apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/>
<!-- <apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/> -->
<apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<script type="text/javascript">
@@ -98,13 +98,119 @@
</script>
<style type="text/css">
    .detail {
       margin-left:5px;
       width:310px;
    }
    .menu {
       padding:0px;
       border-left:1px solid #D1D1D1;
       border-right:1px solid #D1D1D1;
    }
    .menu h2{
       margin:0;
       padding:0;
       font-size:14px;
    }
    .menu h2 div {
        width: 308px;
        text-align: left;
        margin: 0;
        background:#DCDCDC;
    }
    .menu ul{
       margin:0;
       padding:1px;
       list-style: none;
       border-top:1px solid #ddd;
    }
    .menu li {
       padding:0;
       font-size:14px;
       line-height:1.0;
       height:23px;
       clear:both;
       /*border-bottom: 1px dotted #999;*/
    }
    .menu li span {
        width: 140px;
        text-align: right;
        float: left;
        margin: 5px 0px 0px 0px;
    }
    .menu li span span{
        text-align: left;
        margin-left: 3px;
        margin-top: 0px;
    }
    .commandbutton {
       font-size: 13px !important;
    }
    .tabsize {
       font-size: 14px !important;
    }
    .detailtab {
       font-size: 14px;
       margin-top: 0;
    }
    .detailhander {
       font-size: 16px;
    }
    .deliveryslip {
       font-size: 15px;
    }
    .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 */
    }
    /* Modal Content/Box */
    .modal-content {
       background-color: #fefefe;
       margin-left: 6px;
       margin-top: 100px;
       padding: 20px;
       border: 1px solid #888;
       width: 265px; /* Could be more or less, depending on screen size */
    }
    .freezehander {
       position: fixed;
       top: 0px;
       background-color:
       white;
       width: 320px;
       z-index: 1;
    }
    .menu div.m_title{
        border-top-left-radius:10px;
        border-top-right-radius:10px;
        text-align: left;
        margin: 0;
        padding: 1%;
        width: 98%;
        width: 100%;
        background:#DCDCDC;
        position: relative;
    }
@@ -186,7 +292,7 @@
        width: 400px;
    }
    .menu li .fieldname {
        width: 30%;
        width: 35%;
        text-align: right;
        float: left;
    }
@@ -198,7 +304,7 @@
    }
    .menu li {
        vertical-align: middle;
        margin: 5px 0;
        margin: 15px 0;
    }
    .commandbutton{
        width: 100px !important;
@@ -206,6 +312,9 @@
    }
    div.freezehander{
        width:500px;
    }
    .checkBox1{
        margin-bottom: 4px;
    }
</style>
@@ -273,12 +382,12 @@
                
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rnd.ReceivingNoteSummary__r.Id, false, true)}">
                    <hr/>
                    <apex:inputCheckbox id="summaryCheck" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/><h3 style="padding: 5px;" class="detailtab">{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/>&nbsp;&nbsp;&nbsp;到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext>&nbsp;&nbsp;&nbsp;汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
                    <h3 style="padding: 5px;" class="detailtab"><apex:inputCheckbox id="summaryCheck" styleClass="checkBox1" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/>{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/>&nbsp;&nbsp;&nbsp;到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext>&nbsp;&nbsp;&nbsp;汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" />
                </apex:outputPanel>
                    
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}" >
                    <apex:inputCheckbox id="summaryCheckS" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/><h3 style="padding: 5px;" class="detailtab">{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/>&nbsp;&nbsp;&nbsp;到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext>&nbsp;&nbsp;&nbsp;汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
                    <h3 style="padding: 5px;" class="detailtab"><apex:inputCheckbox id="summaryCheckS" styleClass="checkBox1" html-data-sumId="{!esdInfo.rnd.ReceivingNoteSummary__r.Id}" value="{!esdInfo.isChecked}"/>{!esdInfo.rnd.ReceivingNoteSummary__r.ReceivingNoteSummaryNo__c}:{!esdInfo.rnd.ReceivingNoteSummary__r.Fixture_Set__r.Name}<br/>&nbsp;&nbsp;&nbsp;到货日期: <apex:outputtext value="{0, date, yyyy/MM/dd}"><apex:param value="{!esdInfo.rnd.ReceivingNoteSummary__r.Received_Confirm_Date__c}" /></apex:outputtext>&nbsp;&nbsp;&nbsp;汇总结果: {!esdInfo.rnd.ReceivingNoteSummary__r.Inspection_result_F__c}</h3>
                </apex:outputPanel>
                    
                <div class="menu">
@@ -414,7 +523,10 @@
            userAgent = window.navigator.userAgent.toLowerCase(),
            safari = /safari/.test( userAgent ),
            ios = /iphone|ipod|ipad/.test( userAgent ),
            ver = (navigator.userAgent).match(/OS (\d)?\d_\d(_\d)?/i)[0].split('_')[0].replace("OS ","");
            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});
        scanner.addListener('scan', function (content) {
          filljsQR(content);
force-app/main/default/pages/ReceivingNoteList.page
@@ -1,5 +1,5 @@
<!--仿EquipmentSetSRList2.page-->
<apex:page Controller="ReceivingNoteListController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="收货清单配套一览">
<apex:page Controller="ReceivingNoteListController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="收货清单配套一览" lightningStylesheets="true">
<head>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
force-app/main/default/pages/ReceivingNoteListFirst.page
@@ -1,16 +1,35 @@
<apex:page controller="ReceivingNoteListFirstController" action="{!init}" showHeader="false" sidebar="false" id="allPage">
<apex:page controller="ReceivingNoteListFirstController" action="{!init}" showHeader="false" sidebar="false" id="allPage" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
</script>
<style type="text/css">
    table.list .col_Internal_asset_location__c {width:85px;}
    table.list .col_Sales_order_number__c {width:100px;}
    table.list .col_OrderCode__c {width:100px;}
    table.list .col_ApprovalNumber__c {width:100px;}
    table.list .col_Asset_loaner_category__c {width:70px;}
    table.list .col_DateOfDelivery__c {width:100px;}
    table.list .col_ReceivingNoteSummary_Cnt__c {width:80px;}
    table.list .col_ReceivingNoteNo_New__c {width:100px;}
    table.list .col_Data_Confirmation_Link__c {width:100px;}
    table.list .col_Data_Confirmation_Again_Link__c {width:100px;}
    table.list .col_ReceivingNotePDF_LINK__c {width:100px;}
    table.list .col_RN_Status__c {width: 100px;}
    table.list .col_ContactPerson__c {width: 100px;}
    body .bPageBlock .detailList .labelCol label{line-height: 24px;}
    body .bPageBlock .detailList .dataCol{
        width: 8%;
    }
</style>
<apex:form id="allForm">
        <!-- <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();"> -->
            <!-- <apex:param name="firstParam" assignTo="{!saveType}" value="" /> -->
force-app/main/default/pages/ReceivingNotePDF.page
@@ -41,7 +41,7 @@
            <!-- 合同编码 -->
            <td style="padding: 0;box-sizing: border-box;text-align:left;font-size:13px;width:13%;" colspan="1">合同编码:</td>
            <td style="padding: 0;box-sizing: border-box;text-align:left;font-size:13px;width:20%;" colspan="1">{!receivingNoteHeadShow.Sales_order_number__c}</td>
            <td rowspan="6" style="box-sizing: border-box;text-align:right" colspan="1"><img style="width: 90px; height: 90px;padding: 0px;margin-top: 0mm;" src="{!'/servlet/servlet.FileDownload?file=' + receivingNoteHeadShow.QRId__c}" /></td>
            <td rowspan="6" style="box-sizing: border-box;text-align:right" colspan="1"><img style="width: 90px; height: 90px;padding: 0px;margin-top: 0mm;" src="{!'/sfc/servlet.shepherd/version/download/' + receivingNoteHeadShow.QRId__c}" /></td>
        </tr>
        <tr>
            <!-- 订单编码 -->
force-app/main/default/pages/ReceivingNoteQRScan.page
@@ -1,5 +1,5 @@
<!--仿WebToEquipmentSetShippmentReceived.page-->
<apex:page showHeader="true" sidebar="true" id="allPage" title="web to app">
<apex:page showHeader="true" sidebar="true" id="allPage" title="web to app" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
force-app/main/default/pages/ReceivingNoteStockIn.page
@@ -1,5 +1,5 @@
<!--仿EquipmentSetShippmentReceived6.page-->
<apex:page Controller="ReceivingNoteStockInController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="收货清单入库">
<apex:page Controller="ReceivingNoteStockInController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="收货清单入库" lightningStylesheets="true">
<head>
    <meta name="format-detection" content="telephone=no"/>
</head>
@@ -178,10 +178,12 @@
        border-top-right-radius:10px;
        text-align: left;
        margin: 0;
        padding: 1%;
        width: 98%;
        /*20230725 ljh*/
        /*padding: 1%;*/
        /*width: 98%;*/
        background:#DCDCDC;
        position: relative;
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .checkintitle{
        position:absolute;
@@ -220,8 +222,9 @@
        color: #fff;
    }
    div.menu{
        margin-bottom: 20px;
        width: 490px;
        /*20230725 ljh*/
        /*margin-bottom: 20px; */
        /*width: 490px;*/
    }
    hr {
@@ -229,7 +232,9 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230725 ljh*/
        /*width: 90%;*/
        width: 98%;
    }
    .close {
        color: #aaaaaa;
@@ -253,31 +258,35 @@
    .menu{
        border:1px solid #a1a1a1;
        border-radius:10px;
        width: 400px;
        /*width: 400px;*//*20230725 ljh*/
    }
    .menu li .fieldname {
        width: 30%;
        line-height: 25px;
        /*20230725 ljh*/
        /*width: 30%;
        line-height: 25px;*/
        text-align: right;
        float: left;
    }
    .menu li .fieldvalue{
        width: 40%;
        line-height: 25px;
        /*20230725 ljh*/
        /*width: 40%;
        line-height: 25px;*/
        text-align: left;
        margin-left: 10px;
    }
    /*20230725 ljh*/
    .menu li {
        vertical-align: middle;
        height: 25px;
        margin: 5px 0;
        /*height: 25px;
        margin: 5px 0;*/
    }
    .commandbutton{
        width: 100px !important;
        margin-left: 20px !important;
    }
    div.freezehander{
        width:500px;
        /*width:500px;*//*20230725 ljh*/
    }
    }
</style>
@@ -307,18 +316,17 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" rerender="dummy" value="保存" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <!-- <apex:outputText value="(出库指示后取消)" style="color:red;" rendered="{!IF(SR_status='Received' && es.cancel_after_loaner_arranged__c, true, false)}"/> -->
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    状态切换btn
                    <th colspan="2" style="font-size:20px;text-align: center;width:500px;">
                        <ul id="Step_tab">
                            <li class="selected"><span class="tabsize">入库</span></li>
@@ -330,7 +338,37 @@
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy"/>
            </div>
            <div style="font-size: 14px;">缺少一对一入库:<apex:inputCheckbox value="{!forceSave}" /></div>
            <apex:outputPanel layout="none" rendered="{!isConsum}">
                <div style="font-size: 14px;background-color:yellow;display:inline;">⚠️已存在货架号信息时无法修改,请在新品收货完成后再修改。</div>
            </apex:outputPanel>
            <div style="font-size: 14px;">缺少一对一入库:<apex:inputCheckbox value="{!forceSave}" /></div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab" style="margin:0;">
                                <li class="selected"><span class="tabsize">入库</span></li>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" rerender="dummy" value="保存" disabled="{!saveBtnDisabled}"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </th>
                    </tr>
                </table>
                <apex:outputPanel layout="none" rendered="{!isConsum}">
                    <div style="font-size: 14px;background-color:yellow;display:inline;">⚠️已存在货架号信息时无法修改,请在新品收货完成后再修改。</div>
                </apex:outputPanel>
                <div style="font-size: 14px;">缺少一对一入库:<apex:inputCheckbox value="{!forceSave}" /></div>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -364,7 +402,9 @@
                    </div></h2>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <ul style="display:table text-align:center">
                    <!-- <ul style="display:table text-align:center"> -->
                    <!-- 20230722 ljh -->
                    <ul style="padding: 1px 0.75rem;" >
                        <li>
                            <span class="fieldname">明细No.</span>
                            <span class="fieldvalue">{!esdInfo.rec.ReceivingNoteDetailNo__c}</span>
@@ -428,13 +468,14 @@
                            <!-- 货架号 -->
                            <span class="fieldname">{!$ObjectType.Asset.fields.WH_location__c.label}</span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.WH_location__c =''}">
                                <apex:inputField id="WHlocation" value="{!esdInfo.rec.WH_location__c}" styleClass="fieldvalue" style="margin-top:5px;height:15px"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable && esdInfo.rec.WH_location__c ='')}">
                                <span class="fieldvalue">{!esdInfo.rec.WH_location__c}</span>
                            </apex:outputPanel>
                        </li>
                        <!-- qiu 改 -->
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" data-bar="{!esdInfo.rec.Barcode_F__c}">
                            <!-- 入库确认 -->
@@ -442,7 +483,7 @@
                            
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                                <!-- 可修改情况下的入库确认的checkbox -->
                                <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin-left:20px;margin-top:10px;" />
                                <span class="fieldvalue"><apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin-left:20px;margin-top:10px;" /></span>
                                <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt_F__c > 0 && esdInfo.onetoone}">
                                    <input type="hidden" name="onetoone" value="{!esdInfo.rec.ReceivingNoteSummary__c}"/>
@@ -450,17 +491,17 @@
                                <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt_F__c > 0 && esdInfo.rec.Is_Body_F__c}">
                                    <apex:variable var="main_loc" value="{!esdInfo.rec.WH_location__c}" />
                                    <input type="hidden" name="onetoone_main" value="{!esdInfo.rec.ReceivingNoteSummary__c}"/>
                                    <span class="fieldvalue"><input type="hidden" name="onetoone_main" value="{!esdInfo.rec.ReceivingNoteSummary__c}"/></span>
                                </apex:outputPanel>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                                <!-- 不可修改情况下的入库确认的checkbox -->
                                <apex:outputField value="{!esdInfo.rec.Arrival_in_wh__c}" />
                                <span class="fieldvalue">&nbsp;<apex:outputField value="{!esdInfo.rec.Arrival_in_wh__c}" /></span>
                       
                                <apex:outputPanel layout="none" rendered="{!esdInfo.rec.FSD_OneToOneAccessory_Cnt_F__c > 0 && esdInfo.rec.Is_Body_F__c}">
                                    <apex:variable var="main_loc" value="{!esdInfo.rec.WH_location__c}" />
                                    <span class="fieldvalue">&nbsp;<apex:variable var="main_loc" value="{!esdInfo.rec.WH_location__c}" /></span>
                                </apex:outputPanel>
                            </apex:outputPanel>
force-app/main/default/pages/ReceivingNoteStockInRequest.page
@@ -1,10 +1,11 @@
<apex:page controller="ReceivingNoteStockInRequestController" showHeader="false" action="{!init}" id="allPage">
<apex:page controller="ReceivingNoteStockInRequestController" showHeader="false" action="{!init}" id="allPage" 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.ReceivingNotePageCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <apex:form id="allForm">
        <style>
            table.headTable td   {
@@ -27,6 +28,9 @@
            }
            td.newed {
                color: #f00 !important;
            }
            .input90{
                width: 90%;
            }
        </style>
<script type="text/javascript">
@@ -152,7 +156,7 @@
                            </td>
                        </tr>
                    </table>
                    <table class="searchTable">
                    <table class="searchTable" style="margin-bottom: 5px; margin-top: 5px;">
                        <tr>
                            <td>
                                收货状态:
@@ -189,57 +193,53 @@
                    <table class="searchTable" style="width:100%">
                        <tr>
                            <td>
                            <td style="padding-top:5px;">
                                <!-- 所在地区(本部) -->
                                {!$ObjectType.Asset.fields.Salesdepartment__c.label}
                                <apex:inputField id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:inputField id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}"/> -->
                                <apex:inputField style="width:180px;" id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}"/>
                                <!-- lightning改造   zyh   end -->
                            </td>
                            <td>
                            <td style="padding-top:5px;">
                                <!-- 所在地区(省) -->
                                {!$ObjectType.Asset.fields.SalesProvince__c.label}
                                <apex:inputField id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:inputField id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}"/> -->
                                <apex:inputField style="width:180px;" id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}"/>
                                <!-- lightning改造   zyh   end -->
                            </td>
                            <td>
                            <td style="padding-top:5px;">
                                <span>
                                    <!-- 产品分类(GI/SP) -->
                                    {!$ObjectType.Asset.fields.Product_category__c.label}:
                                    <apex:inputField id="appProduct_category" value="{!pageB.assetInput.Product_category__c}"/>
                                    <!-- lightning改造   zyh   start -->
                                    <br />
                                    <!-- <apex:inputField id="appProduct_category" value="{!pageB.assetInput.Product_category__c}"/> -->
                                    <apex:inputField style="width:180px;" id="appProduct_category" value="{!pageB.assetInput.Product_category__c}"/>
                                    <!-- lightning改造   zyh   end -->
                                </span>
                            </td>
                            <td>
                            <td style="padding-top:5px;">
                                <span>
                                    <!-- 备品分类 -->
                                    {!$ObjectType.Asset.fields.Equipment_Type__c.label}:
                                    <apex:inputField id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}"/>
                                    <!-- lightning改造   zyh   start -->
                                    <br />
                                    <!-- <apex:inputField id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}"/> -->
                                    <apex:inputField style="width:180px;" id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}"/>
                                    <!-- lightning改造   zyh   end -->
                                </span>
                            </td>
                            <td>
                                <span>
                                    <!-- 管理种类 -->
                                    {!$ObjectType.Asset.fields.Manage_type__c.label}:
                                    <apex:inputField id="appManage_type" value="{!pageB.assetInput.Manage_type__c}"/>
                                </span>
                            </td>
                            <td>
                                <span>
                                    <!-- 无机身号码设备 -->
                                    {!$ObjectType.Asset.fields.unknow_serial_NO_product__c.label}:
                                    <apex:inputField id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}"/>
                                </span>
                            </td>
                            <td>
                                <span>
                                    <!-- 备品用途附属品 -->
                                    {!$ObjectType.Asset.fields.Loaner_accsessary__c.label}:
                                    <apex:inputField id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}"/>
                                </span>
                            </td>
                            <td>
                            <td rowspan="2">
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="编辑" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
                                    <apex:commandButton style="margin-top: 10px;" value="编辑" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="适用" onclick="applyJs();return false;"/>
                                    <apex:commandButton style="margin-top: 10px;" value="适用" onclick="applyJs();return false;"/>
                                    <script type="text/javascript">
                                    // 适用按钮
                                    function applyJs() {
@@ -488,19 +488,57 @@
                                    <apex:commandButton value="选择配套" action="{!selectRNS}"/>
                                </span> -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="保存" action="{!saveRecord}"/>
                                    <apex:commandButton style="margin-top: 10px;" value="保存" action="{!saveRecord}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="驳回" action="{!reject}"/>
                                    <apex:commandButton style="margin-top: 10px;" value="驳回" action="{!reject}"/>
                                </span>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- lightning改造   zyh   end -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton style="margin-top: 10px;" value="入库指示" action="{!inStockRequest}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="入库指示" action="{!inStockRequest}"/>
                                    <apex:commandButton style="margin-top: 10px;" value="打印收货清单" onclick="window.open('/apex/ReceivingNotePDF?rnid={!parId}');return false;"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="打印收货清单" onclick="window.open('/apex/ReceivingNotePDF?rnid={!parId}');return false;"/>
                                    <apex:commandButton style="margin-top: 10px;" value="返回" onclick="window.close();"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="返回" onclick="window.close();"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-top:5px;">
                                <span>
                                    <!-- 管理种类 -->
                                    {!$ObjectType.Asset.fields.Manage_type__c.label}:
                                    <!-- lightning改造   zyh   start -->
                                    <br />
                                    <!-- <apex:inputField id="appManage_type" value="{!pageB.assetInput.Manage_type__c}"/> -->
                                    <apex:inputField style="width:180px;" id="appManage_type" value="{!pageB.assetInput.Manage_type__c}"/>
                                    <!-- lightning改造   zyh   end -->
                                </span>
                            </td>
                            <td style="padding-top:5px;">
                                <span>
                                    <!-- 无机身号码设备 -->
                                    {!$ObjectType.Asset.fields.unknow_serial_NO_product__c.label}:
                                    <!-- lightning改造   zyh   start -->
                                    <br />
                                    <!-- <apex:inputField id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}"/> -->
                                    <apex:inputField style="width:180px;" id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}"/>
                                    <!-- lightning改造   zyh   end -->
                                </span>
                            </td>
                            <td style="padding-top:5px;">
                                <span>
                                    <!-- 备品用途附属品 -->
                                    {!$ObjectType.Asset.fields.Loaner_accsessary__c.label}:
                                    <!-- lightning改造   zyh   start -->
                                    <br />
                                    <!-- <apex:inputField id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}"/> -->
                                    <apex:inputField style="width:180px;" id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}"/>
                                    <!-- lightning改造   zyh   end -->
                                </span>
                            </td>
                        </tr>
@@ -594,7 +632,7 @@
                        <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
                            <td class="dataCellBorder1 intf {!info.value} col_{!info.value} {!IF(var.rnd['Change_Point__c']=='删除','deleted',IF(var.rnd['Change_Point__c']!=NULL,'newed',''))}" align="center">
                                <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && !contains(var.canNotChangeField, info.value) && pageB.fixMode && var.canChange && var.rnd['Change_Point__c']!='删除'}">
                                    <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')"/>
                                    <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')" styleClass="input90"/>
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!NOT((contains(var.canChangeField, info.value) || var.canChangeField == '') && !contains(var.canNotChangeField, info.value) && pageB.fixMode && var.canChange && var.rnd['Change_Point__c']!='删除')}">
                                    <apex:outputField value="{!var.rnd[info.value]}"/>
force-app/main/default/pages/ReceivingNoteSummarySelect.page
@@ -1,4 +1,4 @@
<apex:page controller="ReceivingNoteSummarySelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
<apex:page controller="ReceivingNoteSummarySelectController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<head>
<title>备品配套选择</title>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
@@ -6,6 +6,7 @@
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<script type="text/javascript">
var heightAjustment = 120;
@@ -40,7 +41,7 @@
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <table style="width:700px;">
                <table style="width:700px;margin-bottom:10px;">
                    <tr>
                        <td width="50px">关键字</td>
                        <td width="200px"><apex:inputText value="{!keyword}" style="width:98%;"/></td>
force-app/main/default/pages/ReceivingNoteWaitingReceipt.page
@@ -5,6 +5,33 @@
    <apex:stylesheet value="{!URLFOR($Resource.ReceivingNotePageCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style type="text/css">
        table.list .col_ReceivingNoteDetailNo__c {width:100px;}
        table.list .col_OT_CODE__c {width:100px;}
        table.list .col_Fixture_Model_No_F__c {width:100px;}
        table.list .col_Fixture_Model_Name_F__c {width:100px;}
        table.list .col_Fixture_Arrival_Process__c {width:100px;}
        table.list .col_Fixture_Arrival_Product__c {width:200px;}
        table.list .col_Internal_Asset_number_key__c {width:100px;}
        table.list .col_SerialNumber_Origin__c {width:100px;}
        table.list .col_SerialNumber__c {width:100px;}
        table.list .col_PeriodOfUse_Old_F__c {width:100px;}
        table.list .col_PeriodOfUse_Final__c {width:100px;}
        table.list .col_Packing_list_Fixture_F__c {width:100px;}
        table.list .col_RND_Status__c {width:100px;}
        table.list .col_Asset_loaner_category_F__c {width:100px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:100px;}
        table.list .col_Salesdepartment__c {width:100px;}
        table.list .col_SalesProvince__c {width:100px;}
        table.list .col_Product_category__c {width:100px;}
        table.list .col_Equipment_Type__c {width:100px;}
        table.list .col_Manage_type__c {width:100px;}
        table.list .col_unknow_serial_NO_product__c {width:100px;}
        table.list .col_Loaner_accsessary__c {width:100px;}
        table.list .col_Change_Point__c {width:100px;}
        /* table.list .noClick .col_DataConfirmation__c {width:100px;} */
    </style>
    <apex:form >
        <!-- 此处隐式生成二维码图片,防止PDF页上的二维码崩坏 -->
        <apex:includeScript value="{!URLFOR($Resource.qrcode)}"/>
@@ -20,28 +47,61 @@
                sforce.connection.sessionId = '{!GETSESSIONID()}';
                 // 20210312 you WLIG-BV8CHF start
                var record = sforce.connection.query("select id from Attachment where ParentId = \'{!pageB.rn.Id}\' and name = \'QRCode-{!pageB.rn.ReceivingNoteNo_New__c}\'");
                 // 20210312 you WLIG-BV8CHF end
               // var record = sforce.connection.query("select id from Attachment where ParentId = \'{!pageB.rn.Id}\' and name = \'QRCode-{!pageB.rn.ReceivingNoteNo_New__c}\'");
               var record = sforce.connection.query("select Id,ContentDocumentId from ContentDocumentLink where LinkedEntityId = \'{!pageB.rn.Id}\'");
                if(record.size > 0){
                    var records = record.getArray("records");
                    var idList = records.map(obj => "'" + obj.ContentDocumentId + "'").join(",");
                    record = sforce.connection.query("select Id from ContentDocument where Id in (" + idList + ") and Title =  \'QRCode-{!pageB.rn.ReceivingNoteNo_New__c}\'");
                }
                // 20210312 you WLIG-BV8CHF end
                // 不存在qr文件时,新生成一个,并连到清单上
                if (record.size == 0) {
                    var atta = new sforce.SObject("Attachment");
                    // 20210312 you WLIG-BV8CHF start
                    atta.Name = "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}";
                    // 20210312 you WLIG-BV8CHF end
                    atta.ParentId = "{!pageB.rn.Id}";
                    atta.Body = src;
                    var result = sforce.connection.create([atta]);
                    var version = new sforce.SObject("ContentVersion");
                    version.VersionData = src;
                    version.Title = "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}";
                    version.ContentLocation = 's';
                    version.PathOnClient= "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}.jpg";
                    var versionResult = sforce.connection.create([version]);
                    record = sforce.connection.query("SELECT ContentDocumentId FROM ContentVersion WHERE Id =\'" + versionResult[0].id + "\'");
                    var records = record.getArray("records");
                    var link = new sforce.SObject("ContentDocumentLink");
                    link.ContentDocumentId = records[0].ContentDocumentId;
                    link.LinkedEntityId = "{!pageB.rn.Id}";
                    link.ShareType = 'I';
                    link.Visibility = 'AllUsers';
                    var result = sforce.connection.create([link]);
                    // var atta = new sforce.SObject("Attachment");
                    // // 20210312 you WLIG-BV8CHF start
                    // atta.Name = "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}";
                    // // 20210312 you WLIG-BV8CHF end
                    // atta.ParentId = "{!pageB.rn.Id}";
                    // atta.Body = src;
                    // var result = sforce.connection.create([atta]);
                    var es = new sforce.SObject("ReceivingNote__c");
                    es.Id = "{!pageB.rn.Id}";
                    es.QRId__c = result[0].id;
                    es.QRId__c = versionResult[0].id;
                    result = sforce.connection.update([es]);
                // 存在qr时,绑到清单上
                } else {
                    var records = record.getArray("records");
                    var version = new sforce.SObject("ContentVersion");
                    version = sforce.connection.query("select Id,ContentDocumentId from ContentVersion where ContentDocumentId = \'" + records[0].id + "\'");
                    version = version.getArray("records");
                    var es = new sforce.SObject("ReceivingNote__c");
                    es.Id = "{!pageB.rn.Id}";
                    es.QRId__c = records[0].Id;
                    es.QRId__c = versionResult[0].id;
                    result = sforce.connection.update([es]);
                    // var records = record.getArray("records");
                    // var es = new sforce.SObject("ReceivingNote__c");
                    // es.Id = "{!pageB.rn.Id}";
                    // es.QRId__c = records[0].Id;
                    // result = sforce.connection.update([es]);
                }
            }
@@ -223,7 +283,8 @@
                            </td>
                        </tr>
                    </table>
                    <table class="searchTable">
                    <table class="searchTable" style="margin-bottom:5px;margin-top:5px;">
                        <!-- <tr> -->
                        <tr>
                            <td>
                                收货状态:
@@ -262,75 +323,60 @@
                    <table class="searchTable" style="width:100%">
                        <tr>
                            <td>
                            <td style="padding-top:5px;">
                                <!-- 所在地区(本部) -->
                                {!$ObjectType.ReceivingNoteDetail__c.fields.Salesdepartment__c.label}
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Salesdepartment__c.InlineHelpText}"/>
                                <apex:selectList id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}" size="1">
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!SalesdepartmentOps}"/>
                                </apex:selectList>
                            </td>
                                <!-- 所在地区(省) -->
                            <td>
                            <td style="padding-top:5px;">
                                {!$ObjectType.Asset.fields.SalesProvince__c.label}
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.SalesProvince__c.InlineHelpText}"/>
                                <apex:selectList id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}" size="1">
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!SalesProvinceOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                            <td style="padding-top:5px;">
                                <!-- 产品分类(GI/SP) -->
                                {!$ObjectType.Asset.fields.Product_category__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Product_category__c.InlineHelpText}"/>
                                <apex:selectList id="appProduct_category" value="{!pageB.assetInput.Product_category__c}" size="1">
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appProduct_category" value="{!pageB.assetInput.Product_category__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appProduct_category" value="{!pageB.assetInput.Product_category__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!ProductCategoryOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                            <td style="padding-top:5px;">
                                <!-- 备品分类 -->
                                {!$ObjectType.Asset.fields.Equipment_Type__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Equipment_Type__c.InlineHelpText}"/>
                                <apex:selectList id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}" size="1">
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!EquipmentTypeOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                                <!-- 管理种类 -->
                                {!$ObjectType.Asset.fields.Manage_type__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Manage_type__c.InlineHelpText}"/>
                                <apex:selectList id="appManage_type" value="{!pageB.assetInput.Manage_type__c}" size="1">
                                    <apex:selectOptions value="{!ManageTypeOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                                <!-- 无机身号码设备 -->
                                {!$ObjectType.Asset.fields.unknow_serial_NO_product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.unknow_serial_NO_product__c.InlineHelpText}"/>
                                <apex:selectList id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}" size="1">
                                    <apex:selectOptions value="{!UnknowSerialNOProductOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                                <!-- 备品用途附属品 -->
                                {!$ObjectType.Asset.fields.Loaner_accsessary__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Loaner_accsessary__c.InlineHelpText}"/>
                                <apex:selectList id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}" size="1">
                                    <apex:selectOptions value="{!LoanerAccsessaryOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                                <!-- 备品入库产品 -->
                                {!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.InlineHelpText}"/>
                                <apex:inputField id="appLoaner_fixture_arrival_product" value="{!rndInfo[0].Fixture_Arrival_Product__c}"/>
                                <!-- value="{!pageB.assetInput.Fixture_Arrival_Product__c}" -->
                            </td>
                            <td>
                            <td rowspan="2">
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="编辑" onclick="blockme();" action="{!changeFixModel}" reRender="allForm,checEventFrame" oncomplete="unblockUI();windowResize();"/><!-- 20210804 ljh add checEventFrame -->
                                    <apex:commandButton value="编辑" style="margin-top: 10px;" onclick="blockme();" action="{!changeFixModel}" reRender="allForm,checEventFrame" oncomplete="unblockUI();windowResize();"/><!-- 20210804 ljh add checEventFrame -->
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="适用" onclick="applyJs();return false;"/>
                                    <apex:commandButton value="适用" style="margin-top: 10px;" onclick="applyJs();return false;"/>
                                    <script type="text/javascript">
                                    // 适用按钮
                                    function applyJs() {
@@ -559,20 +605,77 @@
                                </script>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="选择配套" action="{!selectRNS}" rendered="{!showSelectRnsButton}"/>
                                    <apex:commandButton value="保存" style="margin-top: 10px;" onclick="blockme();" action="{!saveRecord}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="型号提醒邮件" onclick="return setEmailBody();" />
                                    <apex:commandButton value="返回" style="margin-top: 10px;" onclick="window.close();"/>
                                </span>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- lightning改造   zyh   end -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="选择配套" style="margin-top: 10px;" action="{!selectRNS}" rendered="{!showSelectRnsButton}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="保存" onclick="blockme();" action="{!saveRecord}"/>
                                    <apex:commandButton value="型号提醒邮件" style="margin-top: 10px;" onclick="return setEmailBody();" />
                                </span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <br /> -->
                                <!-- lightning改造   zyh   end -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="打印收货清单" onclick="window.open('/apex/ReceivingNotePDF?rnid={!parId}');return false;"/>
                                    <apex:commandButton value="打印收货清单" style="margin-top: 10px;" onclick="window.open('/apex/ReceivingNotePDF?rnid={!parId}');return false;"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="返回" onclick="window.close();"/>
                                </span>
                            </td>
                        <!-- lightning改造   zyh   start -->
                        </tr>
                        <tr>
                        <!-- lightning改造   zyh   end -->
                            <td style="padding-top:5px;">
                                <!-- 管理种类 -->
                                {!$ObjectType.Asset.fields.Manage_type__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Manage_type__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appManage_type" value="{!pageB.assetInput.Manage_type__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appManage_type" value="{!pageB.assetInput.Manage_type__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!ManageTypeOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 无机身号码设备 -->
                                {!$ObjectType.Asset.fields.unknow_serial_NO_product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.unknow_serial_NO_product__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!UnknowSerialNOProductOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 备品用途附属品 -->
                                {!$ObjectType.Asset.fields.Loaner_accsessary__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Loaner_accsessary__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!LoanerAccsessaryOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 备品入库产品 -->
                                {!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:inputField id="appLoaner_fixture_arrival_product" value="{!rndInfo[0].Fixture_Arrival_Product__c}"/> -->
                                <apex:inputField style="width:180px;" id="appLoaner_fixture_arrival_product" value="{!rndInfo[0].Fixture_Arrival_Product__c}"/>
                                <!-- lightning改造   zyh   end -->
                                <!-- value="{!pageB.assetInput.Fixture_Arrival_Product__c}" -->
                            </td>
                        </tr>
                    </table>
@@ -676,7 +779,7 @@
                                    </apex:outputPanel>
                                    <!-- <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')" rendered="{!info.value != 'Asset_loaner_category__c' || var.haveAsset }" style="{!IF('Fixture_Arrival_Product__c' == info.value, 'width:70%;', '')}"/> -->
                                    <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')" rendered="{!(info.value != 'Asset_loaner_category__c' || var.haveAsset) && ((var.rnd['Asset_loaner_category_F__c'] =='固定资产' && info.value != 'unknow_serial_NO_product__c' && info.value != 'Manage_type__c') || var.rnd['Asset_loaner_category_F__c'] !='固定资产')}" style="{!IF('Fixture_Arrival_Product__c' == info.value, 'width:70%;', '')}"/>
                                    <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')" rendered="{!(info.value != 'Asset_loaner_category__c' || var.haveAsset) && ((var.rnd['Asset_loaner_category_F__c'] =='固定资产' && info.value != 'unknow_serial_NO_product__c' && info.value != 'Manage_type__c') || var.rnd['Asset_loaner_category_F__c'] !='固定资产')}" style="{!IF('Fixture_Arrival_Product__c' == info.value || 'EquipmentSet_Managment_Code__c' == info.value, 'width:90%;', '')}"/>
                                    <!-- 20210804 ljh add id -->
                                <!-- update by rentx 20210727 end 新品收货_集中备品_建立数据逻辑限制  -->
                                </apex:outputPanel>
force-app/main/default/pages/RentalAgencyReceived.page
@@ -1,10 +1,11 @@
<!-- 20230427 zq <apex:page controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处欠品确认"> -->
    <apex:page lightningStylesheets = "true" controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处欠品确认">
    <apex:page lightningStylesheets="true" controller="RentalAgencyReceivedController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处欠品确认">
        <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:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
        <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230525 ljh lightning  -->
    <style type="text/css">
        .hideDropdown select{
            display: none
@@ -32,6 +33,19 @@
           right: 5%;
           position: absolute;
           width: 200px;
        }
        .contTab{
            overflow: hidden;
        }
        table.list td{
            width: 16%!important;
            border: 1px solid #ededed!important;
        }
        table.list td.col_chk{
            width: 5%!important;
        }
        .contTab tr td.col_stockin{
            display: table-cell;
        }
        table.list td{
            width:100px;
@@ -224,7 +238,7 @@
        </div>
        <apex:outputPanel id="detail">
            <div id="in_Div_L">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
                <table class="list contTab" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
                    <apex:variable value="{!0}" var="Cnt" />
                        <apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
                            <tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.hidden,'display: none','')}">
force-app/main/default/pages/RentalApplyCancel.page
@@ -5,6 +5,16 @@
        <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
        <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
        <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
        <style>
            body .detailList .dataCol select{
                width: 150px;
                min-width: 150px;
            }
            body .detailList .dataCol input{
                width: 150px;
                min-width: 150px !important;
            }
        </style>
        <script type="text/javascript">
            function back() {
                window.opener.parent.location.href = "/{!ra.Id}";
@@ -66,6 +76,7 @@
                </apex:pageBlockSectionItem>
                <!-- 20210207 ljh  SWAG-BXVDPJ update  end-->
            </apex:pageBlockSection>
            <input type="hidden" name="hide"/>
            <apex:commandButton value="取消" action="{!saveCancel}" oncomplete="checkSaveStatus();changeReasonJs();unblockUI();" onclick="blockme();" rerender="allForm" />
            <apex:commandButton value="返回" onclick="back();" rerender="allForm" oncomplete="unblockUI();" />
        </apex:pageBlock>
force-app/main/default/pages/RentalApplyExtensions.page
@@ -9,12 +9,12 @@
        <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
        <!-- 20230614 ljh lightning start -->
        <style type="text/css">
            table.list .col_Name  {width:150px;}
            table.list .col_First_RAESD_Model_No_F__c  {width:100px;}
            table.list .col_Name  {width:200px;}
            table.list .col_First_RAESD_Model_No_F__c  {width:140px;}
            table.list .col_Set_Managment_Code__c  {width:90px;}
            table.list .col_SerialNumber_F__c  {width:80px;}
            table.list .col_Loaner_Set_No__c  {width:90px;}
            table.list .col_RAES_Status__c  {width:90px;}
            table.list .col_RAES_Status__c  {width:150px;}
            body .pbSubsection{
                padding-bottom: 0;
                padding-top: 0;
force-app/main/default/pages/RentalApplyExtensions.page.bak
New file
@@ -0,0 +1,56 @@
<!--20230420 zq 加壳  <apex:page controller="RentalApplyExtensionsController" showHeader="false" sidebar="false" action="{!init}" id="allPage" > -->
<apex:page controller="RentalApplyExtensionsController" showHeader="false" sidebar="false" action="{!init}" id="allPage" lightningStylesheets="true">
    <head>
        <title>备品借出申请延期</title>
        <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
        <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
        <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
        <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
        <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
        <!-- 20230614 ljh lightning start -->
        <style type="text/css">
            table.list .col_Name  {width:150px;}
            table.list .col_First_RAESD_Model_No_F__c  {width:100px;}
            table.list .col_Set_Managment_Code__c  {width:90px;}
            table.list .col_SerialNumber_F__c  {width:80px;}
            table.list .col_Loaner_Set_No__c  {width:90px;}
            table.list .col_RAES_Status__c  {width:90px;}
            body .pbSubsection{
                padding-bottom: 0;
                padding-top: 0;
            }
            body .pbSubsection > .detailList:first-child{
                margin-top: 0;
            }
        </style>
        <!-- 20230614 ljh lightning end -->
    </head>
    <apex:form id="allForm">
        <apex:outputPanel id="message">
            <apex:pageMessages />
        </apex:outputPanel>
        <apex:actionFunction name="submitExtensionRequest" action="{!submitExtensionRequest}" rerender="allForm" oncomplete="unblockUI();"/>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockSection title="备品借出申请" id="mainSection">
                </apex:pageBlockSection>
                <table style="width:800px;float:right;margin-top: 8px" >
                    <tr>
                        <td style="width:450px;">
                            <apex:commandButton value="提交延期申请" onclick="if (window.confirm('是否提交延期申请?')) {blockme(); submitExtensionRequest();}return false;"/>
                        </td>
                        <td style="width:450px;">
                            <apex:outputPanel rendered="{!if( buttonFlag , 'true','false')}" >
                                <input type="submit" value="关闭" class="btn" onclick="window.close();"/>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!if( buttonFlag , 'false','true')}" >
                                <apex:commandButton value="返回" action="{!comeBack}" />
                            </apex:outputPanel>
                        </td>
                    </tr>
                </table>
            </apex:pageBlock>
            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="false"/>
        </apex:outputPanel>
    </apex:form>
</apex:page>
force-app/main/default/pages/RentalApplyJump.page
@@ -94,6 +94,7 @@
                </apex:column>
            </apex:dataTable>
            <div style="height: 15px"></div>
            <input type="hidden" name="hide"/>
            <apex:commandButton value="确认插队" action="{!saveJump}" oncomplete="alertSuccess();checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
            <apex:commandButton value="返回" onclick="back(); return false;" rerender="allForm" oncomplete="unblockUI();" />
          </apex:pageBlock>
force-app/main/default/pages/RentalApplyList.page
@@ -1,4 +1,4 @@
<apex:page showHeader="true" sidebar="true" lightningStylesheets="true">
<apex:page showHeader="true" sidebar="true" action="{!init}" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
@@ -13,102 +13,120 @@
            }
        </style>
    </head>
<!-- Begin Default Content REMOVE THIS -->
<ul style="margin : 0 auto;">
    <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li>
    <hr />
    <li><a href="#" onclick="javascript:window.open('/apex/ReceivingNoteQRScan','','height=500, width=500, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">ReceivingNoteQRScan</a></li>
    <hr />
    <li><a href="/apex/EquipmentRentalExtend" target="_blank">查询借出中备品</a></li>
    <hr />
    <li><a href="/apex/RentalApplySequence" target="_blank" >备品排队查看</a></li>
    <hr />
    <li><a href="/00O10000006Ryck" target="_blank" >待CDS的备品一览</a></li>
    <hr />
    <li><a href="/apex/NotReceivingNoteListFirst" target="_blank" >非集中备品收货清单一览</a></li>
    <hr />
    <li><a href="/00O10000006RycG" target="_blank" >欠品历史一览</a></li>
    <hr />
    <li><a href="/00O10000006Rycp" target="_blank" >需要上架的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006Rycz" target="_blank" >待修理的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006Rycf" target="_blank" >今天返回的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006Rycu" target="_blank" >今天入库的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006Ryd4" target="_blank" >现地备品月报一览</a></li>
    <hr />
    <li><a href="/00O10000006RycV" target="_blank" >待下架备品一览</a></li>
    <hr />
    <li><a href="/00O10000006RycL" target="_blank" >等待分配备品借出申请一览</a></li>
    <hr />
    <li><a href="/00O10000006Ryca" target="_blank" >待发货备品一览</a></li>
    <hr />
    <li><a href="/00O10000006Rydx" target="_blank" >主单已完了从单未结束</a></li>
    <hr />
    <li><a href="/00O10000006S0G6" target="_blank" >待上架一览</a></li>
    <hr />
    <li><a href="/00O100000058Dmv" target="_blank" >待上架备品SET一览</a></li>
    <hr />
    <li><a href="/00O10000006S0LV" target="_blank" >待废弃备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0LU" target="_blank" >从单结束主单还未回寄</a></li>
    <hr />
    <li><a href="/00O10000004fNn9" target="_blank" >出库前检测NG备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0EQ" target="_blank" >待回寄备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O10000004fNnD" target="_blank" >待发货备品一览</a></li>
    <hr />
    <li><a href="/00O10000004fNn8" target="_blank" >待出库前检测备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0DS" target="_blank" >待下架备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O10000006S0G9" target="_blank" >待欠品确认备品一览</a></li>
    <hr />
    <li><a href="/00O1000000663fT" target="_blank" >需要出库指示的耗材一览</a></li>
    <hr />
    <li><a href="/00O10000006S0G3" target="_blank" >待CDS的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0G4" target="_blank" >待入库前检测备品一览</a></li>
    <hr />
    <li><a href="/00O10000005WAsg" target="_blank" >冻结的备品一览</a></li>
    <hr />
    <li><a href="/00O10000005WAsk" target="_blank" >待修理的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0ES" target="_blank" >待CDS的备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O10000005WAsl" target="_blank" >待重新分配备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0G2" target="_blank" >待下架备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0ER" target="_blank" >待到货确认备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O10000006S0G5" target="_blank" >待发货备品一览</a></li>
    <hr />
    <li><a href="/00O1000000542K6" target="_blank" >需要上架的备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0G8" target="_blank" >欠品历史一览</a></li>
    <hr />
    <li><a href="/00O10000006S0EU" target="_blank" >需要上架的备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O1000000663hP" target="_blank" >查询借出中耗材</a></li>
    <hr />
    <li><a href="/00O10000005WAsd" target="_blank" >今天追加的附属品一览</a></li>
    <hr />
    <li><a href="/00O10000005WAsm" target="_blank" >待下架备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0G7" target="_blank" >待修理一览</a></li>
    <hr />
    <li><a href="/00O10000006S0GA" target="_blank" >待出库前检测备品一览</a></li>
    <hr />
    <li><a href="/00O10000006S0ET" target="_blank" >待发货备品一览(现地)</a></li>
    <hr />
    <li><a href="/00O10000005nYfh" target="_blank" >犯规点数一览</a></li>
    <hr />
    <li><a href="/00O1000000663hK" target="_blank" >备品中心耗材月报一览</a></li>
<!-- <li>window.open('/apex/WebToEquipmentSetShippmentReceived','','height=700, width=1000, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')</li> -->
</ul>
<!-- End Default Content REMOVE THIS -->
    <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
    <apex:form id="allForm">
        <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
            <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
            <apex:pageMessages />
            <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
        </apex:outputPanel>
        <ul style="margin : 0 auto;">
            <li><a href="" onclick="toURLPreJs('SS_OPDPlan');return false;" target="_blank" >OPD计划排序(拍照)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('OPDPlan_Real_Time');return false;" target="_blank" >OPD计划排序(实时)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_Assign_list');return false;" target="_blank" >等待分配备品借出申请一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Queue_Schedule_List1');return false;" target="_blank" >    排队的备品一览</a></li>
            <hr />
            <li><a href="/apex/RentalApplySequence" target="_blank" >备品排队查看</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_Resign_List');return false;" target="_blank" >待重新分配备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Del_Cancel_RequestList');return false;" target="_blank" >删除/取消修理的备品申请一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Consume_Need_ShipCommand');return false;" target="_blank" >需要出库指示的耗材一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_StockDown_List');return false;" target="_blank" >待下架备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Link_BeforeShipSet');return false;" target="_blank" >待出库前检测备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('keep_ship_set');return false;" target="_blank" >待发货备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('UploadedSignList_new1');return false;" target="_blank" >上传签收单一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Today_Planned_ReturnSETList');return false;" target="_blank" >今天返回的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Wait_Back_CDS');return false;" target="_blank" >待CDS的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Wait_Back_Detection');return false;" target="_blank" >待回收后检测的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('EquipmentSet_CheckNG_List');return false;" target="_blank" >回收后检测NG报废一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Link_NeedShelfSetlist');return false;" target="_blank" >需要上架的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Today_Stored_Set_List');return false;" target="_blank" >今天入库的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Repair_Asset_Lists');return false;" target="_blank" >维修中备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('ThrowAway_Set_List');return false;" target="_blank" >报废备品一览(个体管理)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('LostSetDetailList');return false;" target="_blank" >欠品历史一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Freeze_Asset_List');return false;" target="_blank" >冻结的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_Repair_List');return false;" target="_blank" >待修理的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_Abandon_List');return false;" target="_blank" >待废弃备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Asset_loaner_token_photo');return false;" target="_blank" >已拍照固定资产数量分析</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('ENERGY_LIST_training_internal');return false;" target="_blank" >Energy培训已参加LIST</a></li>
            <hr />
            <li><a href="#" onclick="javascript:window.open('/apex/WebToEquipmentSetShippmentReceived','','height=500, width=1000, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">Loaner_ship_return_manage</a></li>
            <hr />
            <li><a href="/apex/EquipmentRentalExtend" target="_blank">查询借出中备品</a></li>
            <hr />
            <li><a href="/lightning/o/Monthly_Report__c/new?defaultFieldValues=
                TongkuoZongjian__c={!URLENCODE(infoList.TongkuoZongjian__c)},
                ZongjianApprovalManager__c={!URLENCODE(infoList.ZongjianApprovalManager__c)},
                BuchangApprovalManagerSales__c={!URLENCODE(infoList.BuchangApprovalManagerSales__c)},
                BuchangApprovalManager__c={!URLENCODE(infoList.BuchangApprovalManager__c)}" target="_blank" >新建周报</a></li>
            <hr />
            <li><a href="/00O1000000588tQ" onclick="" target="_blank" >我的周报一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Monthly_report_set');return false;" target="_blank" >备品中心月报一览</a></li>
            <hr />
            <li><a href="https://adfs.olympus.com.cn/EnrollmentServer/otaprofile/" target="_blank" >移动设备注册</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Add_Accessory_List');return false;" target="_blank" >今天追加的附属品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('All_OutOfRule_New');return false;" target="_blank" >犯规点数一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Inventory_Report_History');return false;" target="_blank" >查看盘点报告书</a></li>
            <hr />
            <li><a href="/apex/ReceivingNoteListFirst" target="_blank" >集中备品收货清单一览</a></li>
            <hr />
            <li><a href="/apex/NotReceivingNoteListFirst" target="_blank" >非集中备品收货清单一览</a></li>
            <hr />
            <li><a href="#" onclick="javascript:window.open('/apex/ReceivingNoteQRScan','','height=500, width=750, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')">ReceivingNoteQRScan</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('FirstIsOverButSecondNotEnd');return false;" target="_blank" >主单已完了从单未结束</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('SecondEndMainNotBack');return false;" target="_blank" >从单结束主单还未回寄</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_BJ');return false;" target="_blank" >未处理的备品减价修理报价(北京)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_GZ');return false;" target="_blank" >未处理的备品减价修理报价(广州)</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('InProcessCutDiscountApproval_Report_SH');return false;" target="_blank" >未处理的备品减价修理报价(上海)</a></li>
        </ul>
    </apex:form>
</apex:page>
force-app/main/default/pages/RentalApplySequence.page
@@ -73,6 +73,10 @@
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 20230802 ljh */
    body .bPageBlock .detailList .dataCol{
        width: 8%;
    }
</style>
<script>
    // 滚轴是否显示
force-app/main/default/pages/RentalApplySequence.page.bak
New file
@@ -0,0 +1,452 @@
<!--
 * @Description: 备品排队展示包含队列信息和序列信息
 * @Author: [lijinhuan]
 * @Date: 2021-10-26 14:15:03
 * @LastEditors: [lijinhuan]
 * @LastEditTime: 2023-06-06 13:04:33
-->
<!-- 20230522 ljh lightning  -->
<!-- <apex:page controller="RentalApplySequenceController"  showHeader="false" sidebar="false" id="allPage" action="{!init}" title="排队查看"> -->
<apex:page controller="RentalApplySequenceController"  showHeader="false" sidebar="false" id="allPage" action="{!init}" title="排队查看" 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)}"/><!-- 20230525 ljh lightning  -->
<style type="text/css">
    .hideDropdown select{
        display: none
    }
    .table-head{padding-right:17px;}
    .tablehead0{padding-right:0;}
    .table-body table tr:nth-child(2n){background-color:#f2f2f2;}
    /*以下是下拉复选框的样式  start*/
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .nav {
        width: 180px;/*20230606 ljh*/
        line-height: 30px;/*20230606 ljh*/
        /* border: 1px solid #000; *//*20230610 ljh*/
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        margin: 0;
        z-index: 9999;
        display: inline-block;
        border-radius: 0.25rem;/*20230607 ljh*/
        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
    }
    ul,
    li {
        list-style: none;
    }
    .nav li input {
        margin: 0px 3px 0px 3px;
    }
    .nav li p:hover {
        background: #1e90ff;
        color: #fff;
    }
    .nav_a li input {
        margin: 0px 3px 0px 3px;
    }
    .nav_a li p:hover {
        background: #1e90ff;
        color: #fff;
    }
    #classification {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #classification_a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
<script>
    // 滚轴是否显示
    window.onload = function gunzhou(){
    // window.onload = () => {
        gzShow();
    }
    function gzShow(){
        // console.log(j$('#tablebody').height());
        if(j$('#tablebody').height() >= 270){
            j$('#table-head').addClass("table-head");
        }else{
            j$('#table-head').addClass("tablehead0");
        }
    }
    //下拉多选框  strat
    j$(document).bind("click",function(e){
        var e = e || window.event;    //事件对象,兼容IE
        var target = e.target || e.srcElement;  //源对象,兼容火狐和IE
        while(target){
            // console.log(target.id);
            if (target.id && (target.id == "nav" ||target.id == "nav_a")){
             //循环判断至根节点,防止点击的是#selected和它的子元素
                return;
            }
           target = target.parentNode;
        }
        j$("#selectCheckId").hide();   //点击的不是#selected和它的子元素,隐藏下拉菜单
        j$("#selectCheckId_a").hide();
    })
    //选择备品存放地 下拉框值有变动以后触发
    function selectCunFangDiJs(Obj){
        var selectId = Obj.value;
        //如果备品存放地选择无
        // console.log('00:'+selectId);
        //消除选择的其他选项
        if(j$("#classification").children().text() != "--无--"){
            j$("#classification").children().remove();
            j$("#classification").append("<span class='valClass_CF' id='initial'>--无--</span>");
        }
        var inputObj = j$(".li-input");
        if(inputObj != null){
            for(var i = 0; i < inputObj.length;i++){
                if(inputObj[i].checked){
                    inputObj[i].checked = false;
                }
            }
        }
        j$("#selectCheckId").show();
        // j$("#selectCheckId_a").hide();
    }
    //点击 本部选择
    function selectBenBu(obj,name){
        var checked1 = j$(obj).prop("checked");
        if (checked1 == true) {
            j$("#classification").children("#initial").remove();
            var idTemp = j$(obj).value().trim();
            idTemp = 'Id'+idTemp.split('.')[0];
            j$("#classification").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
                .value().trim() + ",") + "</span>");
        } else {
            var idTemp = 'Id'+name.split('.')[0];
            j$("#classification").children("#" + (idTemp)).remove();
            var length = j$("#classification").html().length;
            if (length === 0) {
                j$("#classification").append("<span class='valClass' id='initial'>--无--</span>");
            }
        }
        var optioncheck = j$(".valClass");
        var hint = '';
        for(var i = 0;i<optioncheck.length;i++){
            if(optioncheck[i].innerText != '--无--'){
                hint +=optioncheck[i].innerText;
            }
        }
        // console.log(hint);
        j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyBB:S_ApplyBenBu')).val(hint);
    }
    function navClose(){
        j$("#selectCheckId").toggle();
    }
    // 办事处点击选择
    function selectAgency(obj,name){
        var checked1 = j$(obj).prop("checked");
        if (checked1 == true) {
            j$("#classification_a").children("#initial_a").remove();
            var idTemp = j$(obj).value().trim();
            idTemp = 'Id'+idTemp.split('.')[0];
            j$("#classification_a").append("<span class='valClass_a' id='" + (idTemp) + "'>" + (j$(obj)
                .value().trim() + ",") + "</span>");
        } else {
            var idTemp = 'Id'+name.split('.')[0];
            j$("#classification_a").children("#" + (idTemp)).remove();
            var length = j$("#classification_a").html().length;
            if (length === 0) {
                j$("#classification_a").append("<span class='valClass_a' id='initial_a'>--无--</span>");
            }
        }
        var optioncheck = j$(".valClass_a");
        var hint = '';
        for(var i = 0;i<optioncheck.length;i++){
            if(optioncheck[i].innerText != '--无--' ){
                hint +=optioncheck[i].innerText;
            }
        }
        j$(escapeVfId('allPage:allForm:searchBlock:mainSection:ApplyAA:S_Agency')).val(hint);
    }
    function navClose_a(){
        j$("#selectCheckId_a").toggle();
    }
    function searchJs() {
        blockme();
        searchfunc();
    }
    function checkEventJs(obj){
        blockme();
        j$(escapeVfId('allPage:allForm:checkEventId')).val(obj);
        checkEvent();
    }
</script>
<apex:form id="allForm">
    <apex:actionFunction name="changeCunfangdi" rerender="S_bieBenBuApply" oncomplete="unblockUI();"/>
    <!-- <apex:actionFunction name="changebenbu" rerender="S_AgencyApply" oncomplete="unblockUI();"/> -->
    <apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="MySequence,checEventFrame" onComplete="gzShow();unblockUI();"/>
    <apex:actionFunction name="recordNumChangeAction" action="{!recordNumChange}" rerender="MySequence" oncomplete="unblockUI();">
    </apex:actionFunction>
    <apex:actionFunction name="checkEvent" action="{!checkEvent}" rerender="checEventFrame" oncomplete="window.scrollTo(0, 200);unblockUI();">
    </apex:actionFunction>
    <apex:inputHidden id="checkEventId" value="{!checkEventId}" />
    <apex:pageBlock id="searchBlock" title="查看排队情况">
        <apex:pageBlockSection title="检索" id="mainSection" columns="4"  >
             <apex:pageBlockSectionItem >
                <apex:outputLabel value="申请单号" />
                <apex:inputText id="S_raName" value="{!S_raName}"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="型号" />
                <apex:inputText id="S_Fixture_Model_No" value="{!S_Fixture_Model_No}"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="备品出借担当" />
                <apex:inputField id="S_Person_In_Charge" value="{!S_Ra_Person.Person_In_Charge__c}" styleClass="hideDropdown" />
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}">
                <apex:outputLabel for="S_bieBenBu" value="队列所在地区本部" />
                <apex:inputText id="S_bieBenBu" value="{!S_bieBenBu}"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}">
                <apex:outputLabel for="S_bieCunFangDi" value="备品存放地" />
                <apex:selectList value="{!S_bieCunFangDi}"  onchange="blockme(); changeCunfangdi();selectCunFangDiJs(this);return false;" size="1" style="width:160px" id="S_bieCunFangDi">
                <apex:selectOptions value="{!bieCunFangDiOps}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem rendered="{!!isEquipmentCenter}"></apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="ApplyBB">
                <apex:outputLabel for="S_bieBenBuApply" value="申请人所属本部" />
                <apex:outputPanel style="position: absolute; " id="S_bieBenBuApply">
                    <apex:inputHidden id="S_ApplyBenBu" value="{!S_ApplyBenBu}" />
                    <ul class="nav" id="nav" style="background-color: #FFFFFF;left:0px;">
                        <li id="classification" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose();return false;">
                            <span id="initial">--无--</span>
                        </li>
                        <li id="selectCheckId" style="margin-left:0px;display: none;">
                            <ul style="margin-left:0px;">
                            <apex:repeat value="{!SApplyBenBu}" var="orr" id="selSD">
                            <li class="sdclass" style="margin-left:0px">
                                <p class="ul-nav" name="cate_id[]" >
                                    <input type="checkbox" value="{!orr.parameterName}" class="li-input" onclick="selectBenBu(this,'{!orr.parameterName}');" style="display: inline-block;vertical-align: middle;" />
                                    <font style="">{!orr.parameterName}</font>
                                </p>
                            </li>
                            </apex:repeat>
                            </ul>
                        </li>
                    </ul>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="ApplyAA" >
                <apex:outputLabel for="S_AgencyApply" value="申请者办事处" />
                <apex:outputPanel style="position: absolute; " id="S_AgencyApply">
                <apex:inputHidden id="S_Agency" value="{!S_Agency}" />
                <ul class="nav" id="nav_a" style="background-color: #FFFFFF;left:0px;">
                    <li id="classification_a" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_a();return false;">
                        <span id="initial_a">--无--</span>
                    </li>
                    <li id="selectCheckId_a" style="margin-left:0px;display: none;">
                        <ul style="margin-left:0px;">
                        <apex:repeat value="{!SApplyAgency}" var="orr" id="selSD">
                        <li class="sdclass" style="margin-left:0px">
                            <p class="ul-nav" name="cate_id[]" >
                                <input type="checkbox" value="{!orr.parameterName}" class="li-input" onclick="selectAgency(this,'{!orr.parameterName}');" style="display: inline-block;vertical-align: middle;" />
                                <font style="">{!orr.parameterName}</font>
                            </p>
                        </li>
                        </apex:repeat>
                        </ul>
                    </li>
                </ul>
            </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}" >
                <apex:outputLabel for="S_bieBeiPinFenLei" value="备品分类" />
                    <apex:selectList value="{!S_bieBeiPinFenLei}" size="1" id="bieBeiPinFenLei" style="width:180px">
                        <apex:selectOptions value="{!bieBeiPinFenLeiOps}"/>
                    </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem rendered="{!isEquipmentCenter}" >
                <apex:outputLabel for="S_Product_category" value="产品分类(GI/SP)" />
                <apex:selectList value="{!S_Product_category}" size="1" style="width:60px" id="S_Product_category">
                <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:commandButton style="" value="检索" onclick="searchJs(); return false;"/>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <!-- 数据 -->
    </apex:pageBlock>
    <apex:pageBlock id="MySequence">
    <apex:outputPanel id="message">
        <apex:pageMessages />
    </apex:outputPanel>
    <apex:pageBlockButtons location="top" id="pageBlockButton1">
    <table align="right" style="width: 700px;">
        <tr>
            <td>{!(currPage-1)*selctRecordNum}&nbsp;-&nbsp;{!IF(currPage*selctRecordNum > totalRecords, totalRecords, currPage*selctRecordNum)}</td>
            <td>&nbsp;&nbsp;共{!totalRecords}个</td>
            <td align="right" width="150px">显示
                <apex:selectList value="{!selRecordOption}" id="selRecordOption" size="1" onchange="blockme();recordNumChangeAction();" disabled="{!IF(totalRecords<20,true,false)}"><apex:selectOptions value="{!recordNum}"/></apex:selectList>条记录
            </td>
            <td align="right" width="55px">第{!currPage}页</td>
            <td align="right" width="45px">
                <apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="MySequence" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                <apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
            </td>
            <td align="right" width="55px">
                <apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="MySequence" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                <apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
            </td>
            <td width="3px"></td>
            <td align="left" width="55px">
                <apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="gzShow();unblockUI();" reRender="MySequence" 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 align="left" width="45px">
                <apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="gzShow();unblockUI();" reRender="MySequence" 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>
            <!-- HWAG-B4R3SS  END 20181026-->
            <td align="left">共{!totalPage}页</td>
        </tr>
    </table>
    </apex:pageBlockButtons>
    <!-- <div  style="height: 270px;overflow-y:auto;"> -->
        <div class="" id="table-head">
        <table class="list" border="0" cellpadding="0" cellspacing="0" width="100%"  >
            <!-- style="table-layout: fixed;" -->
            <colgroup style="{!IF(isEquipmentCenter,'','display:none;')}" >
            <col width="10%" />
            <col width="10%" />
            <col width="8%" />
            <!-- 2022015 -->
            <col width="6%" />
            <col width="10%"/>
            <col width="4%"/>
            <col width="8%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="4%"/>
            <col width="16%"/>
            </colgroup>
            <colgroup style="{!IF(isEquipmentCenter,'display:none;','')}" >
            <col width="16%" />
            <col width="16%" />
            <col width="16%" />
            <col width="12%" />
            <col width="10%"/>
            <col width="10%"/>
            <col width="10%"/>
            <col width="10%"/>
            </colgroup>
            <thead>
            <tr class="headerRow">
                <th style="padding-bottom: 6px;">申请单号No.</th>
                <th style="padding-bottom: 6px;">一览No.</th>
                <th style="padding-bottom: 6px;">型号</th>
                <th style="padding-bottom: 6px;">排队备品<br/>预计出库时间</th>
                <th style="padding-bottom: 6px; {!IF(isEquipmentCenter,'','display:none;')}">队列所在地区本部</th> <!-- 申请人看不到  -->
                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">产品分类<br/>(GI/SP)</th> <!-- 申请人看不到 -->
                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">备品分类</th> <!-- 申请人看不到 -->
                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">备品存放地</th> <!-- 申请人看不到 -->
                <th style="padding-bottom: 6px;">申请者<br/>销售本部</th>
                <th style="padding-bottom: 6px;">申请者<br/>办事处</th>
                <th style="padding-bottom: 6px;">备品出借担当</th>
                <th style="padding-bottom: 6px;">排队NO.</th>
                <th style="padding-bottom: 6px;{!IF(isEquipmentCenter,'','display:none;')}">序列NO.</th> <!-- 申请人看不到 -->
            </tr>
            </thead>
        </table>
        </div>
        <div class="table-body" id="table-body" style="height: 270px;overflow-y:auto;">
        <table class="list" border="0" cellpadding="0" cellspacing="0" id="tablebody" style="table-layout:fixed;" >
            <colgroup style="{!IF(isEquipmentCenter,'','display:none;')}" >
            <col width="10%" />
            <col width="10%" />
            <col width="8%" />
            <!-- 2022015 -->
            <col width="6%" />
            <col width="10%"/>
            <col width="4%"/>
            <col width="8%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="6%"/>
            <col width="4%"/>
            <col width="16%"/>
            </colgroup>
            <colgroup style="{!IF(isEquipmentCenter,'display:none;','')}" >
            <col width="16%" />
            <col width="16%" />
            <col width="16%" />
            <col width="12%" />
            <col width="10%"/>
            <col width="10%"/>
            <col width="10%"/>
            <col width="10%"/>
            </colgroup>
            <tbody>
            <apex:repeat value="{!raesInfoListList[currPage-1]}" var="info"  id="Sequence" >
            <tr height="48px">
                <td><apex:outputField value="{!info.raesd.Rental_Apply__c}"/></td>
                <!-- <span><apex:outputLink value="/{!rased.Id}"> <apex:outputField value="{!rased.Rental_Apply__c}" id="opname"/></apex:outputLink></span> -->
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Equipment_Set__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Fixture_Model_No__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Equipment_Set__r.QueueShippmentDateNew__c}"/></td>
                <apex:outputPanel rendered="{!isEquipmentCenter}" layout="none">
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Salesdepartment_before__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Product_category_text__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Equipment_Type_text__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Internal_asset_location_before__c}"/></td>
                </apex:outputPanel>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Salesdepartment_text__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.WorkPlace__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Person_In_Charge__c}"/></td>
                <td style="white-space: pre-wrap;word-wrap:break-word;">
                    <apex:outputField value="{!info.raesd.Queue_Number__c}" rendered="{!!isEquipmentCenter}" />
                    <apex:outputLink value="" rendered="{!isEquipmentCenter}" onclick="checkEventJs('1;{!info.raesd.Rental_Apply_Equipment_Set__c}');return false;"> {!info.raesd.Queue_Number__c}</apex:outputLink>
                </td>
                <apex:outputPanel rendered="{!isEquipmentCenter}" layout="none">
                <td>
                    <apex:repeat value="{!info.raqList}" var="qL"  id="SeriesNo" >
                    <apex:outputLink value="" onclick="checkEventJs('2;{!qL.Id}');return false;">{!qL.Salesdepartment__c};{!qL.Equipment_Type__c};{!qL.Product_category__c};<font style="color: red;font-weight: 800;">{!qL.Series_No__c}</font>
                    </apex:outputLink><br/>
                    </apex:repeat>
                </td>
                </apex:outputPanel>
            </tr>
            </apex:repeat>
            </tbody>
        </table>
    </div>
    </apex:pageBlock>
</apex:form>
<apex:outputPanel id="checEventFrame">
    <apex:iframe id="theIframe" rendered="{!IF(!ISBLANK(frameUrl),true,false)}" title="排队一览" src="{!frameUrl}"/>
</apex:outputPanel>
</apex:page>
force-app/main/default/pages/RentalApplySplit.page
@@ -59,6 +59,14 @@
        body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
            border-width: 1px;
        }*/
        /* 20230613 ljh lightning start */
        body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
            min-width: 180px;
        }
        .pbBody{
            width:600px;
        }
        /* 20230613 ljh lightning start */
    </style>
    <apex:form id="allForm">
        <script type="text/javascript">
force-app/main/default/pages/RentalApplySplit.page.bak
New file
@@ -0,0 +1,176 @@
<apex:page controller="RentalApplySplitController" action="{!init}" showHeader="false" id="allPage" lightningStylesheets="true">
    <head>
      <title>备品借出申请分单</title>
      <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
      <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
      <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    </head>
    <style type="text/css">
        .hideDropdown select{
            display: 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 */
        }
        span.dateFormat {
            display: none;
        }
        /* Modal Content/Box */
        .modal-content {
           background-color: #fefefe;
           margin-left: 6px;
           margin-top: 100px;
           padding: 20px;
           border: 1px solid #888;
           right: 5%;
           position: absolute;
           width: 200px;
        }
        .modal-content-cancel {
           background-color: #fefefe;
           margin-left: -150px;
           margin-top: 100px;
           padding: 20px;
           border: 1px solid #888;
           left: 50%;
           position: absolute;
           width: 300px;
        }
        body .slds-vf-data-table thead th{
            background: none;
        }
        /*table.list td{
            width:100px;
            border-width: 1px;
        }
        table.list td.col_chk {
            width:30px;
        }
        body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
            border-width: 1px;
        }*/
    </style>
    <apex:form id="allForm">
        <script type="text/javascript">
            function back() {
                window.opener.parent.location.href = "/{!ra.Id}";
                top.window.close();
            }
            function checkSaveStatus() {
                var saveStatus = document.getElementById('{!$Component.allForm.saveStatus}').value;
                if (saveStatus == 'ok') {
                    //20210609 ljh update 1732  start
                    var temp = '{!cloneRas.Id}';
                    console.log(temp);
                    if( temp == null || temp == '' ){
                        window.open("/{!ra.Id}");
                    }else{
                        window.open("/{!cloneRas.Id}");
                    }
                    //20210609 ljh update 1732 end
                    top.window.close();
                }
            }
            //现地管理分单 202100609 ljh update 1732
            function changeSplitApplyReason(){
                var reason = j$(escapeVfId('allPage:allForm:searchBlock:split:split0:Split_Apply_Reason')).value();
                console.log(reason);
                var RecordTypeIsAgency = j$(escapeVfId('allPage:allForm:RecordTypeIsAgency')).value();
                if(reason != null && (reason == '现地管理分单'
                    || (eval(RecordTypeIsAgency) && reason == '到货NG分单'))
                    ){
                    //办事处必须填写
                    j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',false);
                    j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('required',true);
                }else{
                    if(!(eval(RecordTypeIsAgency) && reason != null && reason == '到货NG分单')){
                        //办事处清空 只读
                        j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).val(null);
                        j$(escapeVfId('allPage:allForm:searchBlock:split:ToAgency0:ToAgency')).attr('disabled',true);
                    }
                }
            }
            function allSplitShow(){
                var allSplitShow = j$(escapeVfId('allPage:allForm:allSplitShow')).value();
                if(eval(allSplitShow)){
                    j$('#AllSplitModal').show();
                }
            }
        </script>
        <apex:pageMessages />
        <apex:inputHidden value="{!saveStatus}" id="saveStatus"/>
        <!-- 20210609 ljh add 1732  start-->
        <apex:inputHidden value="{!allSplitShow}" id="allSplitShow"/>
        <apex:inputHidden value="{!RecordTypeIsAgency}" id="RecordTypeIsAgency"/>
        <div id="AllSplitModal" class="modal">
            <div class="modal-content-cancel">
                <table>
                    <tr>
                        <td colspan="2">
                        是否要整单分{!IF(SplitNum == 1,'回备品中心?',IF(SplitNum == 2,'给其他办事处?',IF(SplitNum == 3,'给办事处?','')))}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <apex:commandButton style="margin: 0 20px;" value="确定"  action="{!saveSplitAll}" oncomplete="checkSaveStatus();unblockUI();" onclick="j$('#AllSplitModal').hide();blockme();" rerender="allForm"
                            />
                            <apex:commandButton style="margin: 0 20px;" value="取消" onclick="j$('#AllSplitModal').hide();return false;"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <!-- 20210609 ljh add 1732  end-->
        <apex:pageBlock id="searchBlock" tabStyle="Report">
            <apex:pageBlockSection title="备品借出申请分单" collapsible="false" id="split">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
                    <apex:outputField value="{!ra.Name}" id="Name"/>
                </apex:pageBlockSectionItem>
                <!-- 20201119 ljh update start -->
                <apex:pageBlockSectionItem id="split0">
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Split_Apply_Reason__c.label}" for="Split_Apply_Reason"/>
                    <apex:inputField value="{!cloneRas.Split_Apply_Reason__c}" id="Split_Apply_Reason" required="true"  onchange="changeSplitApplyReason();"/>
                </apex:pageBlockSectionItem>
                <!-- 20201117 ljh add start -->
                <apex:pageBlockSectionItem id="ToAgency0">
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.ToAgency__c.label}" for="Name"/>
                    <apex:inputField value="{!cloneRas.ToAgency__c}" id="ToAgency"  />
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem html-style="display: none;">
                <apex:inputField value="{!cloneRas.SalesdeptSelect__c}" id="SalesdeptSelect" style="display: none;" />
              </apex:pageBlockSectionItem>
                <!-- 20201117 ljh add end -->
            </apex:pageBlockSection>
            <apex:dataTable value="{!raesList}" var="raes" id="raesLists" border="allPage" cellpadding="5">
              <apex:column >
                <apex:facet name="header">借出备品配套一览No.</apex:facet>
                <apex:outputText value="{!raes.Name}" />
              </apex:column>
              <apex:column >
                <apex:facet name="header">借出配套型号</apex:facet>
                <apex:outputText value="{!raes.Loaner_code_F__c}" />
              </apex:column>
              <apex:column >
                <apex:facet name="header">借出备品配套一览状态</apex:facet>
                <apex:outputText value="{!raes.RAES_Status__c}" />
              </apex:column>
            </apex:dataTable>
            <div style="height: 15px"></div>
            <apex:commandButton value="确认分单" action="{!saveSplit}" oncomplete="allSplitShow();checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
            <apex:commandButton value="返回" onclick="back(); return false;" rerender="allForm" oncomplete="unblockUI();" />
          </apex:pageBlock>
        </apex:form>
</apex:page>
force-app/main/default/pages/RentalFixtureSetAssign.page
@@ -132,17 +132,17 @@
        j$("#classification_f").children("#initial_f").remove();
        var idTemp = j$(obj).value().trim();
        idTemp = 'Id'+idTemp.split('.')[0];
        j$("#classification_f").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
        j$("#classification_f").append("<span class='valClassf' id='" + (idTemp) + "'>" + (j$(obj)
            .value().trim() + ",") + "</span>");
    } else {
        var idTemp = 'Id'+name.split('.')[0];
        j$("#classification_f").children("#" + (idTemp)).remove();
        var length = j$("#classification_f").html().length;
        if (length === 0) {
            j$("#classification_f").append("<span class='valClass' id='initial_f'>--无--</span>");
            j$("#classification_f").append("<span class='valClassf' id='initial_f'>--无--</span>");
        }
    }
    var optioncheck = j$(".valClass");
    var optioncheck = j$(".valClassf");
    var hint = '';
    for(var i = 0;i<optioncheck.length;i++){
        if(optioncheck[i].innerText != '--无--'){
@@ -377,7 +377,8 @@
                    <apex:outputField value="{!parentObj.Product_category__c}"/>
                    <apex:pageBlockSectionItem id="SelectOP"  rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用')}">
                    <!-- 20220106 ljh 放开 服务培训/学会 parentObj.CampaignType__c=='服务培训/学会'|| -->
                    <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="备品分类" />
                    <!-- <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="备品分类" /> -->
                    <apex:outputLabel for="bieBeiPinFenLei" value="备品分类" />
                    <apex:outputPanel style="position:absolute; " id="S_bieFenLei">
                        <ul class="nav" id="nav_f" style="background-color: #FFFFFF;left:0px;top:-5px;">
                            <li id="classification_f" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_f();return false;">
@@ -400,7 +401,8 @@
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem id="Selectsalesd" rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用')}">
                        <!-- 20220106 ljh 放开 服务培训/学会 parentObj.CampaignType__c=='服务培训/学会'|| -->
                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="本部" />
                        <!-- <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="本部" /> -->
                        <apex:outputLabel for="salesd"  value="本部" />
                        <apex:outputPanel style="position:absolute; " id="S_bieBenBu">
                            <ul class="nav" id="nav_b" style="background-color: #FFFFFF;left:0px;">
                                <li id="classification_b" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_b();return false;">
@@ -426,7 +428,7 @@
                </apex:pageBlockSection>
                 <!-- 20230526 ljh lightning start-->
                <!-- <table style="width: 450px;margin: auto;float: left;margin-top: 1.5%;" > -->
                <table style="width: 450px;margin: auto;float: left;" >
                <table style="width: 550px;margin: auto;float: left;" >
                    <tr><td colspan="{!IF(parentObj.demo_purpose2__c == '学会展会'&&!(contains(parentObj.Salesdepartment__c,'MA本部')||contains(parentObj.Salesdepartment__c,'产品培训')),4,2)}">
                        &nbsp;</td>
                    </tr>
@@ -459,11 +461,10 @@
                        </td>
                    </tr>
                </table>
                <table style="width:800px;float:right;" >
                <table style="width:700px;float:right;" >
                  <tr>
                    
                      <td style="width:450px;">
                    </td>
                    <td style="width:350px;"></td>
                    <!-- <td style="width:180px;">
                    </td> -->
                    <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_start_day__c.label}</th>
@@ -471,7 +472,7 @@
                  </tr>
                  <tr>
                    
                    <td style="width:450px;">
                    <td style="width:350px;">
                      <apex:commandButton action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();"  />
                      <apex:commandButton style="margin-left:150px;" action="{!cancel}" value="返回" />
                    </td>
force-app/main/default/pages/RentalFixtureSetAssign.page.bak
New file
@@ -0,0 +1,642 @@
<apex:page lightningStylesheets="true" controller="RentalFixtureSetAssignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
<head>
<title>备品出借分配设备</title>
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.RentalFixtureSetAssignCss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<!-- <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/> -->
<style type="text/css">
    .hideDropdown select{
        display: 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 */
    }
    span.dateFormat {
        display: none;
    }
    /* Modal Content/Box */
    .modal-content {
        background-color: #fefefe;
        margin-left: 6px;
        margin-top: 100px;
        padding: 20px;
        border: 1px solid #888;
        right: 5%;
        position: absolute;
        width: 200px;
    }
    .modal-content-cancel {
        background-color: #fefefe;
        margin-left: -150px;
        margin-top: 100px;
        padding: 20px;
        border: 1px solid #888;
        left: 50%;
        position: absolute;
        width: 300px;
    }
    /* 20230606 ljh lightning start */
    body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
        min-width: 180px;
    }
    /* body .bPageBlock .detailList .dataCol{
        width: 8%;
    } */
    body .bPageBlock .detailList .dataCol input[type="checkbox"]:first-child{
        margin-top: 0;
    }
    body .detailList td{
        position: static;
    }
    /*以下是下拉复选框的样式  start*/
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .nav {
        width: 180px;/*20230606 ljh*/
        line-height: 30px;/*20230606 ljh*/
        /* border: 1px solid #000; *//*20230610 ljh*/
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        margin: 0;
        /* z-index: 9999; */
        z-index: 2;
        display: inline-block;
        border-radius: 0.25rem;/*20230607 ljh lightning*/
        border: 1px solid rgb(201, 201, 201);/*20230610 ljh lightning*/
    }
    ul,li {
        list-style: none;
    }
    .nav li input {
        margin: 0px 3px 0px 3px;
    }
    .nav li p:hover {
        background: #1e90ff;
        color: #fff;
    }
    #classification_f,#classification_b {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
var clickLineNo;
var iszhu;
// 20230607 ljh lightning start
j$(document).bind("click",function(e){
    var e = e || window.event;    //事件对象,兼容IE
    var target = e.target || e.srcElement;  //源对象,兼容火狐和IE
    while(target){
        // console.log(target.id);
        if (target.id && (target.id == "nav_f" ||target.id == "nav_b")){
            //循环判断至根节点,防止点击的是#selected和它的子元素
            return;
        }
        target = target.parentNode;
    }
    j$("#selectCheckId_f").hide();   //点击的不是#selected和它的子元素,隐藏下拉菜单
    j$("#selectCheckId_b").hide();
})
//点击 分类选择
function selectFenLei(obj,name){
    var checked1 = j$(obj).prop("checked");
    if (checked1 == true) {
        j$("#classification_f").children("#initial_f").remove();
        var idTemp = j$(obj).value().trim();
        idTemp = 'Id'+idTemp.split('.')[0];
        j$("#classification_f").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
            .value().trim() + ",") + "</span>");
    } else {
        var idTemp = 'Id'+name.split('.')[0];
        j$("#classification_f").children("#" + (idTemp)).remove();
        var length = j$("#classification_f").html().length;
        if (length === 0) {
            j$("#classification_f").append("<span class='valClass' id='initial_f'>--无--</span>");
        }
    }
    var optioncheck = j$(".valClass");
    var hint = '';
    for(var i = 0;i<optioncheck.length;i++){
        if(optioncheck[i].innerText != '--无--'){
            hint +=optioncheck[i].innerText;
        }
    }
    j$("[id*='equipmenttypes']").val(hint);
}
//点击 本部选择
function selectBenBu(obj,name){
    var checked1 = j$(obj).prop("checked");
    if (checked1 == true) {
        j$("#classification_b").children("#initial_b").remove();
        var idTemp = j$(obj).value().trim();
        idTemp = 'Id'+idTemp.split('.')[0];
        j$("#classification_b").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
            .value().trim() + ",") + "</span>");
    } else {
        var idTemp = 'Id'+name.split('.')[0];
        j$("#classification_b").children("#" + (idTemp)).remove();
        var length = j$("#classification_b").html().length;
        if (length === 0) {
            j$("#classification_b").append("<span class='valClass' id='initial_b'>--无--</span>");
        }
    }
    var optioncheck = j$(".valClass");
    var hint = '';
    for(var i = 0;i<optioncheck.length;i++){
        if(optioncheck[i].innerText != '--无--'){
            hint +=optioncheck[i].innerText;
        }
    }
    j$("[id*='salesdepartments']").val(hint);
}
// 分类
function navClose_f(){
    j$("#selectCheckId_f").toggle();
}
// 本部
function navClose_b(){
    j$("#selectCheckId_b").toggle();
}
// 20230607 ljh lightning end
function saveGoPageJs(clickLineNo1, iszhu1) {
    blockme();
    clickLineNo = clickLineNo1;
    iszhu = iszhu1;
    //如果当前操作的行没有选中,直接打勾选中
    var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + clickLineNo + ':rowCheck'));
    lock.prop('checked', true);
    saveGoPageJs_save();
}
function saveGoPageJsComplete() {
    var errorFlag = j$(escapeVfId('allPage:allForm:hasError')).value();
    if(errorFlag == 'false'){
       // 跳转URL逻辑
       checkEvent(clickLineNo, iszhu);
    }
}
// 计算自然日
function getDays(date1,date2){
    var dayCount = 0;
    if(date1 && date2){
        //将时间字符串转化为距离1970年1月1日午夜零时的时间间隔的毫秒数
        var time1 = Date.parse(date1);
        var time2 = Date.parse(date2);
        //将两个时间相减,求出相隔的天数
        var dayCount = (Math.ceil(time2 - time1))/1000/60/60/24;
    }
    return dayCount;
}
function setAsset_loaner_closed_day(date1, daysId, demo_purpose2, Campaign_EndDate_F, dId) {
    var demo2 = j$(escapeVfId(demo_purpose2)).value();
    var days = 0;
    var date = date1;
    if (demo2 == '试用(无询价)'
            || demo2 == '试用(有询价)'
            || demo2 == '新产品评价'
            || demo2 == '其他'
            || demo2 == '协议借用') {
        days = j$(escapeVfId(daysId)).value();
        if (days != null && days != '' && days > 0) {
            days = days;
        }
    }
    else if (demo2 == '一般用户'
            || demo2 == '保修用户'
            || demo2 == '市场多年保修'
            || demo2 == '再修理'
            || demo2 == '索赔QIS'
            || demo2 == '已购待货'
            || demo2 == '故障排查') {
        days = 30;
    }
    else if (demo2 == '学会展会') {
        date = '{!parentObj.Campaign_EndDate_F__c}';
        days = 5;
    }
    j$(escapeVfId(dId)).val(dateAddDays(date, days));
}
function dateAddDays(dataStr,dayCount) {
    var strdate=dataStr;
    //日期字符串
    var isdate = new Date(strdate.replace(/-/g,"/"));
    //把日期字符串转换成日期格式
    isdate = new Date((isdate/1000+(86400*dayCount))*1000);
    //日期加1天
    var pdate = isdate.getFullYear()+"/"+(isdate.getMonth()+1)+"/"+(isdate.getDate());
    //把日期格式转换成字符串
    return pdate;
}
function confirmSpecial() {
    if(confirm("是否特殊排队?")){
        var needconfirm = false;
        var confirmMsg = '';
        var count = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt')).val();
        for(var i = 0;i < count;i ++){
            var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck')).prop('checked');
            if(lock){
                var QueueType = j$("input[name=QueueType__c][type=hidden]")[i].value;
                console.log(QueueType);
                // var type = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:'+ i +':queueType')).val();
                if(QueueType != undefined && QueueType != '' ){
                    var model = j$("input[name=First_RAESD_Model_No_F__c][type=hidden]")[i].value;
                    confirmMsg +=   '第' + (i + 1) + '行 '+ model+' 已经' + QueueType + '; ' + '\n' ;
                    needconfirm = true;
                }
            }
        }
        console.log(needconfirm);
        if(needconfirm){
            return confirm(confirmMsg + '是否继续?');
        }else{
            return true;
        }
    }
    return false;
}
// 20220105 ljh update start
/*function defualtconfirm() {
    if(confirm("是否默认排队?")){
        var oldtype = j$("[id*='OldCampaignType']").val();
        var campaignType = j$("[id*='campaignType']").val();
        if(oldtype !="" && oldtype != undefined && oldtype != campaignType){
            if(confirm("您本次选择的学会类型与已排队的不一致,请确认是否更新")){
                j$("[id*='changeCampaignType']").val(true);
            }else{
                j$("[id*='changeCampaignType']").val(false);
            }
        }
        return true;
    }
    return false;
}*/
function defualtconfirm() {
    if(confirm("是否默认排队?")){
        var needconfirm = false;
        var confirmMsg = '';
        var count = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt')).val();
        for(var i = 0;i < count;i ++){
            var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck')).prop('checked');
            if(lock){
                var QueueType = j$("input[name=QueueType__c][type=hidden]")[i].value;
                console.log(QueueType);
                // var type = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:'+ i +':queueType')).val();
                if(QueueType != undefined && QueueType != '' ){
                    var model = j$("input[name=First_RAESD_Model_No_F__c][type=hidden]")[i].value;
                    confirmMsg +=   '第' + (i + 1) + '行 '+ model+' 已经' + QueueType + '; ' + '\n' ;
                    needconfirm = true;
                }
            }
        }
        console.log(needconfirm);
        if(needconfirm){
            if(confirm(confirmMsg + '是否继续?')){
                var oldtype = j$("[id*='OldCampaignType']").val();
                var campaignType = j$("[id*='campaignType']").val();
                console.log(oldtype+campaignType);
                if(oldtype !="" && oldtype != undefined && oldtype != campaignType){
                    if(confirm("您本次选择的学会类型与已排队的不一致,请确认是否更新")){
                        j$("[id*='changeCampaignType']").val(true);
                    }else{
                        j$("[id*='changeCampaignType']").val(false);
                    }
                }
                return true;
            }
        }else{
            return true;
        }
    }
}
// 20220105 ljh update end
</script>
</head>
    <apex:form id="allForm">
        <apex:inputHidden id="salesdepartments" value="{!salesdepartments}" />
        <apex:inputHidden id="equipmenttypes" value="{!equipmenttypes}" />
        <apex:inputHidden id="changeCampaignType" value="{!changeCampaignType}"/>
        <apex:inputHidden id="OldCampaignType" value="{!oldCampaignType}"/>
        <apex:actionFunction name="save" action="{!save}" rerender="allForm,checEventFrame" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="saveGoPageJs_save" action="{!save}" rerender="allForm,checEventFrame" onComplete="unblockUI();saveGoPageJsComplete();">
        </apex:actionFunction>
        <apex:actionFunction name="checkEvent" action="{!checkEvent}" rerender="allForm,checEventFrame" onComplete="unblockUI();window.open(j$(escapeVfId('{!$Component.checkEventUrl}')).value());">
            <apex:param name="firstParam" assignTo="{!clickLineNo}" value="" />
            <apex:param name="isZhu" value="" />
        </apex:actionFunction>
        <apex:inputHidden id="checkEventUrl" value="{!checkEventUrl}" />
        <apex:inputHidden id="Hope_Lonaer_date_Num" value="{!parentObj.Hope_Lonaer_date_Num__c}" />
        <apex:inputHidden id="demo_purpose2" value="{!parentObj.demo_purpose2__c}"/>
        <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockSection title="分配画面">
                    <apex:outputField value="{!parentObj.Name}"/>
                    <apex:outputField value="{!parentObj.Demo_purpose1__c}"/>
                    <apex:outputField value="{!parentObj.Salesdept__c}"/>
                    <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
                    <apex:outputField value="{!parentObj.Internal_asset_location_F__c}"/>
                    <apex:outputField value="{!parentObj.Equipment_Type_F__c}"/>
                    <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
                    <apex:outputField value="{!parentObj.Request_return_day__c}"/>
                    <apex:outputField value="{!parentObj.Product_category__c}"/>
                    <apex:pageBlockSectionItem id="SelectOP"  rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用')}">
                    <!-- 20220106 ljh 放开 服务培训/学会 parentObj.CampaignType__c=='服务培训/学会'|| -->
                    <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="备品分类" />
                    <apex:outputPanel style="position:absolute; " id="S_bieFenLei">
                        <ul class="nav" id="nav_f" style="background-color: #FFFFFF;left:0px;top:-5px;">
                            <li id="classification_f" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_f();return false;">
                                <span id="initial_f">--无--</span>
                            </li>
                            <li id="selectCheckId_f" style="margin-left:0px;display: none;">
                                <ul style="margin-left:0px;">
                                <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selFL">
                                <li class="sdclass" style="margin-left:0px">
                                    <p class="ul-nav" name="cate_id[]" >
                                        <input type="checkbox" value="{!orr.value}" onclick="selectFenLei(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
                                        <font style="">{!orr.label}</font>
                                    </p>
                                </li>
                                </apex:repeat>
                                </ul>
                            </li>
                        </ul>
                    </apex:outputPanel>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem id="Selectsalesd" rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用')}">
                        <!-- 20220106 ljh 放开 服务培训/学会 parentObj.CampaignType__c=='服务培训/学会'|| -->
                        <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="本部" />
                        <apex:outputPanel style="position:absolute; " id="S_bieBenBu">
                            <ul class="nav" id="nav_b" style="background-color: #FFFFFF;left:0px;">
                                <li id="classification_b" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_b();return false;">
                                    <span id="initial_b">--无--</span>
                                </li>
                                <li id="selectCheckId_b" style="margin-left:0px;display: none;">
                                    <ul style="margin-left:0px;">
                                    <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSD">
                                    <li class="sdclass" style="margin-left:0px">
                                        <p class="ul-nav" name="cate_id[]" >
                                            <input type="checkbox" value="{!orr.value}" onclick="selectBenBu(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
                                            <font style="">{!orr.label}</font>
                                        </p>
                                    </li>
                                    </apex:repeat>
                                    </ul>
                                </li>
                            </ul>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>
                    <apex:inputField rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用')}" id="product_category" value="{!parentObj.Product_category_Sys__c}" />
                    <!-- 20220106 ljh 放开 服务培训/学会 parentObj.CampaignType__c=='服务培训/学会'|| -->
                </apex:pageBlockSection>
                 <!-- 20230526 ljh lightning start-->
                <!-- <table style="width: 450px;margin: auto;float: left;margin-top: 1.5%;" > -->
                <table style="width: 450px;margin: auto;float: left;" >
                    <tr><td colspan="{!IF(parentObj.demo_purpose2__c == '学会展会'&&!(contains(parentObj.Salesdepartment__c,'MA本部')||contains(parentObj.Salesdepartment__c,'产品培训')),4,2)}">
                        &nbsp;</td>
                    </tr>
                    <tr>
                        <apex:outputPanel rendered="{!parentObj.demo_purpose2__c == '学会展会'&&!(contains(parentObj.Salesdepartment__c,'MA本部')||contains(parentObj.Salesdepartment__c,'产品培训'))}">
                            <td style="width:50px;font-weight: bold;font-family: Arial,Helvetica,sans-serif;font-size: 91%;color: #4a4a56;">
                                {!$ObjectType.Rental_Apply__c.fields.CampaignType__c.label}
                            </td>
                             <td style="width:80px;">
                                <apex:inputField id="campaignType" value="{!parentObj.CampaignType__c}" />
                            </td>
                        </apex:outputPanel>
                        <!-- 20230526 ljh lightning start-->
                        <!-- <td colspan="2" style="text-align:end;"> -->
                        <td style="text-align:end;">
                        <!-- 20230526 ljh lightning end-->
                            <apex:commandButton action="{!defaultScheduel}" disabled="{!parentObj.Demo_purpose1__c=='其他'||parentObj.Status__c!='已批准'}" onclick="if(!defualtconfirm()) return false;blockme();" oncomplete="unblockUI();"  value="默认排队" rerender="message,campaignType"/>
                            <!-- 20220105 ljh rerender add cmpid -->
                        </td>
                        <!-- 20230526 ljh lightning start-->
                        <!-- <td style="width:190px;"> -->
                        <td>
                        <!-- 20230526 ljh lightning end-->
                            <apex:outputPanel rendered="{!!(parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用'||parentObj.Status__c!='已批准')}">
                                <apex:commandButton style="margin-left:20px;" onclick="if(!confirmSpecial()) return false;blockme();"  action="{!specialScheduel}" disabled="{parentObj.Demo_purpose1__c=='维修代用'||parentObj.Demo_purpose1__c=='协议借用'||parentObj.Status__c!='已批准'}" value="特殊排队" rerender="cmpid,checEventFrame,message,campaignType" oncomplete="unblockUI();"  />
                            </apex:outputPanel>
                            <!-- 20220106 ljh 放开 服务培训/学会 !parentObj.CampaignType__c=='服务培训/学会'|| -->
                            <!-- 20220105 ljh rerender add cmpid -->
                            <apex:commandButton style="margin-left:20px;" disabled="{!parentObj.Status__c!='已批准'}" action="{!topInLine}" value="排队NO.置顶" onclick="blockme();" oncomplete="unblockUI();" rerender="cmpid,checEventFrame,message"  />
                        </td>
                    </tr>
                </table>
                <table style="width:800px;float:right;" >
                  <tr>
                      <td style="width:450px;">
                    </td>
                    <!-- <td style="width:180px;">
                    </td> -->
                    <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_start_day__c.label}</th>
                    <th>{!$ObjectType.Rental_Apply__c.fields.Asset_loaner_closed_day__c.label}</th>
                  </tr>
                  <tr>
                    <td style="width:450px;">
                      <apex:commandButton action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();"  />
                      <apex:commandButton style="margin-left:150px;" action="{!cancel}" value="返回" />
                    </td>
                    <td id="special"><apex:inputField id="rentalStartDate" value="{!parentObj.Asset_loaner_start_day__c}" onchange="setAsset_loaner_closed_day(this.value, '{!$Component.Hope_Lonaer_date_Num}', '{!$Component.demo_purpose2}', '{!$Component.Campaign_EndDate_F}', '{!$Component.rentalEndDate}'); return false"></apex:inputField></td>
                    <td id="special"><apex:inputField id="rentalEndDate" value="{!parentObj.Asset_loaner_closed_day__c}" html-disabled="true" ></apex:inputField></td>
                    <td><apex:commandButton action="{!checkDate}" reRender="allForm,checEventFrame" value="适用" oncomplete="applyJs()" />
                      <script type="text/javascript">
                        function applyJs() {
                          var errorFlag = j$(escapeVfId('{!$Component.hasError}')).value();
                          if(errorFlag == 'false'){
                            var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
                            var rentalStartDate = j$(escapeVfId('{!$Component.rentalStartDate}')).value();
                            var rentalEndDate = j$(escapeVfId('{!$Component.rentalEndDate}')).value();
                            //算出借出时间(天) = 备品预计回收日 - 备品预计出货日
                            var days = getDays(rentalStartDate, rentalEndDate);
                            var td_start = [];
                            j$("td.dataCellBorder1.col_Rental_Start_Date__c").each(function () {
                              td_start.push(j$(this))
                            });
                            var td_end = [];
                            j$("td.dataCellBorder1.col_Rental_End_Date__c").each(function () {
                              td_end.push(j$(this))
                            });
                            var td_days = [];
                            j$("td.dataCellBorder1.col_Jie_Chu_Shi_Jian_Jia__c").each(function () {
                              td_days.push(j$(this))
                            });
                            for (var i = 0; i < cnt; i++) {
                              var lock = j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + i + ':rowCheck'));
                              if(lock.prop('checked') == true){
                                td_start[i].find("input").val(rentalStartDate);
                                td_end[i].find("input").val(rentalEndDate);
                                td_days[i].find("span").text(days);
                              }
                            }
                          }
                        }
                      </script>
                    </td>
                  </tr>
                </table>
                <div style="clear:both;"></div>
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
        </apex:pageBlock>
        <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
        </apex:outputPanel>
        <div id="AllSplitModal" class="modal">
            <div class="modal-content-cancel">
                <table>
                    <tr>
                        <td style="width:300px;text-align: center;" colspan="2">
                        是否特殊排队
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <apex:commandButton style="margin: 0 20px;" value="确定"   rerender="allForm"
                            />
                            <apex:commandButton style="margin: 0 20px;" value="取消" onclick="j$('#AllSplitModal').hide();return false;"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </apex:form>
    <apex:outputPanel id="checEventFrame">
        <script>
        addlinkbutton();
        function addlinkbutton(){
          // 次の画面遷移click
          var ele = j$(".dataCellBorder1.col_Zhu_Ti_Fen_Pei_Jia__c");
          var ele1 = j$(".dataCellBorder1.col_Fu_Shu_Pin_Fen_Pei_Jia__c");
          var showButton = eval("({!JSENCODE(bodyModelNoJson)})");
          // alert(ele.length);
          if(ele.length){
            var i = 0;
            ele.each(function () {
              var showmap = showButton[i];
              if (showmap['ZHU']) {
                j$(this).css('align-items','center');
                j$(this).append('<input type="button" style="width: auto;" value="分配" onclick="saveGoPageJs('+i+', true);"/>');
                console.log(j$(this).children("span")[0].innerText);
                var value = j$(this).children("span")[0].innerText;
                if(value == '暂定分配'){
                    j$(this).append('<input type="button" style="width: auto;" value="指定暂定分配" onclick="derectlyAssign('+i+');"/>');
                }
              }
              i = i + 1;
            })
          }
          if(ele1.length){
            var i = 0;
            ele1.each(function () {
              var showmap = showButton[i];
              if (showmap['FU']) {
                j$(this).css('align-items','center');
                // j$(this).css('display','inline-flex').css('align-items','center');
                j$(this).append('<input type="button" style="width: auto;" value="分配" onclick="saveGoPageJs('+i+', false);"/>');
              }
              i = i + 1;
            })
          }
          j$("td.dataCellBorder1.col_Rental_Start_Date__c").on("change", function() {
            var from = j$(this).find("input").val();
            var to = j$(this).next().find("input").val();
            //算出借出时间(天) = 备品预计回收日 - 备品预计出货日
            var days = getDays(from, to);
            j$(this).next().next().find("span").text(days);
          })
          j$("td.dataCellBorder1.col_Rental_End_Date__c").on("change", function() {
            var from = j$(this).prev().find("input").val();
            var to = j$(this).find("input").val();
            //算出借出时间(天) = 备品预计回收日 - 备品预计出货日
            var days = getDays(from, to);
            j$(this).next().find("span").text(days);
          })
        }
        showDate();
        function showDate() {
            var cnt = document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:currentPageRecordCnt').value;
            var td_start = [];
            j$("td.dataCellBorder1.col_Rental_Start_Date__c").each(function () {
              td_start.push(j$(this))
            });
            var td_end = [];
            j$("td.dataCellBorder1.col_Rental_End_Date__c").each(function () {
              td_end.push(j$(this))
            });
            var td_days = [];
            j$("td.dataCellBorder1.col_Jie_Chu_Shi_Jian_Jia__c").each(function () {
              td_days.push(j$(this))
            });
            for (var i = 0; i < cnt; i++) {
                var days = getDays(td_start[i].find("input").val(), td_end[i].find("input").val());
                td_days[i].find("span").text(days);
            }
        }
        function derectlyAssign(index) {
            // var viewList = JSONCODE(viewListStr);
            var viewList = eval("({!JSENCODE(WrapperJSON)})");
            // console.log('{!wrapperStr}');
            console.log('index***',index);
            console.log(viewList);
            console.log(viewList[index].sobj.Id);
            var rasdId = viewList[index].sobj.Id;
            window.location.href = '/apex/DirectAssign?oldquenId='+ rasdId;
        }
        </script>
    </apex:outputPanel>
</apex:page>
force-app/main/default/pages/RentalFixtureSetAssignAgency.page
@@ -37,7 +37,9 @@
       border: 1px solid #888;
       right: 5%;
       position: absolute;
       width: 200px;
       /* 20230628 ljh */
       /* width: 200px; */
       width: 300px;
    }
    .modal-content-cancel {
       background-color: #fefefe;
force-app/main/default/pages/RentalFixtureSetAssignAgency.page.bak
New file
@@ -0,0 +1,558 @@
<!-- 20230524 ljh lightning  -->
<!-- <apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处分配/发货"> -->
<apex:page controller="RentalFixtureSetAssignAgencyController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="办事处分配/发货" lightningStylesheets="true">
<!-- 20210624 ljh update SFDC-C448GR --><!-- title="办事处分配/下架/发货" -->
    <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:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230525 ljh lightning  -->
<style type="text/css">
    .hideDropdown select{
        display: 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 */
    }
    span.dateFormat {
        display: none;
    }
    /* Modal Content/Box */
    .modal-content {
       background-color: #fefefe;
       margin-left: 6px;
       margin-top: 100px;
       padding: 20px;
       border: 1px solid #888;
       right: 5%;
       position: absolute;
       width: 200px;
    }
    .modal-content-cancel {
       background-color: #fefefe;
       margin-left: -150px;
       margin-top: 100px;
       padding: 20px;
       border: 1px solid #888;
       left: 50%;
       position: absolute;
       width: 300px;
    }
    table.list td{
        width:100px;
        border-width: 1px;
    }
    table.list td.col_chk {
        width:30px;
    }
    /* 20230524 ljh lightning start  */
    /* body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th {
        border-width: 1px;
    } */
    /* 20230524 ljh lightning end  */
</style>
<script type="text/javascript">
function checkMessage() {
    if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
        alert("保存成功");
    }
}
function filljsQR(qrcode) {
    if(!qrcode) return;
    blockme();
    if(scanType == '1'){
        j$("input[name$='SlipNo']").val(qrcode);
    }
    //20210513 ljh 1829 add start
    else if(scanType.indexOf('2;') != -1){
        scanAndMatch(qrcode+';'+scanType);
    }
    //20210513 ljh 1829 add end
    else{
        scanAndMatch(qrcode);
    }
    j$("#scanedqr").append("<li>"+qrcode+"</li>");
    j$("#scanedqr").animate({ scrollTop: j$("#scanedqr").prop("scrollHeight")}, 1000);
    unblockUI();
}
function checkAll() {
    j$("table td.dataCellBorder1.col_chk input").each(function(){
        if(!this.disabled) {
            this.checked = j$("input#checker").prop('checked');
        }
    })
}
var globalChecked = false;
function checkGlobal() {
    globalChecked = !globalChecked;
    j$("table td.col_chk input[type=checkbox]:enabled").each(function(){
        this.checked = globalChecked;
    })
}
/**
20210707 SFDC-C448KZ you start
function cancelModalConfirm() {
    //检查取消理由和取消理由备注
    var reason = j$.trim(j$("select[name$=cancelReason]").val());
    var remark = j$.trim(j$("input[name$=cancelReasonRemark]").val());
    //20210420 ljh 1711 update start
    //if(reason == "" || remark == "") {
    if(reason == "" && remark == "") {
        j$("#errormessage span").html('取消理由和取消理由备注不可为空!');
        j$("#errormessage").css('display', '');
    }
    else if(reason == "") {
        j$("#errormessage span").html('取消理由不可为空!');
        j$("#errormessage").css('display', '');
    }
    else if(remark == "") {
        j$("#errormessage span").html('取消理由备注不可为空!');
        j$("#errormessage").css('display', '');
    }
    //20210420 ljh 1711 update end
    else {
        j$("#errormessage").css('display', 'none');
        blockme();
        cancelSet();
    }
}
**/
function cancelModalConfirm() {
   //检查取消理由和取消理由备注   cancle Reason Lcr
    var reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
    var remark = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
    var Lcr = j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).value();
    if(reason == "" && remark == "") {
        j$("#errormessage span").html('取消理由和备品申请取消理由不可为空!');
        j$("#errormessage").css('display', '');
    }
    else if(reason == "") {
        j$("#errormessage span").html('取消理由不可为空!');
        j$("#errormessage").css('display', '');
    }
    else if(remark == "") {
        j$("#errormessage span").html('一览取消理由不可为空!');
        j$("#errormessage").css('display', '');
    }else if(remark == "其他" && Lcr =="") {
        j$("#errormessage span").html('取消理由备注不可为空!');
        j$("#errormessage").css('display', '');
    }
    else {
        j$("#errormessage").css('display', 'none');
        blockme();
        cancelSet();
    }
}
/**20210707 SFDC-C448KZ you end**/
function showCancelModal() {
    var hasChecked = false;
    j$("table td.dataCellBorder1.col_chk input").each(function(){
        if(this.checked) {
            hasChecked = true;
        }
    })
    if(!hasChecked) {
        alert('未选择取消的一览!');
        return;
    }
    j$('#cancelModal').show();
    j$('#searchBlock1').show();
}
/** 20210707 SFDC-C448KZ you start**/
 function changeCancleReasonJs(){
    var Cancel_Reason = j$(escapeVfId('allPage:allForm:Cancel_Reason')).value();
    if(Cancel_Reason != '被动取消'){
        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
    }
}
function changeReasonJs(){
    var reason = j$(escapeVfId('allPage:allForm:Loaner_cancel_reason')).value();
    if(reason != null && reason == '其他'){
        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',false);
    }else{
        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).val('');
        j$(escapeVfId('allPage:allForm:Loaner_cancel_request')).attr('disabled',true);
    }
}
/** 20210707 SFDC-C448KZ you end**/
</script>
<div id="myModal" 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>
    <video playsinline="true" id="preview" style="width: 100%;z-index: 11;transform: scaleX(-1);margin-top: 10px;"></video>
    扫码履历:
    <ul id="scanedqr" style="list-style-type: none; text-align: center;padding: 0;width: 100%; height: 60px; overflow: auto">
    </ul>
  </div>
</div>
<apex:form id="allForm" styleclass="pbBody">
    <!-- 20210624 ljh update SFDC-C448GR -->
    <!-- <apex:actionFunction name="stockDown" action="{!stockDown}" rerender="detail,message,done_flg"  oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
    <apex:actionFunction name="scanAndMatch" action="{!scanAndMatch}" rerender="detail,message,done_flg"  oncomplete="unblockUI();checkMessage();checEventFrame();">
        <apex:param name="firstParam" assignTo="{!qrcode}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="cancelSet" action="{!cancelSet}" rerender="allForm"  oncomplete="unblockUI();checkMessage();checEventFrame();j$('#cancelModal').hide();"/>
    <apex:actionFunction name="changeStep" rerender="allForm"  oncomplete="unblockUI();"/>
    <apex:inputHidden value="{!done_flg}" id="done_flg"/>
    <apex:inputHidden value="{!readOnly}" id="readOnly"/>
    <div id="cancelModal" class="modal">
        <div class="modal-content-cancel">
            <table>
                <tr>
                    <td colspan="2" align="center">
                        <apex:commandButton style="margin: 0 20px;" value="确定" onclick="cancelModalConfirm(); return false;" />
                        <apex:commandButton style="margin: 0 20px;" value="取消" onclick="j$('#errormessage').css('display', 'none');j$('#cancelModal').hide();return false;"/>
                    </td>
                </tr>
                <tr style="display: none;" id="errormessage">
                    <td colspan="2">
                        <span style="color: #F00; font-weight:bold"></span>
                    </td>
                </tr>
                <!--
                <tr>
                    <td>
                        <apex:outputLabel value="取消理由"/>
                    </td>
                    <td>
                        <apex:selectList id="cancelReason" size="1" value="{!cancelReason}">
                            <apex:selectOption itemValue="" itemLabel="--无--"/>
                            <apex:selectOption itemValue="主动取消" itemLabel="主动取消"/>
                            <apex:selectOption itemValue="被动取消" itemLabel="被动取消"/>
                        </apex:selectList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <apex:outputLabel value="取消理由备注"/>
                    </td>
                    <td>
                        <apex:inputText id="cancelReasonRemark" value="{!cancelReasonRemark}"/>
                    </td>
                </tr>
            -->
            <!--  20210707 SFDC-C448KZ you start-->
            <tr>
                <td>
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
                </td>
                <td>
                <apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
                </td>
            </tr>
            <tr rendered="true">
                <td>
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
                </td>
                <td>
                    <apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason"  onchange="changeReasonJs();"/>
                </td>
            </tr>
            <tr>
                <td>
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
                </td>
                <td>
                 <apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
                </td>
            </tr>
            <!--  20210707 SFDC-C448KZ you end-->
            <!--<tr>  20210707 SFDC-C448KZ you start-->
            <!-- <apex:pageBlock id="searchBlock1" tabStyle="Report">
            <apex:pageBlockSection title="备品借出申请一览取消" collapsible="false" id="cancle">
               <apex:pageBlockSectionItem id="CR">
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Cancel_Reason__c.label}" />
                    <apex:inputField value="{!parentObj.Cancel_Reason__c}" id="Cancel_Reason" onchange="changeCancleReasonJs();"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem rendered="true" id="Reason">
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_reason__c.label}" for="Loaner_cancel_reason"/>
                    <apex:inputField value="{!parentObj.Loaner_cancel_reason__c}" id="Loaner_cancel_reason"  onchange="changeReasonJs();"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem id="Lcr">
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Loaner_cancel_Remarks__c.label}" for="Loaner_cancel_request"/>
                    <apex:inputField value="{!parentObj.Loaner_cancel_request__c}" id="Loaner_cancel_request" html-disabled="true"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            </apex:pageBlock>   -->
            <!-- 20210707 SFDC-C448KZ you end
            </tr>-->
            </table>
        </div>
    </div>
    <apex:pageBlock id="searchBlock" tabStyle="Report">
        <apex:pageBlockButtons location="top">
            预计出货日
            <apex:inputField id="rentalStartDate" value="{!parentObj.Asset_loaner_start_day__c}"/>
            <apex:commandButton value="适用" action="{!applyDate}" onclick="blockme();" reRender="allForm" disabled="{!readOnly}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
            &nbsp; &nbsp;
            出库
            <apex:selectList size="1" value="{!stepName}" onchange="blockme();changeStep();return false;">
                <apex:selectOption itemValue="无" itemLabel="无"/>
                <apex:selectOption itemValue="分配" itemLabel="分配"/>
                <!-- 20210624 ljh update SFDC-C448GR -->
                <!-- <apex:selectOption itemValue="下架" itemLabel="下架"/> -->
                <apex:selectOption itemValue="发货" itemLabel="发货"/>
            </apex:selectList>
            &nbsp; &nbsp;
            <!-- 20210517 ljh update 1829 start -->
            <!-- <apex:commandButton value="扫一扫" onclick="qrscan();return false;" disabled="{!readOnly || stepName!='分配'}"/> -->
            <apex:commandButton value="扫一扫" onclick="qrscan(0);return false;" disabled="{!readOnly || stepName!='分配'}"/>
            <!-- 20210517 ljh update 1829 end -->
            <apex:commandButton value="分配" action="{!assign}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='分配'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
            <!-- 20210624 ljh update SFDC-C448GR -->
            <!-- <apex:commandButton value="下架" action="{!stockdown}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='下架'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/> -->
            <apex:commandButton value="发货" action="{!shipment}" onclick="blockme();" reRender="allForm" disabled="{!readOnly || stepName!='发货'}" oncomplete="unblockUI();checkMessage();checEventFrame();"/>
            &nbsp; &nbsp;
            <apex:commandButton value="全选/取消全选" onclick="checkGlobal(); return false;" disabled="{!readOnly}"/>
            <apex:commandButton value="取消" onclick="showCancelModal(); return false;" disabled="{!readOnly}"/>
        </apex:pageBlockButtons>
        <apex:pageBlockSection title="办事处分配">
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.Label}"/>
                <apex:outputField value="{!parentObj.Name}"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="主单预计出货日"/>
                <apex:outputText value="{0,date, yyyy/MM/dd}">
                    <apex:param value="{!masterDate}"/>
                </apex:outputText>
            </apex:pageBlockSectionItem>
            <!-- 20210508 ljh add 1672 start -->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.demo_purpose2__c.Label}"/>
                <apex:outputField value="{!parentObj.demo_purpose2__c}"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
            &nbsp;&nbsp;&nbsp;&nbsp;
            </apex:pageBlockSectionItem>
            <!-- 20210508 ljh add 1672 end -->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Name.Label}"/>
                <apex:outputPanel >
                    <apex:inputField value="{!slip.Name}" id="SlipNo" rendered="{!slipEnabled && stepName == '发货'}"/>
                    <apex:outputField value="{!slip.Name}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
                    <apex:commandButton value="扫运输单" onclick="qrscan(1);return false;" disabled="{!NOT(slipEnabled && stepName == '发货')}"/>
                    <apex:commandButton value="检索" action="{!searchSlip}" onclick="blockme();" reRender="allForm" disabled="{!NOT(slipEnabled && stepName == '发货')}" oncomplete="unblockUI();checEventFrame();"/>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryType__c.Label}"/>
                <apex:outputPanel >
                    <apex:inputField value="{!slip.DeliveryType__c}" id="deliveryType" rendered="{!slipEnabled && stepName == '发货'}"/>
                    <apex:outputField value="{!slip.DeliveryType__c}"  rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Distributor_method__c.Label}"/>
                <apex:outputPanel >
                    <apex:inputField value="{!slip.Distributor_method__c}" id="distributorMethod" rendered="{!slipEnabled && stepName == '发货'}"/>
                    <apex:outputField value="{!slip.Distributor_method__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.DeliveryCompany__c.Label}"/>
                <apex:outputPanel >
                    <apex:inputField value="{!slip.DeliveryCompany__c}" id="deliveryCompany" rendered="{!slipEnabled && stepName == '发货'}"/>
                    <apex:outputField value="{!slip.DeliveryCompany__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="发货-{!$ObjectType.FixtureDeliverySlip__c.fields.Wh_Staff__c.Label}"/>
                <apex:outputPanel >
                    <apex:inputField value="{!slip.Wh_Staff__c}" styleClass="hideDropdown" rendered="{!slipEnabled && stepName == '发货'}"/>
                    <apex:outputField value="{!slip.Wh_Staff__c}" rendered="{!NOT(slipEnabled && stepName == '发货')}"/>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
            <!-- 20201209 ljh add start-->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Delivery_Agency__c.Label}"/>
                <!-- 20210624 ljh update SFDC-C448GR start-->
                <!-- <apex:outputPanel >
                    <apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.StockDown_ng_num__c == 0 && stepName == '发货'}" />
                    <apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.StockDown_ng_num__c == 0 && stepName == '发货')}"/>
                </apex:outputPanel> -->
                <apex:outputPanel >
                    <apex:inputField value="{!parentObj.Delivery_Agency__c}" styleClass="hideDropdown" rendered="{!parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '发货'}" />
                    <apex:outputField value="{!parentObj.Delivery_Agency__c}" rendered="{!NOT(parentObj.Wei_Assigned_Cnt__c == 0 && stepName == '发货')}"/>
                </apex:outputPanel>
                <!-- 20210624 ljh update SFDC-C448GR end-->
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem html-style="display: none;">
                <apex:inputField value="{!parentObj.SalesdeptSelect__c}"  style="display: none;" />
            </apex:pageBlockSectionItem>
            <!-- 20201209 ljh add end-->
        </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:outputPanel id="message">
        <apex:pageMessages />
    </apex:outputPanel>
    <apex:outputPanel id="detail">
    <div id="out_Div_L">
            <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
                <tr class="headerRow" height="30px">
                    <td class="col_chk" align="center">
                        全选 <input type='checkbox' onClick='checkAll();' id="checker"/>
                    </td>
                    <td> 申请型号 </td>
                    <td> 存放地 </td>
                    <td> 固定资产编号(Key) </td>
                    <td> 机身编号 </td>
                    <td> 预计出货日 </td>
                    <td style="{!IF(stepName='分配','background-color: #cfeef9','')}"> 分配 </td>
                    <!-- 20210624 ljh update SFDC-C448GR -->
                    <!-- <td style="{!IF(stepName='下架','background-color: #cfeef9','')}"> 下架 </td> -->
                    <td> 借出备品一览明细状态 </td>
                    <td> 备品分类 </td><!-- 20210508 ljh add 1672  -->
                    <td> 操作 </td>
                    <!-- 20210510 ljh add 1829 -->
                </tr>
                <apex:variable value="{!0}" var="Cnt" />
                <apex:repeat id="dataline_L" value="{!esdList}" var="esdInfo">
                    <tr class="" id="tableData_L_{!Cnt}" style="{!IF(esdInfo.rec.AgencyTempCancel__c, 'display: none','')}">
                        <td class="dataCellBorder1 col_chk" align="center">
                            <apex:inputCheckbox styleClass="rowchkcls" rendered="{!esdInfo.rec.Is_Body__c}" value="{!esdInfo.checked}" id="rowCheck" disabled="{!!esdInfo.editable}" html-qrscan="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/>
                            <!-- 20210514 ljh 1829 add html-qrscan -->
                        </td>
                        <td> <apex:outputText value="{!esdInfo.tempModel}"/> </td>
                        <td> {!esdInfo.tempLocation} </td>
                        <td> {!esdInfo.tempKey}</td>
                        <td> {!esdInfo.tempSerial} </td>
                        <td>
                            <apex:inputField value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Start_Date__c}" rendered="{!esdInfo.editable && stepName=='分配'}"/>
                            <apex:outputText value="{0,date, yyyy/MM/dd}" rendered="{!NOT(esdInfo.editable && stepName=='分配')}">
                                <apex:param value="{!esdInfo.tempDate}"/>
                            </apex:outputText>
                        </td>
                        <td style="{!IF(stepName='分配','background-color: #cfeef9','')}">
                            {!esdInfo.tempStatus}
                        </td>
                        <!-- 20210624 ljh update SFDC-C448GR -->
                        <!-- <td style="{!IF(stepName='下架','background-color: #cfeef9','')}">
                            <apex:outputField value="{!esdInfo.rec.StockDown__c}"/>
                        </td> -->
                        <td> <apex:outputText value="{!esdInfo.tempDetailStatus}"/> </td>
                        <td> {!esdInfo.tempEquipmentType}</td>
                        <!-- 20210508 ljh add 1672  -->
                        <td>
                            <apex:commandButton rendered="{!esdInfo.rec.Is_Body__c}" value="分配代替品" onclick="qrscan('2;{!esdInfo.rec.Rental_Apply_Equipment_Set__c}');return false;" disabled="{!readOnly || esdInfo.IsCanSub || stepName != '分配'}"/>
                        </td>
                        <!-- 20210508 ljh add 1829  -->
                    </tr>
                    <apex:variable value="{!Cnt+1}" var="Cnt" />
                </apex:repeat>
            </table>
        </div>
    </apex:outputPanel>
    <apex:outputPanel id="checEventFrame">
        <script>
            checEventFrame();
        </script>
    </apex:outputPanel>
</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});
    scanner.addListener('scan', function (content) {
      filljsQR(content);
    });
    function qrscan(stype) {
        scanType = stype.toString();//20210518 ljh update toString 1829
        //20210514 ljh add 1829 start
        //console.log(scanType+':~'+scanType.indexOf('2;'));
        if(scanType.indexOf('2;') != -1){
            j$("input[type=checkbox][qrscan='"+scanType.split('2;')[1]+"']").prop("checked", true);
        }
        //20210514 ljh add 1829 end
        if (!standalone && !safari && ios) {
            window.location.href="sfqr://scan";
        } else {
            j$("#myModal").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$("#myModal").hide();
        });
        j$("#scanedqr").children().remove();
    }
    j$(document).ready(function(){
        j$( '#qrcode' ).unbind();
        j$( '#qrcode' ).keypress( function ( e ) {
            if ( e.which == 13 ) {
                filljsQR(j$( '#qrcode' ).val());
                return false;
            }
        });
    });
    function checEventFrame() {
        j$('select[name$="deliveryType"]').val('发货');
        j$('select[name$="deliveryType"]').prop('disabled', true);
        j$("input[name=onetoone]").siblings("input[type=checkbox]").each(function(){
            this.disabled = true;
        })
        if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
            j$("input#checker").attr('disabled', 'disabled');
        }
        else {
            j$("input#checker").removeAttr('disabled');
        }
        setTimeout(function() {
            j$('select[name$="distributorMethod"]').children('option[value="空运"]').remove();
            j$('select[name$="deliveryCompany"]').children('option[value="莱比特"],option[value="嘉里大通"]').remove();
            if (j$(escapeVfId('allPage:allForm:readOnly')).val() == 'true') {
                j$("input[type=text],select").each(function(){
                    this.disabled = true;
                })
            }
        }, 500);
    }
    // checEventFrame();
</script>
</apex:page>
force-app/main/default/pages/RentalTransfer.page
New file
@@ -0,0 +1,64 @@
<apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
    </head>
    <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
    <apex:form id="allForm">
        <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
                  <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
            </apex:actionFunction>
            <apex:outputPanel id="message">
                    <apex:pageMessages />
                    <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
                </apex:outputPanel>
        <ul style="margin : 0 auto;">
            <li><a href="" onclick="toURLPreJs('Need_off_Shelf');return false;" target="_blank" >待下架备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Tested_before_Delivery');return false;" target="_blank" >待出库前检测备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_Delivery');return false;" target="_blank" >待发货备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Products_in_Arrears_to_be_Confirmed');return false;" target="_blank" >待欠品确认备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_CDS');return false;" target="_blank" >待CDS的备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_Check');return false;" target="_blank" >待入库前检测备品一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_Repair');return false;" target="_blank" >待修理一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Need_to_On_Shelf');return false;" target="_blank" >待上架一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('Owe');return false;" target="_blank" >欠品历史一览</a></li>
            <hr />
            <li><a href="" onclick="toURLPreJs('new_report_Perfect');return false;" target="_blank" >待受理批量更新备品信息一览</a></li>
            <hr />
            <!-- <li>window.open('/apex/WebToEquipmentSetShippmentReceived','','height=700, width=1000, top=200, left=200, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')</li> -->
        </ul>
    </apex:form>
</apex:page>
force-app/main/default/pages/RentalTransfer.page-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <label>RentalTransfer</label>
</ApexPage>
force-app/main/default/pages/ServiceList.page
New file
@@ -0,0 +1,68 @@
<!--
 * @Author: zhangchunxu
 * @Date: 2023-07-18 11:26:24
 * @LastEditors: zhangchunxu
 * @LastEditTime: 2023-07-21 17:11:15
 *
 -->
 <apex:page showHeader="true" sidebar="true" Controller="SidebarController" lightningStylesheets="true">
    <head>
        <title></title>
        <style>
            ul li {
                list-style: none;
                /* line-height: 25px; */
                /* text-align: center; */
            }
            a{
                color: #1468b6;
                text-decoration:none;
                /* font-size: 20px; */
            }
        </style>
         <base target="_blank" />
    </head>
        <script>
        function toURLPreJs(name) {
            // alert(name);
            toURL(name);
        }
        function toURLJs() {
            // alert({!reportid});
            var ss = document.getElementById("hidden").value;
            //新窗口打开,还是本页面打开,还是弹窗打开请自行修改window.open
            window.open('/'+ss,'_blank');
        }
    </script>
<apex:form id="allForm">
    <apex:actionFunction name="toURL" action="{!toURL}" rerender="allForm,checEventFrame" oncomplete="toURLJs();">
              <apex:param name="firstParam" assignTo="{!DeveloperName}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="message">
                <apex:pageMessages />
                <input id="hidden" type="hidden" name="hidden" value="{!reportid}"/>
            </apex:outputPanel>
<ul style="margin : 0 auto;">
    <li><a href="/apex/XinDailyReport" target="_blank" >新建日报</a></li>
    <hr />
    <li><a href="/apex/OPDSortManage" target="_blank">OPD计划管理表</a></li>
    <hr />
    <li><a href="/setup/ui/recordtypeselect.jsp?ent=01I10000000SWfe&retURL=%2Fa0B%2Fo&save_new_url=%2Fa0B%2Fe%3FretURL%3D%252Fa0B%252Fo" target="_blank" >新建报告书(OPD/NTC/VOC)</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('OPD_Analysis');return false;" target="_blank" >OPD/SIS报告一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('NTC_Analysis');return false;" target="_blank" >NTC报告一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('On_Call_record_by_staff');return false;" target="_blank" >On-Call报告一览</a></li>
    <hr />
    <li><a href="" onclick="toURLPreJs('New_inspection');return false;" target="_blank" >点检报告书一览</a></li>
    <hr />
    <li><a href="/2i?fcf=00B10000002o8Q5" target="_blank" >保有设备一览</a></li>
    <hr />
    <li><a href="/a0A?fcf=00B100000027sl9" target="_blank" >申請中的日报 需要自己批准的</a></li>
    <hr />
</ul>
</apex:form>
</apex:page>
force-app/main/default/pages/ServiceList.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>true</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>ServiceList</label>
</ApexPage>
force-app/main/default/pages/TransferShippmentReceived1.page
@@ -283,6 +283,10 @@
                </apex:outputPanel>
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-02 zyh 机身编码换位置 -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                    <!-- 2023-08-02 zyh 机身编码换位置 -->
                </div></h2>
                <ul style="padding: 1px 0.75rem;{!IF(esdInfo.quickCheck, 'background:#BBFF66;', '')}">
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='下架', true, false)}">
@@ -313,10 +317,12 @@
                            <span><apex:outputField value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <!-- 20230718 ljh  换到下架确认下面-->
                        <li>
                        <!-- 2023-08-02 zyh 机身编码换位置 -->
                        <!-- <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编码换位置 -->
                        <li>
                            <span>上次回收后检测时间: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Asset__r.Pre_Reserve_TAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
force-app/main/default/pages/TransferShippmentReceived2.page
@@ -304,6 +304,9 @@
                </apex:outputPanel>
                <div class="menu">
                <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-02 zyh 机身编号换地方 -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                    <!-- 2023-08-02 zyh 机身编号换地方 -->
                </div></h2>
                <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                <!-- 20230718 ljh     -->
@@ -378,10 +381,12 @@
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Pre_After_Inspection_elapsed_days__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.Pre_After_Inspection_elapsed_days__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- </div> -->
                    </apex:outputPanel>
                </ul>
force-app/main/default/pages/TransferShippmentReceived3.page
@@ -109,7 +109,8 @@
        /* width: 308px; *//* 20230718 ljh  */
        text-align: left;
        margin: 0;
        background:#95aee5;
        background:#DCDCDC;
        /* background:#95aee5; */
        border-radius:8px 8px 0 0;
        padding-left: 0.75rem;/*20230628 ljh*/
    }
@@ -209,6 +210,9 @@
    .errorMsg{
        width: 140px;
    }
    .mytable tr{
        height: 35px;
    }
    /*20230625 ljh */
</style>
<div id="myModal" class="modal">
@@ -281,7 +285,7 @@
                        </th>
                    </tr>
                </table>
                <table style="border-collapse: collapse; font-size:13px;" width="80%">
                <table style="border-collapse: collapse; font-size:13px;" width="80%"  class="mytable">
                    <apex:outputPanel layout="none" rendered="{!IF(Step_status='明细', true, false)}" id="slipPanel">
                        <tr>
                            <td colspan="2"><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, true, false)}"><span style="margin-left:30px;font-weight: bold;font-size: 15px;">新建</span></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(slip.Id=null, false, true)}"><span style="margin-left:30px;font-weight: bold;">编辑:[{!slip.DeliveryCompany_SlipNo__c}]</span></apex:outputPanel></td>
@@ -374,7 +378,8 @@
                        <!-- 20230423 ljh lightning 升级 end -->
                        <input type="hidden" value="{!esdInfo.rec.TransferApply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.TransferApply__c}"/>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.inspectionFinished}">
                        <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.TransferApplySummary__c}"/><input type="hidden" value="{!esdInfo.rec.TransferApply__c}"/>
                        <!-- 20230721 ljh -->
                        <apex:inputCheckbox value="{!esdInfo.isChecked}" style="margin:0 0 0 0.75rem;"/><input type="hidden" value="{!esdInfo.rec.TransferApplySummary__c}"/><input type="hidden" value="{!esdInfo.rec.TransferApply__c}"/>
                        </apex:outputPanel>
                        <!-- 20230423 ljh lightning 升级 start -->
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3> -->
@@ -383,6 +388,9 @@
                    </apex:outputPanel>
                    <div class="menu">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </div></h2>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
                    <!-- 20230718 ljh -->
@@ -400,10 +408,12 @@
                        <li><span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_TAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_TAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </ul>
                    </div>
                    </apex:outputPanel>
@@ -443,7 +453,11 @@
                    </h2>
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.hasSended)}">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;</div>
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </div>
                    </h2>
                    </apex:outputPanel>
                    <!-- TODO 回库はSet単位で、明細一つ一つのquickCheck要らないが、SetのquickCheck要る? -->
@@ -462,10 +476,12 @@
                        <li><span>上次回收后检测时间: </span>
                            <span><apex:outputField rendered="{!IF(esdInfo.rec.Asset__r.Pre_Reserve_TAES_Detail__c==null, false, true)}" value="{!esdInfo.rec.Asset__r.Pre_Reserve_TAES_Detail__r.After_Inspection_time__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        <li>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </ul>
                    </div>
                </apex:outputPanel>
force-app/main/default/pages/TransferShippmentReceived4.page
@@ -333,20 +333,23 @@
        border:1px solid #D1D1D1;
    }
    .menu div.m_title{
        width: 308px;
        /* width: 308px; */ /*20230722 ljh*/
        text-align: left;
        margin: 0;
        background:#95aee5;
        background:#DCDCDC;
        /* background:#95aee5; */
        border-radius:8px 8px 0 0;
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .menu div.m_titleg{
        width: 308px;
        /* width: 308px; */
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        border-radius:8px 8px 0 0;
        /*height: 42px;*/
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .dateFormat {
        display: none;
@@ -365,7 +368,7 @@
        position: relative;
        /* 20230424 ljh lightning 升级 start */
        /* width: 20%; */
        width: 30%;
        width: 50%;
        /* 20230424 ljh lightning 升级 end */
        float: left;
        margin: 0;
@@ -389,7 +392,7 @@
    }
    div#main {
        width: 320px;
        /* width: 320px; */
    }
    hr {
@@ -397,7 +400,9 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /* 20230722 ljh */
        /* width: 90%; */
        width: 98%;
    }
    .close {
        color: #aaaaaa;
@@ -475,10 +480,10 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
                <div style="text-align: right;margin-top: 10px;">
                    <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
                </div>
                <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
            <table style="border-collapse: collapse; font-size:13px;">
                <colgroup>
                    <col width="150" />
@@ -497,7 +502,31 @@
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn(2)" value="扫一扫备品" rerender="dummy"/>
                <input type="hidden" id="QRType" value="1"/>
                <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail2();return false" value="全部OK" rerender="dummy"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab" style="margin:0;">
                                <li class="selected"><span class="tabsize">欠品确认</span></li>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn(2)" value="扫一扫备品" rerender="dummy"/>
                            <input type="hidden" id="QRType" value="1"/>
                            <apex:commandButton styleClass="commandbutton" onclick="checkAllDetail2();return false" value="全部OK" rerender="dummy"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();return false;" value="保存"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
        <div id="detailDiv" class="detail">
@@ -526,88 +555,132 @@
                    <div class="m_title">
                        <h2>
                            &nbsp;<apex:outputField value="{!esdInfo.rec.Fixture_Name_F__c}" />&nbsp;&nbsp;
                            <!-- 2023-08-02 zyh 机身编号换地方 -->
                            <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/>)</span>
                            <!-- 2023-08-02 zyh 机身编号换地方 -->
                        </h2>
                    </div>
                    </apex:outputPanel>
                    <ul data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="font-size:14px;">
                    <!-- 20230721 ljh -->
                    <ul data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" style="font-size:14px;padding: 1px 0.75rem;">
                        <apex:inputField value="{!esdInfo.rec.Loaner_accsessary__c}" style="display:none"/>
                        <!-- 20201209 ljh add -->
                        <apex:outputPanel layout="none" rendered="{!IF(AND(esdInfo.rec.ArrivalResult__c != null,esdInfo.rec.ArrivalResult__c !=''), true, false)}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.ArrivalResult__c.label} : </span>
                        <apex:outputField value="{!esdInfo.rec.ArrivalResult__c}" style="margin:3px;width:75px" />
                        <br/>
                        <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.ArrivalResult__c.label} : </span>
                        <apex:outputField value="{!esdInfo.rec.ArrivalResult__c}" style="margin:3px;" />
                        </li>
                        </apex:outputPanel>
                        <!-- 20201209 ljh add -->
                        <!-- 20210426 ljh add 1832 start-->
                        <apex:outputPanel layout="none" rendered="{!IF(AND(esdInfo.rec.Return_DeliverySlip__c != null,esdInfo.rec.ArrivalResult__c == 'NG',esdInfo.rec.Arrival_NG_Comment__c !=''), true, false)}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Arrival_NG_Comment__c.label} : </span>
                        <apex:outputField value="{!esdInfo.rec.Arrival_NG_Comment__c}" style="margin:3px;width:75px" />
                        <br/>
                        <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.Arrival_NG_Comment__c.label} : </span>
                        <apex:outputField value="{!esdInfo.rec.Arrival_NG_Comment__c}" style="margin:3px;" />
                        </li>
                        </apex:outputPanel>
                        <!-- 20210426 ljh add 1832 end-->
                        <!-- === -->
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), true, false)}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><apex:inputField id="checkLost" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}"><apex:outputField value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px" /></apex:outputPanel>
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item__c.label} :
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                                <span><apex:inputField id="checkLost" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;" onchange="changeCheckLost(this)"/> </span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                                <span><apex:outputField value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;" /></span>
                            </apex:outputPanel></span>
                            </li>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true   )}">
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item__c.label} : </span>
                        <apex:outputField id="checkLost3" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;width:75px"/><br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item_Final__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" onchange="changeCheckLost(this)"/></apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;width:75px" /></apex:outputPanel>
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item__c.label} : </span>
                            <apex:outputField id="checkLost3" value="{!esdInfo.rec.Check_lost_Item__c}" style="margin:3px;"/>
                            </li>
                        </apex:outputPanel>
                        <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_Memo__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                                <apex:inputField id="lostMemo" value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || (esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK'))}">
                                <apex:outputField value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;"/>
                            </apex:outputPanel>
                        </li>
                        <!-- 最初最终对出现 -->
                        <apex:outputPanel layout="none" rendered="{!IF(OR(esdInfo.rec.Check_lost_Item__c='OK',esdInfo.rec.Check_lost_Item__c=''), false, true   )}">
                            <li>
                                <span>{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item_Final__c.label} : </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkLost2" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;" onchange="changeCheckLost(this)"/></apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField id="checkLost4" value="{!esdInfo.rec.Check_lost_Item_Final__c}" style="margin:3px;" /></apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
                            <apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
                            <apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;"/>
                            </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <!-- === -->
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.slipId=null, true, false)}">
                        <input type="hidden" name="noSlip" value="1"/>
                        </apex:outputPanel>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.NoItemReturn__c.label}: </span>
                        <apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;width:75px;"/>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_Memo__c.label}: </span>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                        <apex:inputField id="lostMemo" value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || (esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK'))}">
                        <apex:outputField value="{!esdInfo.rec.Lost_item_Memo__c}" style="margin:3px;width:75px;"/>
                        </apex:outputPanel>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                        <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.NoItemReturn__c.label}:
                        <apex:outputField value="{!esdInfo.rec.NoItemReturn__c}" style="margin:3px;"/></span>
                        </li>
                        <!-- <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Check_lost_Item__c != null && esdInfo.rec.Check_lost_Item__c != 'OK' }">
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_Memo_Final__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗'}">
                            <apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
                            </apex:outputPanel>
                            <apex:inputField id="lostMemo2" value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;"/>
                            </apex:outputPanel>s
                            <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗'}">
                            <apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;width:75px;"/>
                            <apex:outputField value="{!esdInfo.rec.Lost_item_Memo_Final__c}" style="margin:3px;"/>
                            </apex:outputPanel>
                        </apex:outputPanel>
                        <br/>
                            </li>
                        </apex:outputPanel> -->
                        <apex:outputPanel layout="none" rendered="{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_giveup__c.accessible}">
                        <!-- 20230424 ljh lightning 升级 start -->
                        <!-- &nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_giveup__c.label} : <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel> -->
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_giveup__c.label} :</span> <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
                        <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_giveup__c.label} :</span> <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && NOT(esdInfo.rec.Lost_item_giveup__c) && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxGiveUp" value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
                        <!-- 20230424 ljh lightning 升级 end -->
                        <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Lost_item_giveup__c || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}"/></apex:outputPanel>
                        <br/>
                        </li>
                        </apex:outputPanel>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.CDS_complete__c.label} : </span>
                        <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.CDS_complete__c.label} : </span>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.slipId=null, false, true)}">
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="checkboxCDS" value="{!esdInfo.rec.CDS_complete__c}" onchange="changeCheckCds(this);"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDS_complete__c}"/></apex:outputPanel>
                        </apex:outputPanel>
                        </li>
                        <apex:outputPanel layout="none" rendered="{!IF(esdInfo.slipId=null, false, esdInfo.rec.Main_OneToOne__c)}">
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.CDSChargement__c.label} : </span>
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.CDSChargement__c.label} : </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSChargement" value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSChargement__c}"/></apex:outputPanel>
                            <br/>
                            <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.CDSType__c.label} : </span>
                            </li>
                            <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.CDSType__c.label} : </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable && esdInfo.rec.Check_lost_Item_Final__c != '消耗')}"><apex:inputField id="CDSType" value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable) || esdInfo.rec.Check_lost_Item_Final__c == '消耗')}"><apex:outputField value="{!esdInfo.rec.CDSType__c}"/></apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.TransferApplyDetail__c.fields.SerialNumber_F__c.label}: </span>
                        <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                        <span>{!$ObjectType.TransferApplyDetail__c.fields.SerialNumber_F__c.label}: </span>
                        <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/></span>
                        </li> -->
                            <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </ul>
                    </div>
                </apex:outputPanel>
force-app/main/default/pages/TransferShippmentReceived5.page
@@ -114,11 +114,12 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /* width: 308px; */ /*20230722 ljh*/
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        border-radius:8px 8px 0 0;
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .dateFormat {
        display: none;
@@ -137,7 +138,7 @@
        position: relative;
        /* 20230424 ljh lightning 升级 start */
        /* width: 24%; */
        width: 30%;
        width: 50%;
        /* 20230424 ljh lightning 升级 end */
        float: left;
        margin: 0;
@@ -161,7 +162,7 @@
    }
    div#main {
        width: 320px;
        /* width: 320px; */
    }
    hr {
@@ -169,7 +170,9 @@
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230722 ljh  */
        /* width: 90%; */
        width: 98%;
    }
    .close {
        color: #aaaaaa;
@@ -218,7 +221,8 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- 20230722 ljh -->
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
@@ -228,7 +232,7 @@
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    状态切换btn
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                            <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">入库前检测</span></li>
@@ -240,7 +244,31 @@
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='入库前检测', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='入库前检测', true, false)}"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab"  style="margin:0;">
                                <ul id="Step_tab">
                                    <li onclick="javascript:Shippment1();" class="selected"><span class="tabsize">入库前检测</span></li>
                                    <li onclick="javascript:Shippment2();"><span class="tabsize">上架</span></li>
                                </ul>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='入库前检测', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='入库前检测', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                        </th>
                    </tr>
                </table>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -255,58 +283,72 @@
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.TransferApplySummary__c, false, true)}">
                    <hr/>
                    <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3>
                    <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.fsName}</h3>
                    <apex:variable var="SetName" value="{!esdInfo.rec.TransferApplySummary__c}" />
                </apex:outputPanel>
                <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3>
                        <h3 style="padding: 5px 0.75rem;" class="detailtab">{!esdInfo.fsName}</h3>
                    </apex:outputPanel>
                <div class="menu">
                <div class="m_title"><h2>&nbsp; <apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp; </h2></div>
                <ul>
                <div class="m_title"><h2><apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp;
                    <!-- 2023-08-02 zyh 机身编号换地方 -->
                    <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/>)</span>
                    <!-- 2023-08-02 zyh 机身编号换地方 -->
                </h2></div>
                <!-- 20230722 ljh -->
                <ul style="padding: 1px 0.75rem;" >
                    <!-- <apex:outputPanel layout="none" rendered="{!IF(Step_status='入库前检测', true, false)}"> -->
                        <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Check_lost_Item_F__c.label}: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Check_lost_Item_F__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230722 ljh width:75px;-->
                            <apex:outputField value="{!esdInfo.rec.Check_lost_Item_F__c}" style="margin:3px;"/></span>
                        </li>
                        <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Lost_item_giveup__c.label}: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}" style="margin:3px;width:75px;"/></span>
                            <!-- 20230722 ljh width:75px;-->
                            <apex:outputField value="{!esdInfo.rec.Lost_item_giveup__c}" style="margin:3px;"/></span>
                        </li>
                        <apex:outputPanel layout="none" rendered="{!esdInfo.rec.Inspection_result_after_ng__c='维修'}">
                            <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                                <span>检测结果: </span><span>
                                <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" />
                                <!-- 20230722 ljh width:75px;-->
                                <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;" />
                                </span>
                            </li>
                            <li>
                                <span>检测NG区分: </span><span>
                                <apex:outputField value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;width:75px;"/></span>
                                <!-- 20230722 ljh width:75px;-->
                                <apex:outputField value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;"/></span>
                            </li>
                            <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                                <span>最终检测结果: </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                                <apex:inputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" />
                                <!-- 20230722 ljh width:75px;-->
                                <apex:inputField id="inspectionResult2" value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 2);" />
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;width:75px;" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_Final__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span>最终NG区分: </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
                                <apex:inputField id="inspectionResultNg2" value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 2);" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <apex:inputField id="inspectionResultNg2" value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;;" onchange="changeResultNg('{!indexloop}', 2);" /></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;width:75px;" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_NG_Final__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span>{!$ObjectType.TransferApplyDetail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
                                <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" />
                                </span>
                                <!-- <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /> -->
                                <apex:inputField id="inspectionResultNg4" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;" />
                            </span>
                                <script>
                                    disabledShowNg4();
                                    function disabledShowNg4() {
@@ -318,7 +360,9 @@
                                </script>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
                                <!-- 20230722 ljh  -->
                                <!-- <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span> -->
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
@@ -326,25 +370,29 @@
                            <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" >
                                <span>检测结果: </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                                <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" />
                                <!-- 20230722 ljh width:75px;-->
                                <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 1)" />
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span>检测NG区分: </span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
                                <apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <apex:inputField id="inspectionResultNg" value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;" onchange="changeResultNg('{!indexloop}', 1)" /></span>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;width:75px;" /></span>
                                <!-- 20230722 ljh width:75px;-->
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after_ng__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                            <li>
                                <span>{!$ObjectType.TransferApplyDetail__c.fields.Inspection_NG_abord_reason__c.label}:</span>
                                <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}"><span>
                                <apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;"/>
                                <apex:inputField id="inspectionResultNg3" value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;"/>
                                </span>
                                <script>
                                    disabledShowNg3();
@@ -357,23 +405,25 @@
                                </script>
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!NOT(esdInfo.editable)}">
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;width:90%;float:left;" /></span>
                                <span><apex:outputField value="{!esdInfo.rec.Inspection_NG_abord_reason__c}" style="margin:3px;" /></span>
                                </apex:outputPanel>
                            </li>
                        </apex:outputPanel>
                        <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.Inspection_Comment__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!(esdInfo.editable)}">
                            <span><apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
                            <span><apex:inputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;"/></span>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!(NOT(esdInfo.editable))}">
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;width:90%;float:left;"/></span>
                            <span><apex:outputField value="{!esdInfo.rec.Inspection_Comment__c}" style="margin:3px;"/></span>
                            </apex:outputPanel>
                        </li>
                        <li>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                            <span>{!$ObjectType.TransferApplyDetail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;"/></span>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <script>
                            function changeResultNg(index, kubun) {
force-app/main/default/pages/TransferShippmentReceived6.page
@@ -122,11 +122,12 @@
</script>
<style type="text/css">
    .menu div.m_title{
        width: 308px;
        /* width: 308px; *//*20230723 ljh*/
        text-align: left;
        margin: 0;
        background:#DCDCDC;
        border-radius:8px 8px 0 0;
        padding-left: 0.75rem;/*20230721 ljh  */
    }
    .menu blockquote{
        margin: 0;
@@ -155,7 +156,7 @@
        position: relative;
        /* 20230424 ljh lightning 升级 start */
        /* width: 20%; */
        width: 30%;
        width: 50%;
        /* 20230424 ljh lightning 升级 end */
        float: left;
        margin: 0;
@@ -179,14 +180,16 @@
    }
    div#main {
        width: 320px;
        /* width: 320px; *//*20230723 ljh*/
    }
    hr {
        border-top: 2px dotted #f00;
        color: #fff;
        background-color: #fff;
        height: 1px;
        width: 90%;
        /*20230722 ljh  */
        /* width: 90%; */
        width: 98%;
    }
    .close {
        color: #aaaaaa;
@@ -234,7 +237,7 @@
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <div style="text-align: right;margin-top: 10px;">
            <!-- <div style="text-align: right;margin-top: 10px;">
                <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
            </div>
            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
@@ -244,7 +247,7 @@
                    <col width="170" />
                </colgroup>
                <tr>
                    <!-- 状态切换btn -->
                    状态切换btn
                    <th colspan="2" style="font-size:20px;text-align: center;width:380px;">
                        <ul id="Step_tab">
                            <li class="selected"><span class="tabsize">上架</span></li>
@@ -256,7 +259,30 @@
            <div style="text-align: right">
                <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
            </div>
            </div> -->
            <apex:pageBlock >
                <table style="border-collapse: collapse; font-size:13px;">
                    <colgroup>
                        <col width="20%" />
                        <col width="80%" />
                    </colgroup>
                    <tr>
                        <!-- 状态切换btn -->
                        <th  style="font-size:20px;text-align: center;width:280px;height: 50px;" >
                            <ul id="Step_tab" style="margin:0;">
                                <li class="selected"><span class="tabsize">上架</span></li>
                            </ul>
                        </th>
                        <th width="900px;" style="padding-left:50px;" class="myBtn">
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn()" value="扫一扫" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="filljs1();" value="全部OK" rerender="dummy" rendered="{!IF(Step_status='上架', true, false)}"/>
                            <apex:commandButton styleClass="commandbutton" onclick="savejs();" value="保存" rerender="dummy" disabled="{!saveBtnDisabled}"/>
                            <apex:outputText id="saveBtnDisabled" value="{!saveBtnDisabled}" style="display: none;"/>
                        </th>
                    </tr>
                </table>
                <div style="font-size: 14px;">缺少一对一回库:<apex:inputCheckbox value="{!forceSave}" /></div>
            </apex:pageBlock>
        </div>
        <apex:outputPanel id="detail">
@@ -291,14 +317,16 @@
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(SetName=esdInfo.rec.TransferApplySummary__c, false, true)}">
                        <hr/>
                        <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3>
                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.TransferApplySummary__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!esdInfo.rec.Main_OneToOne__c}"/>
                        <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3> -->
                        <span style="padding: 5px 0.75rem;font-weight: bold;"  class="detailtab">{!esdInfo.fsName}</span>
                        <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.TransferApplySummary__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!esdInfo.rec.Main_OneToOne__c}" style="margin-bottom: 5px;"/>
                        <apex:variable var="SetName" value="{!esdInfo.rec.TransferApplySummary__c}" />
                    </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}">
                            <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3>
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.TransferApplySummary__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!esdInfo.rec.Main_OneToOne__c}"/>
                            <!-- <h3 style="padding: 5px;" class="detailtab">{!esdInfo.fsName}</h3> -->
                            <span style="padding: 5px 0.75rem;font-weight: bold;"  class="detailtab">{!esdInfo.fsName}</span>
                            <apex:commandButton styleClass="commandbutton" onclick="qrsacn2('{!esdInfo.rec.TransferApplySummary__c}')" value="扫一扫附属品" rerender="dummy" rendered="{!esdInfo.rec.Main_OneToOne__c}" style="margin-bottom: 5px;"/>
                        </apex:outputPanel>
                    <apex:outputPanel layout="none" rendered="{!IF(esdInfo.errorInfo=null, false, true)}">
                        <div>
@@ -307,8 +335,13 @@
                    </apex:outputPanel>
                    <div class="menu">
                    <h2><div class="m_title">&nbsp;<apex:outputField value="{!esdInfo.rec.AssetName__c}" />&nbsp;&nbsp;<apex:outputPanel layout="none" rendered="{!esdInfo.rec.OneToOneAccessory__c}">(一对一附属品)</apex:outputPanel>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <span>(<apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/>)</span>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </div></h2>
                    <ul>
                    <!-- 20230722 ljh -->
                    <ul style="padding: 1px 0.75rem;" >
                        <li>
                            <span>检测结果: </span><span>
                            <apex:outputField value="{!esdInfo.rec.Inspection_result_after_F__c}" style="margin:3px;width:75px;"/></span>
@@ -320,7 +353,10 @@
                        <li data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}">
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Arrival_in_wh__c.label}: </span>
                            <apex:outputPanel layout="none" rendered="{!esdInfo.editable}">
                                <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;width:75px;" />
                                <!-- 20230424 ljh lightning 升级 start -->
                                <!-- <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;width:75px;" /> -->
                                <apex:inputField id="arrivalin" value="{!esdInfo.rec.Arrival_in_wh__c}" style="margin:3px;" />
                                <!-- 20230424 ljh lightning 升级 end -->
                                <apex:outputPanel layout="none" rendered="{!esdInfo.rec.OneToOneAccessory__c}">
                                    <input type="hidden" name="onetoone" value="{!esdInfo.rec.TransferApplySummary__c}"/>
                                </apex:outputPanel>
@@ -348,10 +384,12 @@
                                <span><apex:outputField value="{!esdInfo.rec.Asset__r.WH_location__c}" style="margin:3px;width:75px;"/></span>
                            </apex:outputPanel>
                        </li>
                        <li>
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                        <!-- <li>
                            <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}: </span>
                            <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span>
                        </li>
                        </li> -->
                        <!-- 2023-08-02 zyh 机身编号换地方 -->
                    </ul>
                    </div>
                </apex:outputPanel>
force-app/main/default/staticresources/ConsumTrialPageCss.css
@@ -1,59 +1,59 @@
td .dateFormat  {
    display: none;
  display: none;
}
div.inline { float:left; }
.clearBoth { clear:both; }
div.reportBlock table.list {
  width:auto;
width:auto;
}
div#out_Div { /* ここにヘッダを格納 */
  position:relative;
  overflow: hidden;
  float:left;
  /* zq 去掉固定宽度 */
  /* width:32768px; */
position:relative;
overflow: hidden;
float:left;
/* zq 去掉固定宽度 */
/* width:32768px; */
}
div#out_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
position:relative;
overflow: hidden;
float:left;
}
div#in_Div {/* tbodyが入っている。ここがスクロール対象*/
  position:relative;
  overflow: auto;  /*スクロールバー*/
  float:left;
  /* zq 去掉固定宽度 */
  /* width:32768px; */
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
position:relative;
overflow: auto;  /*スクロールバー*/
float:left;
/* zq 去掉固定宽度 */
/* width:32768px; */
height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
}
div#in_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
  height: 100px;
position:relative;
overflow: hidden;
float:left;
height: 100px;
}
body .pbBody table.list tr.headerRow td {
  box-sizing: border-box;
  text-align:center;font-weight:normal;
  padding:0px 0px 0px 1px;
box-sizing: border-box;
text-align:center;font-weight:normal;
padding:0px 0px 0px 1px;
}
body .pbBody table.list tr.headerRow td.header1 {
  text-align:center;font-weight:normal;
  padding:0px 0px 0px 0px;
text-align:center;font-weight:normal;
padding:0px 0px 0px 0px;
}
body .pbBody table.list tr.dataRow td {
  box-sizing: border-box;
  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
box-sizing: border-box;
padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
}
body .pbBody table.list tr.dataRow td.dataCellBorder  {
  /* いらない、使っていない */
  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
/* いらない、使っていない */
padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
}
body .pbBody table.list tr.dataRow td.dataCellBorder1 {
  padding:0px 0px 0px 1px;
  border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
padding:0px 0px 0px 1px;
border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
}
@-moz-document url-prefix() {
body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;}
@@ -65,10 +65,10 @@
table.list td input {width:85%;}
/* zq 选框样式调整 */
table.list td.col_chk {
  width: 30px;
  height: 30px;
  justify-content: center;
  text-align: center;
width: 30px;
height: 30px;
justify-content: center;
text-align: center;
}
/* zq 添加行高  */
table.list td.col_Fixture_Model_No_F__c {width:180px;line-height: 30px;}
@@ -96,52 +96,52 @@
table.list td.col_UpDown {width:120px;text-align:center;}
table.list td textarea {
  height:50px;
  width:90%;
height:50px;
width:90%;
}
/* zq 调整表格样式 start */
#tableData td{
  display: flex;
  align-items: center;
  height: inherit;
  text-align: center;
  line-height: 1.1rem;
display: flex;
align-items: center;
/* height: inherit; */
text-align: center;
line-height: 1.1rem;
}
#tableHeader .headerRow td{
  display: inline-block;
  height: 30px;
  line-height: 30px;
display: inline-block;
height: 30px;
line-height: 30px;
}
.searchTable td>span, select, input{
  margin-left: 5px;
margin-left: 5px;
}
table.list td.col_Spare__c input{
  width: 20px;
  height: 20px;
width: 20px;
height: 20px;
}
#tableData_R_0{
  display: flex;
display: flex;
}
#tableHeader .headerRow td{
  display: flex;
  justify-content: center;
  flex-direction: row;
display: flex;
justify-content: center;
flex-direction: row;
}
body .headerRow{
  display: flex;
display: flex;
}
/* zq 调整表格样式 end */
/* zq 选择框居中 */
td.col_chk input{
  width: 16px !important;
  height: 16px !important;
  justify-content: center;
  /* margin-top: 4px; */
width: 16px !important;
height: 16px !important;
justify-content: center;
/* margin-top: 4px; */
}
#tableHeader_L td.col_chk {
  display: flex;
  align-items: center;
display: flex;
align-items: center;
}
/*URLFOR($Resource なのでRelationListPagingCmpCssに入れません*/
/*
force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css
@@ -1,109 +1,186 @@
@charset "utf-8";
.detail {
   margin-left:5px;
   width:310px;
    /* margin-left:5px;*/
    /*width:310px;*/
}
.menu {
   padding:0px;
   border-left:1px solid #D1D1D1;
   border-right:1px solid #D1D1D1;
    padding:0px;
    border-left:1px solid #D1D1D1;
    border-right:1px solid #D1D1D1;
}
.menu h2{
   margin:0;
   padding:0;
   font-size:14px;
    margin:0;
    padding:0;
    font-size:16px;
}
.menu h2 div {
    width: 308px;
    text-align: left;
    margin: 0;
    background:#DCDCDC;
    /*width: 308px;*//*20230615 ljh*/
    text-align: left;
    margin: 0;
    background:#DCDCDC;
}
.menu ul{
   margin:0;
   padding:1px;
   list-style: none;
   border-top:1px solid #ddd;
    margin:0;
    padding:1px;
    list-style: none;
    border-top:1px solid #ddd;
}
.menu li {
   padding:0;
   font-size:14px;
   line-height:1.0;
   /* 2023-04-23   zyh   lightning升级   start */
   height:33px;
   /* height:23px; */
   /* 2023-04-23   zyh   lightning升级   end */
   clear:both;
   /*border-bottom: 1px dotted #999;*/
    padding:0;
    font-size:16px;
    /* line-height:1.0; */
    /* 2023-04-23   zyh   lightning升级   start */
    /* height:33px; */
    /* height:23px; */
    /* 2023-04-23   zyh   lightning升级   end */
    clear:both;
    /*border-bottom: 1px dotted #999;*/
    border-bottom: var(--lwc-borderWidthThin,1px) solid var(--slds-g-color-border-base-1, var(--lwc-colorBorder,rgb(229, 229, 229)))
}
.menu li span {
    width: 140px;
    text-align: right;
    float: left;
    margin: 5px 0px 0px 0px;
}
/* .menu li span {
    width: 140px;
    text-align: right;
    float: left;
    margin: 5px 0px 0px 0px;
    height: 33px;
    line-height:33px;
} */
.menu li span span{
    text-align: left;
    margin-left: 3px;
    margin-top: 0px;
    text-align: left;
    margin-left: 3px;
    margin-top: 0px;
}
.commandbutton {
   font-size: 13px !important;
    font-size: 13px !important;
}
.tabsize {
   font-size: 14px !important;
    font-size: 14px !important;
}
.detailtab {
   font-size: 14px;
    font-size: 16px;
}
.detailhander {
   font-size: 16px;
    font-size: 16px;
}
.deliveryslip {
   font-size: 15px;
    font-size: 15px;
}
.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 */
    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-left: 6px;
   margin-top: 100px;
   padding: 20px;
   border: 1px solid #888;
   width: 265px; /* Could be more or less, depending on screen size */
    background-color: #fefefe;
    margin-left: 6px;
    margin-top: 100px;
    padding: 20px;
    border: 1px solid #888;
    width: 265px; /* Could be more or less, depending on screen size */
}
.freezehander {
   position: fixed;
   top: 0px;
   background-color:
   white;
   width: 320px;
   z-index: 1;
}
    /*20230615 ljh*/
    position: fixed;
    top: 0px;
    background-color:white;
    /*width: 320px;*/
    z-index: 1;
    /*20230615 ljh*/
}
/***********************/
.menu ul{
    /* display: flex; */
    list-style: none;
    margin-bottom: 5px;
}
.menu ul li{
   /*  flex: 1;
    height: 55px;
    max-width:200px;  */
    width: calc(50% - 30px);
    display: inline-block;
    margin-left: 0;
}
.menu ul li Span{
    /* display:inline-block; */
    height: 50px;
    line-height:50px;
}
.menu ul li input[type="checkbox"]{
    width:16px;
    height:16px;
}
.myBtn .btn{
    margin: 1px 20px;
}
body .btn{
    -webkit-appearance: none;
    position: relative;
    // margin: 1px 20px;
    display: inline-block;
    border: 1px solid transparent;
    font-size: .75rem;
    line-height: 1.875rem;
    text-decoration: none;
    white-space: normal;
    border-radius: 0.25rem;
    background: transparent;
    background-clip: border-box;
    color: rgba(1, 118, 211, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: color .05s linear,background-color .05s linear;
    transition: color .05s linear,background-color .05s linear;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    vertical-align: middle;
    border: 1px solid rgb(201, 201, 201);
    -webkit-transition: border 0.15s linear;
    transition: border 0.15s linear;
    border-color: rgb(201, 201, 201);
    background-color: rgb(255, 255, 255);
}
body input.btn{
    padding: 4px 1rem;
}
body input[type="text"],body select,span select{
    border: 1px solid rgb(201, 201, 201);
    border-radius: 0.25rem;
    display: inline-block;
    padding: 0 1rem 0 0.75rem;
    min-height: calc(1.875rem + (1px * 2)) !important;
    line-height: 1.875rem !important;
    /* background-color: rgb(255, 255, 255); */
    transition: border .1s linear,background-color .1s linear;
    max-width: 100%;
    color: rgb(24, 24, 24);
}
/***********************/
force-app/main/default/staticresources/EquipmentSetShippmentReceivedcss.css.bak
New file
@@ -0,0 +1,109 @@
@charset "utf-8";
.detail {
   margin-left:5px;
   width:310px;
}
.menu {
   padding:0px;
   border-left:1px solid #D1D1D1;
   border-right:1px solid #D1D1D1;
}
.menu h2{
   margin:0;
   padding:0;
   font-size:14px;
}
.menu h2 div {
    width: 308px;
    text-align: left;
    margin: 0;
    background:#DCDCDC;
}
.menu ul{
   margin:0;
   padding:1px;
   list-style: none;
   border-top:1px solid #ddd;
}
.menu li {
   padding:0;
   font-size:14px;
   line-height:1.0;
   /* 2023-04-23   zyh   lightning升级   start */
   height:33px;
   /* height:23px; */
   /* 2023-04-23   zyh   lightning升级   end */
   clear:both;
   /*border-bottom: 1px dotted #999;*/
}
.menu li span {
    width: 140px;
    text-align: right;
    float: left;
    margin: 5px 0px 0px 0px;
}
.menu li span span{
    text-align: left;
    margin-left: 3px;
    margin-top: 0px;
}
.commandbutton {
   font-size: 13px !important;
}
.tabsize {
   font-size: 14px !important;
}
.detailtab {
   font-size: 14px;
}
.detailhander {
   font-size: 16px;
}
.deliveryslip {
   font-size: 15px;
}
.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 */
}
/* Modal Content/Box */
.modal-content {
   background-color: #fefefe;
   margin-left: 6px;
   margin-top: 100px;
   padding: 20px;
   border: 1px solid #888;
   width: 265px; /* Could be more or less, depending on screen size */
}
.freezehander {
   position: fixed;
   top: 0px;
   background-color:
   white;
   width: 320px;
   z-index: 1;
}
force-app/main/default/staticresources/ReceivingNotePageCss.css
@@ -11,7 +11,7 @@
  position:relative;
  overflow: hidden;
  float:left;
  width:32768px;
  /* width:32768px; *//*20230705 ljh*/
}
div#out_Div_L {
  position:relative;
@@ -22,7 +22,7 @@
  position:relative;
  overflow: auto;  /*スクロールバー*/
  float:left;
  width:32768px;
  /* width:32768px; *//*20230705 ljh*/
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
}
div#in_Div_L {
@@ -60,7 +60,7 @@
table.list td {width:100px;}
table.list td.col_noChk {width:0px;}
table.list td select {width:95%;}
table.list td input {width:95%;}
/* table.list td input {width:95%;} *//*20230705 ljh*/
table.list td.col_Fixture_Model_No__c {width:230px;}
table.list td.col_ProductName__c {width:230px;}
table.list td.col_Fixture_Model_No_F__c {width:230px;}
force-app/main/default/staticresources/ReceivingNotePageCss.css.bak
New file
@@ -0,0 +1,88 @@
td .dateFormat  {
    display: none;
}
div.inline { float:left; }
.clearBoth { clear:both; }
div.reportBlock table.list {
  width:auto;
}
div#out_Div { /* ここにヘッダを格納 */
  position:relative;
  overflow: hidden;
  float:left;
  /* width:32768px; *//*20230705 ljh*/
}
div#out_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
}
div#in_Div {/* tbodyが入っている。ここがスクロール対象*/
  position:relative;
  overflow: auto;  /*スクロールバー*/
  float:left;
  /* width:32768px; *//*20230705 ljh*/
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
}
div#in_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
  height: 100px;
}
body .pbBody table.list tr.headerRow td {
  box-sizing: border-box;
  text-align:center;font-weight:normal;
  padding:0px 0px 0px 1px;
}
body .pbBody table.list tr.headerRow td.header1 {
  text-align:center;font-weight:normal;
  padding:0px 0px 0px 0px;
}
body .pbBody table.list tr.dataRow td {
  box-sizing: border-box;
  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
}
body .pbBody table.list tr.dataRow td.dataCellBorder  {
  /* いらない、使っていない */
  padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
}
body .pbBody table.list tr.dataRow td.dataCellBorder1 {
  padding:0px 0px 0px 1px;
  border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
}
@-moz-document url-prefix() {
body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;}
}
table.list td {width:100px;}
table.list td.col_noChk {width:0px;}
table.list td select {width:95%;}
table.list td input {width:95%;}
table.list td.col_Fixture_Model_No__c {width:230px;}
table.list td.col_ProductName__c {width:230px;}
table.list td.col_Fixture_Model_No_F__c {width:230px;}
table.list td.col_Fixture_Model_Name_F__c  {width:230px;}
table.list td textarea {
  height:50px;
  width:90%;
}
/*URLFOR($Resource なのでRelationListPagingCmpCssに入れません*/
/*
body .pbBody table.list tr.headerRow td.colViewing {
  // デフォルト値、最小化アイコンを表示
  background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
  background-repeat:no-repeat;
}
body .pbBody table.list tr.headerRow td.colUnHideIcon {
  //最大化アイコンを表示
  background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
  background-repeat:no-repeat;
}
*/
body .pbBody table.list tr.headerRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
body .pbBody table.list tr.dataRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
force-app/main/default/staticresources/RelationListPagingCmpCss.css
@@ -12,7 +12,6 @@
  overflow: hidden;
  float:left;
  /* width:32768px; */ /* 20230523 ljh lightning */
  /* width: 1200px; */
}
div#out_Div_L {
  position:relative;
@@ -24,14 +23,13 @@
  overflow: auto;  /*スクロールバー*/
  float:left;
  /* width:32768px; */ /* 20230523 ljh lightning */
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
  /* width: 1200px; */
  /* height: 100px; *//* tbodyを表示する高さ、後でjsにて調整 */ /*20230607 ljh lightning*/
}
div#in_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
  height: 100px;
  /* height: 100px; *//*20230607 ljh lightning*/
}
body .pbBody table.list tr.headerRow td {
@@ -110,10 +108,10 @@
  color: #000;
  white-space:normal;
}
table#tableData{
/* table#tableData{
  width: 1000px;
}
table#tableHeader{
  width: 1000px;
}
} */
/* 20230508 ljh lightning切换 start */
force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -338,8 +338,9 @@
    sbwidth = scrollbarWidth();
    // 20230531 ljh start 
    // blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()- sbwidth;
    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
    // blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()- sbwidth;
    var tableWidth = j$('table#tableData').width();
    // 20230531 ljh end 
    //コンポネートなのでIDを変更
    // 20230519 ljh start
@@ -377,7 +378,8 @@
        // j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
        // j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
        // 20230704 ljh start
        if(blockWidth > 1000){
        /*if(blockWidth > 1000){
            console.log('333');
            // j$('div#out_Div').css('width', (blockWidth) + 'px');
            // j$('div#in_Div').css('width', (blockWidth) + 'px');
            if (j$('table#tableData').width() > j$('div#in_Div').width()) {
@@ -385,18 +387,34 @@
                j$('div#in_Div').css('width', (blockWidth) + 'px');
            }
        }else{
            console.log('222');
            j$('table#tableData').css('width', (blockWidth) + 'px');
            j$('table#tableHeader').css('width', (blockWidth) + 'px');
            tableWidth = blockWidth; // 20230725 ljh
        }*/
        if (j$('table#tableData').width() > j$('div#in_Div').width()) {
            j$('div#out_Div').css('width', (blockWidth) + 'px');
            j$('div#in_Div').css('width', (blockWidth) + 'px');
            j$('table#tableData').css('width', (tableWidth) + 'px');
            j$('table#tableHeader').css('width', (tableWidth) + 'px');
        }
        // if (j$('table#tableData').width() > j$('div#in_Div').width()) {
        //     j$('div#out_Div').css('width', (blockWidth) + 'px');
        //     j$('div#in_Div').css('width', (blockWidth) + 'px');
        // }
        // 20230704 ljh end
    }
    if (j$('table#tableData').width() > j$('div#in_Div').width()) {
        j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
    }
    j$('div#in_Div').scroll(function() {
        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
        j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
    });
    j$('div#out_Div').scroll(function() {
        j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
    });
    j$('div#in_Div_L').scroll(function() {
        j$('div#in_Div').scrollTop(j$(this).scrollTop());
    });
}
function expandAll(){
@@ -422,29 +440,40 @@
function rerenderColWidth(colClass, isFirst) {
    // tableWidth = j$('body .pbBody table#tableHeader').width();// 20230519 ljh lightning add
    console.log('555'+tableWidth);
    var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
    if (headerCol.hasClass("colUnHideIcon")) {
        listColClassMap[colClass] = "colUnHideIcon";
        // 20230519 ljh lightning start
        // tableWidth -= headerCol.width();
        console.log('666'+listColClassWidthMap[colClass]);
        tableWidth -= listColClassWidthMap[colClass];
        // 20230519 ljh lightning end
        // 全部最小化する
        j$('body .pbBody table.list td.' + colClass).children().hide();
        j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
        // 20230728 ljh 优化
        // j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
        j$('body .pbBody table.list td.' + colClass).outerWidth(10).css("font-size", "0");
    } else {
        listColClassMap[colClass] = "colViewing";
        console.log('888'+tableWidth);
        // if (isFirst == false) { // 20230519 ljh lightning  去掉判断
            var hiddenWidth = headerCol.width();
            j$('body .pbBody table.list td.' + colClass).width("").css("font-size", "");
            j$('body .pbBody table.list td.' + colClass).children().show();
            tableWidth += listColClassWidthMap[colClass] + 2 - hiddenWidth;    // 2 is border
        // }
        console.log('777'+listColClassWidthMap[colClass]);
    }
    console.log('444'+tableWidth);
    // 20230725 ljh start
    // if(tableWidth < 1000){
    //     j$('div#in_Div').css('width', tableWidth + 'px');
    //     j$('div#out_Div').css('width', tableWidth + 'px');
    // }
    // 20230725 ljh start
    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
}
function getColClassName(pObj) {
force-app/main/default/staticresources/RentalFixtureSetDetilSelectCss.css
@@ -16,4 +16,5 @@
/* 20230517 ljh lightning start */
table.list .col_IndexFromUniqueKey_Text__c {width:70px;}
table.list .col_Fixture_Set_Detail__r_Quantity__c {width:70px;}
table.list .col_Product_Status_Flag_F__c{width:100px;}
/* 20230517 ljh lightning end */
force-app/main/default/staticresources/StyleUtilCss.css
@@ -14,7 +14,7 @@
/*信息提示颜色*/
body .bPageBlock .pbSubheader, .slds-vf-scope .bPageBlock .pbSubheader{
    background-color: #08107b !important;;
    color: #FFF !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;
@@ -25,14 +25,13 @@
body .pbButton{
    text-align: left;
}
.message .messageText{
    color: #FFF !important;
}
/*检索框不乱*/
body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
    min-width: 180px;
    padding: 0;
}
body .bPageBlock .detailList .dataCol{
    width: 8%;
}
body .detailList td{
    position: static;
force-app/main/default/staticresources/StyleUtilCss.css.bak
New file
@@ -0,0 +1,39 @@
/* 20230616 ljh start lightning */
/* 表格表格和框*/
body .pbBody table.list tr th, body .pbBody table.list tr td {
    border: 1px solid #ededed;
    white-space: normal;
}
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;
}
/*信息提示颜色*/
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 .pbButton{
    text-align: left;
}
/*检索框不乱*/
body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
    min-width: 180px;
    padding: 0;
}
body .bPageBlock .detailList .dataCol{
    width: 8%;
}
body .detailList td{
    position: static;
}
force-app/main/default/staticresources/TransferShippmentReceivedcss.css
@@ -1,53 +1,54 @@
@charset "utf-8";
.detail {
   margin-left:5px;
   width:310px;
    /* margin-left:5px;*/
    /*width:310px;*/
}
.menu {
   padding:0px;
   border-left:1px solid #D1D1D1;
   border-right:1px solid #D1D1D1;
    padding:0px;
    border-left:1px solid #D1D1D1;
    border-right:1px solid #D1D1D1;
}
.menu h2{
   margin:0;
   padding:0;
   font-size:14px;
    margin:0;
    padding:0;
    font-size:16px;
}
.menu h2 div {
    width: 308px;
    text-align: left;
    margin: 0;
    background:#DCDCDC;
    /*width: 308px;*//*20230615 ljh*/
    text-align: left;
    margin: 0;
    background:#DCDCDC;
}
    
.menu ul{
   margin:0;
   padding:1px;
   list-style: none;
   border-top:1px solid #ddd;
    margin:0;
    padding:1px;
    list-style: none;
    border-top:1px solid #ddd;
}
.menu li {
   padding:0;
   font-size:14px;
   line-height:1.0;
   /* 20230423 ljh lightning 升级 start */
   /* height:23px; */
   height:33px;
   /* 20230423 ljh lightning 升级 end */
   clear:both;
   /*border-bottom: 1px dotted #999;*/
    padding:0;
    font-size:16px;
    /*line-height:1.0;*/
    /* 20230423 ljh lightning 升级 start */
    /* height:23px; */
    /*height:33px;*/
    /* 20230423 ljh lightning 升级 end */
    clear:both;
    /*border-bottom: 1px dotted #999;*/
    border-bottom: var(--lwc-borderWidthThin,1px) solid var(--slds-g-color-border-base-1, var(--lwc-colorBorder,rgb(229, 229, 229)))
}
.menu li span {
    width: 140px;
    /*width: 140px;
    text-align: right;
    float: left;
    margin: 5px 0px 0px 0px;
    margin: 5px 0px 0px 0px;*/
}
.menu li span span{
@@ -65,7 +66,7 @@
}
.detailtab {
   font-size: 14px;
   font-size: 16px;
}
.detailhander {
@@ -104,6 +105,81 @@
   top: 0px;
   background-color:
   white;
   width: 320px;
   /*width: 320px;*/
   z-index: 1;
}
}
/***********************/
.menu ul{
    /* display: flex; */
    list-style: none;
    margin-bottom: 5px;
}
.menu ul li{
    /* flex: 1;
    height: 55px;
    max-width:200px;  */
    width: calc(50% - 30px);
    display: inline-block;
    margin-left: 0;
}
/* .menu ul li Span{ */
.menu ul li span{
    /* // display:inline-block; */
    /* // display:inline-block; */
    height: 50px;
    line-height:50px;
}
.menu ul li input[type="checkbox"]{
    width:16px;
    height:16px;
}
.myBtn .btn{
    margin: 1px 20px;
}
body .btn{
    -webkit-appearance: none;
    position: relative;
    // margin: 1px 20px;
    display: inline-block;
    border: 1px solid transparent;
    font-size: .75rem;
    line-height: 1.875rem;
    text-decoration: none;
    white-space: normal;
    border-radius: 0.25rem;
    background: transparent;
    background-clip: border-box;
    color: rgba(1, 118, 211, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: color .05s linear,background-color .05s linear;
    transition: color .05s linear,background-color .05s linear;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    vertical-align: middle;
    border: 1px solid rgb(201, 201, 201);
    -webkit-transition: border 0.15s linear;
    transition: border 0.15s linear;
    border-color: rgb(201, 201, 201);
    background-color: rgb(255, 255, 255);
}
body input.btn{
    padding: 4px 1rem;
}
body input[type="text"],body select,span select{
    border: 1px solid rgb(201, 201, 201);
    border-radius: 0.25rem;
    display: inline-block;
    padding: 0 1rem 0 0.75rem;
    min-height: calc(1.875rem + (1px * 2)) !important;
    line-height: 1.875rem !important;
    /* background-color: rgb(255, 255, 255); */
    transition: border .1s linear,background-color .1s linear;
    max-width: 100%;
    color: rgb(24, 24, 24);
}
/***********************/
force-app/main/default/staticresources/TransferShippmentReceivedcss.css.bak
New file
@@ -0,0 +1,109 @@
@charset "utf-8";
.detail {
   margin-left:5px;
   width:310px;
}
.menu {
   padding:0px;
   border-left:1px solid #D1D1D1;
   border-right:1px solid #D1D1D1;
}
.menu h2{
   margin:0;
   padding:0;
   font-size:14px;
}
.menu h2 div {
    width: 308px;
    text-align: left;
    margin: 0;
    background:#DCDCDC;
}
.menu ul{
   margin:0;
   padding:1px;
   list-style: none;
   border-top:1px solid #ddd;
}
.menu li {
   padding:0;
   font-size:14px;
   line-height:1.0;
   /* 20230423 ljh lightning 升级 start */
   /* height:23px; */
   height:33px;
   /* 20230423 ljh lightning 升级 end */
   clear:both;
   /*border-bottom: 1px dotted #999;*/
}
.menu li span {
    width: 140px;
    text-align: right;
    float: left;
    margin: 5px 0px 0px 0px;
}
.menu li span span{
    text-align: left;
    margin-left: 3px;
    margin-top: 0px;
}
.commandbutton {
   font-size: 13px !important;
}
.tabsize {
   font-size: 14px !important;
}
.detailtab {
   font-size: 14px;
}
.detailhander {
   font-size: 16px;
}
.deliveryslip {
   font-size: 15px;
}
.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 */
}
/* Modal Content/Box */
.modal-content {
   background-color: #fefefe;
   margin-left: 6px;
   margin-top: 100px;
   padding: 20px;
   border: 1px solid #888;
   width: 265px; /* Could be more or less, depending on screen size */
}
.freezehander {
   position: fixed;
   top: 0px;
   background-color:
   white;
   width: 320px;
   z-index: 1;
}