unknown
2023-04-11 fd1234ddc5be42b9ec2fad9d9286cd2aa58eb0ef
Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
99个文件已添加
35个文件已修改
4032 ■■■■■ 已修改文件
force-app/main/default/classes/ApplicationButtonController.cls 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LightingButtonConstant.cls 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/QISReportController.cls 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/QISReportController.cls-meta.xml 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/TenderWebService.cls 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/TenderWebService.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/TenderingButtonController.cls 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/TenderingButtonController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonRepairController.cls 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancel/lexCancel.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexComplete/lexComplete.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyPIInspectionReport/lexCopyPIInspectionReport.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateReportMaintenanceContract/lexCreateReportMaintenanceContract.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/lexMailMessege.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOPDtoSIS/lexOPDtoSIS.js 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISAgree/lexQISAgree.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISAgree/lexQISAgree.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.css 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCFinish/lexVOCFinish.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/oshRecieved/oshRecieved.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/ApplicationButtonController.cls
@@ -3,7 +3,6 @@
    public static InitData initSubmitButton (String recordId){
        InitData res = new initData();
        try{
            // Request_tedner_doc__c report = [SELECT     OwnerId,Id,Product_discription__c,Status__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
            Request_tedner_doc__c report = [SELECT     OwnerId,Id FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
            res.OwnerId = report.OwnerId;
            res.Id = report.Id;
@@ -17,55 +16,52 @@
    //授权申请的提交按钮
    @AuraEnabled
    public static String submit(String recordId) {
       String messageText = '';
       try {
        // Request_tedner_doc__c rac = [SELECT     Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c,Request_target__c,Document_format__c,Bid_distributor__c,Product_discription__c,Tedner_date__c,Tender_active_day__c,tender_inactive_date__c,Tender_request_reason__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
        Request_tedner_doc__c rac = [SELECT     Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
        rac.Status__c = '已提交';
        rac.RecordTypeId = '01210000000RNXn';
        rac.Status__c = LightingButtonConstant.STATUS_Application_Submitted;
        rac.RecordTypeId = rac.RecordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_Application + LightingButtonConstant.STATUS_Application_Submitted).getRecordTypeId();
        rac.Submit_check_flag__c = true;
        rac.Submit_time__c = Datetime.now();
        update rac;
        return '1';
        messageText = '1';
        return messageText;
       } catch (Exception ex) {
        System.debug(LoggingLevel.INFO, '*** xu: ' + ex);
        return ex.getMessage();
        // return ex.getMessage().split(',')[1];
       } finally {
        messageText = ex.getMessage();
        return messageText;
       }
    }
    //授权申请的取消提交按钮
    @AuraEnabled
    public static String submitCancel(String recordId) {
       String messageText = '';
       try {
        Request_tedner_doc__c report = [SELECT     Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
        report.Status__c = '草案中';
        report.RecordTypeId = '01210000000RNXi';
        report.Status__c = LightingButtonConstant.STATUS_Application_CancelSubmit;
        report.RecordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_Application).getRecordTypeId();
        report.Submit_check_flag__c = false;
        report.Submit_time__c = null;
        update report;
        return '1';
        messageText = '1';
        return messageText;
       } catch (Exception ex) {
        System.debug(LoggingLevel.INFO, '*** cancelXu: ' + ex);
        return ex.getMessage();
       } finally {
        messageText = ex.getMessage();
        return messageText;
       }
    }
    //获取当前登录人的 id
    @AuraEnabled
    public static UserResult UserInfo_Owner() {
    public static UserResult userInfo_Owner() {
        UserResult result = new UserResult();
        ID myUserID = UserInfo.getUserId();
        try { 
            User tempUser =
                [select id from user where id = : myUserID ];
            User tempUser = [select id from user where id = : myUserID ];
            result.id = tempUser.id;
        } catch (exception e) {
            result.result = e.getMessage();
        }
        return result;
@@ -85,15 +81,5 @@
        }
        @AuraEnabled
        public string id;
        //20210105 CHAN-BWX3YU you end
    }
}
    // if("{!Request_tedner_doc__c.OwnerId}" == "{!$User.Id}") {
    //     var rac = new sforce.SObject("Request_tedner_doc__c");
    //     rac.Id = "{!Request_tedner_doc__c.Id}";
    //     rac.Status__c = "已提交";
    //     rac.Submit_check_flag__c = "true";
    //     rac.RecordTypeId = "01210000000RNXn";
    //     var serverTimestamp = sforce.connection.getServerTimestamp();
    //     rac.Submit_time__c = serverTimestamp.timestamp;
force-app/main/default/classes/LightingButtonConstant.cls
@@ -1,4 +1,10 @@
global without sharing class LightingButtonConstant {
    //授权申请的状态‘已提交’
    public static final String STATUS_Application_Submitted = '已提交';
    //授权申请的状态‘草案中’
    public static final String  STATUS_Application_CancelSubmit= '草案中';
    //授权申请的记录类型名‘授权申请’
    public static final String RECORD_TYPE_NAME_Application = '授权申请';
    //周报月报的状态‘草案中’
    public static final String STATUS_DRAFT = '草案中';
    //报告书的状态‘完毕’
@@ -70,4 +76,5 @@
    public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
    public static final String  SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
   
}
force-app/main/default/classes/QISReportController.cls
@@ -20,7 +20,7 @@
        String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASAC_DECISION;
        try{
            PAE_DecisionRecord__c RCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId limit 1]; 
            res.PAEid = RCPAEDIdList.id;
            res.pAEid = RCPAEDIdList.id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -49,7 +49,7 @@
        String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
        try{
            PAE_DecisionRecord__c ASRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId Limit 1]; 
            res.PAEid = ASRCDIdList.id;
            res.pAEid = ASRCDIdList.id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -217,54 +217,193 @@
        }
         return re;
    }
    // 提交
     @AuraEnabled
    public static InitData initForOCMSubmitButton (String recordId){
        InitData res = new initData();
        try{
            QIS_Report__c report = [SELECT  id,is_aohui_product__c,QIS_Status__c,OCM_Manager_Mail_F__c,QISInstallDate__c,contract_number__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.QIStatus = report.QIS_Status__c;
            res.QISInstallDate = report.QISInstallDate__c;
            res.contractnumber = report.contract_number__c;
            res.isaohuiproduct = report.is_aohui_product__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static String updateQisWithOCM (String recordId){
        String re = '成功';
        QIS_Report__c report = [SELECT  id,QIS_Status__c,QISInstallDate__c,contract_number__c,OCM_Manager_Mail_F__c
                                ,OCM_Member_Mail_F__c,OCM_Repair_Mail_F__c,OCM_Repair_Mail1_F__c,FSE_Special_Mail_F__c,FSE_Special_Manager_Mail_F__c
                                    ,WorkLocation_CC_Mail_F__c,is_aohui_product__c,QuolityApproveResult__c
                                FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
        try{
            QIS_Report__c rac  = new QIS_Report__c();
            rac.id = recordId;
            rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_FSE_COMPLATED;
            rac.OCM_Manager_Mail__c = report.OCM_Manager_Mail_F__c;
            rac.OCM_Member_Mail__c = report.OCM_Member_Mail_F__c;
            rac.OCM_Repair_Mail__c = report.OCM_Repair_Mail_F__c;
            rac.OCM_Repair_Mail1__c = report.OCM_Repair_Mail1_F__c;
            rac.FSE_Special_Mail__c = report.FSE_Special_Mail_F__c;
            rac.FSE_Special_Manager_Mail__c = report.FSE_Special_Manager_Mail_F__c;
            rac.WorkLocation_CC_Mail__c = report.WorkLocation_CC_Mail_F__c;
            rac.Cancel_QIS_Reason__c = null;
            if (report.is_aohui_product__c == true) {
                    rac.OCM_judgement__c = '质量问题';
                    rac.next_action__c = '无偿维修';
                    rac.RecordTypeId = Schema.SObjectType.QIS_Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_OSH).getRecordTypeId();
                    rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_OSH_TESTING_APP;
            }
            if (report.QuolityApproveResult__c == null || report.QuolityApproveResult__c == '') {
                rac.QuolityApproveResult__c = '3.已审核,一般质量问题';
            }
            update rac;
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            re = e.getMessage();
        }
         return re;
    }
    // QIS结果跟进完毕
     @AuraEnabled
    public static InitData initForQisAgreeButton (String recordId){
        InitData res = new initData();
        try{
            QIS_Report__c report = [SELECT  id ,OwnerId FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.ownerId = report.OwnerId;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static String updateQisForQisAgree (String recordId){
        String re = '成功';
        ID myUserID = UserInfo.getUserId();
        String answerComp = Schema.SObjectType.QIS_Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_OSH_FINASH).getRecordTypeId();
        String fina = Schema.SObjectType.QIS_Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_FINAL).getRecordTypeId();
        String comp = Schema.SObjectType.QIS_Report__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_COMP).getRecordTypeId();
        // RecordType rectyp = [SELECT id ,name FROM RecordType where  id = '01210000000gFTH'];
        QIS_Report__c report = [SELECT  id,OwnerId,RecordTypeId FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
        try{
            if (report.ownerid == myUserID) {
                QIS_Report__c rac  = new QIS_Report__c();
                rac.id = recordId;
                rac.QIS_Status__c = LightingButtonConstant.STATUS_QIS_COMPLATED;
                if (report.RecordTypeId == answerComp) {
                    rac.RecordTypeId = fina;
                }else{
                    rac.RecordTypeId = comp;
                }
                rac.QIS_Complete_Day__c  = Date.today();
                update rac;
            }
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            re = e.getMessage();
        }
         return re;
    }
    //OCSM服务本部CDS完毕
    @AuraEnabled
    public static InitData initForRCCDScompleteButton (String recordId){
        InitData res = new initData();
        try{
            QIS_Report__c report = [SELECT  id ,CDS_date__c,QIS_Status__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.cdsdate = report.CDS_date__c;
            res.QIStatus = report.QIS_Status__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static String updateQisForRCCDScomplete (String recordId){
        String re = '成功';
        ID myUserID = UserInfo.getUserId();
        User userinfo = [SELECT id,Alias__c FROM User WHERE Id = :myUserID LIMIT 1];
        QIS_Report__c report = [SELECT  id FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
        try{
                QIS_Report__c rac  = new QIS_Report__c();
                rac.id = recordId;
                rac.CDS_date__c  = Date.today();
                rac.RC_CDS_staff__c  = userinfo.Alias__c;
                update rac;
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            re = e.getMessage();
        }
         return re;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String OwnerId;
        public String ownerId;
        @AuraEnabled
        public String qisRecordTypeId;
        @AuraEnabled
        public String qisRecordName;
        @AuraEnabled
        public String ProfileName;
        public String profileName;
        @AuraEnabled
        public String PAEid;
        public String isAEProfile;
        @AuraEnabled
        public String OCSMAdministrativeReportNumber;
        public String isPAEProfile;
        @AuraEnabled
        public String OCSMAdministrativeReportStatus;
        public String isCNBuy;
        @AuraEnabled
        public String QIStatus;
        public String pAEid;
        @AuraEnabled
        public String OSHstaff;
        public String oCSMAdministrativeReportNumber;
        @AuraEnabled
        public String OSHstaffEmail;
        public String oCSMAdministrativeReportStatus;
        @AuraEnabled
        public String CancelQISReason;
        public String qIStatus;
        @AuraEnabled
        public String RCid;
        public String oSHstaff;
        @AuraEnabled
        public String oSHstaffEmail;
        @AuraEnabled
        public String cancelQISReason;
        @AuraEnabled
        public String rCid;
        @AuraEnabled
        public String contractnumber;
        @AuraEnabled
        public Date RCinspectionDate;
        public Date rCinspectionDate;
        @AuraEnabled
        public Date QISReplyDay;
        public Date qISReplyDay;
        @AuraEnabled
        public Date QISInstallDate;
        public Date qISInstallDate;
        @AuraEnabled
        public Date cdsdate;
        @AuraEnabled
        public Date Aware_date;
        public Date awaredate;
        @AuraEnabled
        public Date OCSMAdministrativeReportDate;
        public Date oCSMAdministrativeReportDate;
        @AuraEnabled
        public Boolean RCproblemnotfound;
        public Boolean rCproblemnotfound;
        @AuraEnabled
        public Boolean isaohuiproduct;
        @AuraEnabled
        public Boolean IsSendQIS;
        public Boolean isSendQIS;
    }
}
force-app/main/default/classes/QISReportController.cls-meta.xml
force-app/main/default/classes/TenderWebService.cls
New file
@@ -0,0 +1,83 @@
global class TenderWebService {
    public TenderWebService() {
    }
    @AuraEnabled
    //招投标反逻辑删除
    WebService static String ContraryLogicalDel(String DTenId) {
        Tender_information__c DTenInfo = [Select Id, InfoId__c, Logical_delete__c, ProjectId__c, Retain_Tender__c From Tender_information__c Where id = : DTenId];
        // 更新删除招投标
        List<Tender_information__c> updateTenInfoList = new List<Tender_information__c>();
        // 更新保留招投标
        // List<Tender_information__c> updateBTenList = new List<Tender_information__c>();
        if (String.isNotBlank(DTenInfo.Retain_Tender__c)) {
            // System.debug('11111111' + TenInfo.Retain_Tender__c);
            //要保留的招投标
            Tender_information__c BTen =  [select Id, InfoId__c From Tender_information__c
                                           Where Id = : DTenInfo.Retain_Tender__c];
            // 删除招投标关联的询价
            // List<Tender_Opportunity_Link__c> DTenLinkList = [select Opportunity__c
            //         from Tender_Opportunity_Link__c
            //         where Tender_information__c = :DTenId and IsRelated__c = true];
            // System.debug('---------2---------' + DTenLinkList);
            // Set<Id> DTenLinkOppIdSet = new Set<Id>();
            // if (DTenLinkList.size() > 0) {
            //     for (Tender_Opportunity_Link__c DTenlink : DTenLinkList) {
            //         DTenLinkOppIdSet.add(DTenlink.Opportunity__c);
            //     }
            //     System.debug('---------3---------' + DTenLinkOppIdSet);
            //     // 删除项目关联并且与保留项目关联的询价关联信息
            //     List<Tender_Opportunity_Link__c> DelD_BTenLinkList = [select id, Opportunity__c, Tender_information__c
            //             from Tender_Opportunity_Link__c
            //             where Tender_information__c = :BTen.Id and Opportunity__c in : DTenLinkOppIdSet];
            //     System.debug('---------1---------' + DelD_BTenLinkList);
            //     if (DelD_BTenLinkList.size() > 0) {
            //         Delete DelD_BTenLinkList;
            //     }
            // }
            // 保留项目通过软删除逻辑关联来的询价
            List<Tender_Opportunity_Link__c> DelD_BTenLinkList = [select id, Opportunity__c, Tender_information__c
                        from Tender_Opportunity_Link__c
                        where Tender_information__c = :BTen.Id and IsRelated__c = true];
            // 判断link是否为空
            if (DelD_BTenLinkList != null && DelD_BTenLinkList.size() > 0) {
                // 逻辑有大坑 暂时只把打标记的删掉 不做回写的操作了
                // List<Tender_Opportunity_Link__c> add_list = new List<Tender_Opportunity_Link__c>();
                // for (Tender_Opportunity_Link__c link : DelD_BTenLinkList) {
                //     Tender_Opportunity_Link__c add_link = new Tender_Opportunity_Link__c();
                //     add_link.Tender_information__c = DTenInfo.Id;
                //     add_link.Opportunity__c = link.Opportunity__c;
                //     add_link.Tender_Opportunity_Uniq__c = DTenInfo.Id + '' + link.Opportunity__c;
                //     add_link.IsRelated__c = false;
                //     add_list.add(add_link);
                // }
                // 删掉保留项目上的关联询价
                delete DelD_BTenLinkList;
                // 删除项目上的关联加回来
                // if (add_list.size() > 0) {
                //     insert add_list;
                // }
            }
            // 互换保留招投标与删除招投标的信息Id
            DTenInfo.Retain_Tender__c = BTen.Id;
            String BTenInfo = BTen.InfoId__c;
            BTen.InfoId__c = DTenInfo.InfoId__c;//保留招投标的信息Id赋给删除招投标的信息Id
            DTenInfo.InfoId__c = BTenInfo;//删除招投标的信息Id赋给保留招投标的信息Id
            // 点击保存后 删除招投标上的逻辑删除字段变为true
            DTenInfo.Logical_delete__c = false;
            // update TenInfo;
            // 一起更新就行了
            updateTenInfoList.add(DTenInfo);
            updateTenInfoList.add(BTen);
            update updateTenInfoList;
            // updateBTenList.add(BTen);
            // update updateBTenList;
        }
        return 'OK';
    }
}
force-app/main/default/classes/TenderWebService.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>45.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/TenderingButtonController.cls
New file
@@ -0,0 +1,54 @@
public class TenderingButtonController {
    @AuraEnabled
    public static InitData initTenderingController(String recordId) {
        InitData res = new initData();
        try{
            Tender_information__c report = [SELECT     OpportunityNum__c,OwnerId,Id,status__c,Name,IsRelateProject__c FROM Tender_information__c WHERE Id = :recordId LIMIT 1];
            res.OwnerId = report.OwnerId;
            res.Id = report.Id;
            res.status = report.status__c;
            res.name = report.Name;
            res.opportunityNum = String.valueOf(report.OpportunityNum__c);
            res.isRelateProject = report.IsRelateProject__c;
            res.profileId = UserInfo.getProfileId();
            res.Environment_Url = System.Label.Environment_Url;
            System.debug(LoggingLevel.INFO, '*** xu: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** xu: ' + e);
        }
        return res;
    }
    // 招标项目失单 TenderOpportunityLink
    // 调用该接口var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
    @AuraEnabled
    public static List<Tender_Opportunity_Link__c> sqlResult (String id) {
        try {
            List<Tender_Opportunity_Link__c> TenderOpportunityLink = [SELECT id FROM Tender_Opportunity_Link__c WHERE Tender_information__c = :id];
            System.debug(LoggingLevel.INFO, '*** xu1: ' + TenderOpportunityLink);
            return TenderOpportunityLink;
        } catch (exception e) {
            System.debug(LoggingLevel.INFO, '*** xu1111111: ' + e);
            throw new AuraHandledException(e.getMessage());
        }
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String OwnerId;
        @AuraEnabled
        public String status;
        @AuraEnabled
        public String name;
        @AuraEnabled
        public String opportunityNum;
        @AuraEnabled
        public String isRelateProject;
        @AuraEnabled
        public String profileId;
        @AuraEnabled
        public String Environment_Url;
    }
}
force-app/main/default/classes/TenderingButtonController.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>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
@@ -32,6 +32,7 @@
        return res;
    }   
    // 维修合同失单报告
    @AuraEnabled
    public static List<Lost_Report__c> selectRecords(String recordId){
        List<Lost_Report__c> res = new List<Lost_Report__c>();
@@ -43,6 +44,7 @@
        return res;
    }
    // 工作流状态
    @AuraEnabled
    public static void processResults(String recordId){
        Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
force-app/main/default/classes/otherButtonRepairController.cls
@@ -7,13 +7,68 @@
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Repair__c report =  [SELECT OCSMAdministrativeReportStatus__c,Incharge_Staff_Email__c,Name,HP_Name__c,Delivered_Product__c,
            Repair__c report =  [SELECT Status1__c,Rental_Apply_Equipment_Set_Detail__c,Rental_Apply_Equipment_Set_Detail_Id__c,Latest_Collect_Date_Priority__c,if_Rental_Apply__c,Offer_Rental_New__c,ProduceCompany_hand__c,CFDA_No_Hand__c,MBC_AwareDate__c,InsReport__c,QIS_ID__c,On_Call_ID__c,RepairSubOrder__c,ProductFailureRelated__c,Delay15Min__c,ProblemOccurredSelect__c,Repair_Source__c ,Failure_Occurrence_Date__c ,MaintenanceContractType__c ,OperationOrExaminationName__c ,WhatProject__c ,FailureQInHospital__c ,ReportAdverseEvents__c ,InformationFrom__c ,AfterFailureInformation__c ,ProblemOccurred__c ,SupportingProducts__c ,ifDeadHurt__c ,UseFailProductFinish__c ,DelayReportReason__c ,BreakORFallOff__c ,DateReceiptQuestions__c ,DeliveryLogisticsAnnotation__c ,DeliveryLogisticsNo__c ,engineerSendDate__c ,DeliveryLogisticsMode__c ,RepairApplicantDepartment__c ,RepairApplicantHospital__c ,RepairApplicant__c ,Repair_Detail__c ,Returns_Product_way__c ,work_location_select__c ,On_site_repair__c ,SalesOfficeCode_selection__c ,Incharge_Staff_Contact__c ,Incharge_Staff__c ,Dealer__c ,RepairCostType__c ,Account__c,Department_Class__c ,Hospital__c ,PaperRepairRequestNo__c ,part_arrangement_complete__c,Repair_Shipped_Date__c,OCSMAdministrativeReportStatus__c,Incharge_Staff_Email__c,Name,HP_Name__c,Delivered_Product__c,
            Repair_Product_Serial_No__c,Service_Repair_No__c,Repair_Firstestimated_Date__c,
            Repair_Estimated_Date__c,RC_information__c,Id,OCSMAdministrativeReportNumber__c,
            OCSMAdministrativeReportDate__c,Aware_date__c,PAE_Determine__c,ETQ_UPLOAD_STATUS__c,
            AE_DetermineResult__c,PAE_DetermineAC__c,Repair_Inspection_Date__c,Contain_UseRSA__c FROM Repair__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Status1C = report.Status1__c;
            res.ProblemOccurredSelectC = report.ProblemOccurredSelect__c;
            res.Delay15MinC = report.Delay15Min__c;
            res.ProductFailureRelatedC = report.ProductFailureRelated__c;
            res.RepairSubOrderC = report.RepairSubOrder__c;
            res.OnCallIDC = report.On_Call_ID__c;
            res.QISIDC = report.QIS_ID__c;
            res.InsReportC = report.InsReport__c;
            res.MBCAwareDateC = report.MBC_AwareDate__c;
            res.CFDANoHandC = report.CFDA_No_Hand__c;
            res.ProduceCompanyHandC = report.ProduceCompany_hand__c;
            res.OfferRentalNewC = report.Offer_Rental_New__c;
            res.ifRentalApplyC = report.if_Rental_Apply__c;
            res.LatestCollectDatePriorityC = report.Latest_Collect_Date_Priority__c;
            res.RentalApplyEquipmentSetDetailIdC = report.Rental_Apply_Equipment_Set_Detail_Id__c;
            res.RentalApplyEquipmentSetDetailC = report.Rental_Apply_Equipment_Set_Detail__c;
            res.PaperRepairRequestNoC = report.PaperRepairRequestNo__c;
            res.HospitalC = report.Hospital__c;
            res.DepartmentClassC = report.Department_Class__c;
            res.AccountC = report.Account__c;
            res.RepairCostTypeC = report.RepairCostType__c;
            res.DealerC  = report.Dealer__c ;
            res.InchargeStaffC  = report.Incharge_Staff__c ;
            res.InchargeStaffContactC  = report.Incharge_Staff_Contact__c ;
            res.SalesOfficeCodeSelectionC  = report.SalesOfficeCode_selection__c ;
            res.OnSiteRepairC  = report.On_site_repair__c ;
            res.workLocationSelectC  = report.work_location_select__c ;
            res.ReturnsProductWayC  = report.Returns_Product_way__c ;
            res.RepairDetailC  = report.Repair_Detail__c ;
            res.RepairApplicantC  = report.RepairApplicant__c ;
            res.RepairApplicantHospitalC  = report.RepairApplicantHospital__c ;
            res.RepairApplicantDepartmentC  = report.RepairApplicantDepartment__c ;
            res.DeliveryLogisticsModeC  = report.DeliveryLogisticsMode__c ;
            res.engineerSendDateC  = report.engineerSendDate__c ;
            res.DeliveryLogisticsNoC  = report.DeliveryLogisticsNo__c ;
            res.DeliveryLogisticsAnnotationC  = report.DeliveryLogisticsAnnotation__c ;
            res.DateReceiptQuestionsC  = report.DateReceiptQuestions__c ;
            res.BreakORFallOffC  = report.BreakORFallOff__c ;
            res.DelayReportReasonC  = report.DelayReportReason__c ;
            res.UseFailProductFinishC  = report.UseFailProductFinish__c ;
            res.ifDeadHurtC = report.ifDeadHurt__c ;
            res.SupportingProductsC = report.SupportingProducts__c ;
            res.ProblemOccurredC = report.ProblemOccurred__c ;
            res.AfterFailureInformationC = report.AfterFailureInformation__c ;
            res.InformationFromC = report.InformationFrom__c ;
            res.ReportAdverseEventsC = report.ReportAdverseEvents__c ;
            res.FailureQInHospitalC = report.FailureQInHospital__c ;
            res.WhatProjectC = report.WhatProject__c ;
            res.OperationOrExaminationNameC = report.OperationOrExaminationName__c ;
            res.MaintenanceContractTypeC = report.MaintenanceContractType__c ;
            res.FailureOccurrenceDateC = report.Failure_Occurrence_Date__c ;
            res.RepairSourceC = report.Repair_Source__c ;
            res.Id = report.Id;
            res.partArrangementCompleteC = report.part_arrangement_complete__c;
            res.RepairShippedDateC = report.Repair_Shipped_Date__c;
            res.OCSMAdministrativeReportNumberC = report.OCSMAdministrativeReportNumber__c;
            res.OCSMAdministrativeReportDateC = report.OCSMAdministrativeReportDate__c;
            res.AwareDateC = report.Aware_date__c;
@@ -23,7 +78,6 @@
            res.PAEDetermineACC = report.PAE_DetermineAC__c;
            res.RepairInspectionDateC = report.Repair_Inspection_Date__c;
            res.ContainUseRSAC = report.Contain_UseRSA__c;
            res.InchargeStaffEmailC = report.Incharge_Staff_Email__c;
            res.Name = report.Name;
            res.HPNameC = report.HP_Name__c;
@@ -34,6 +88,10 @@
            res.RepairEstimatedDateC = report.Repair_Estimated_Date__c;
            res.RCInformationC = report.RC_information__c;
            res.OCSMAdministrativeReportStatusC = report.OCSMAdministrativeReportStatus__c;
            res.userID = UserInfo.getUserId();
            res.profileId = UserInfo.getProfileId();
            res.userEmail = UserInfo.getUserEmail();
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
@@ -42,6 +100,7 @@
        return res;
    }   
    // 根据ID查找修理表
    @AuraEnabled
    public static List<Repair__c> selectRecords(String recordId){
        List<Repair__c> res = new List<Repair__c>();
@@ -53,6 +112,7 @@
        return res;
    }
    // 根据ID修改修理
    @AuraEnabled
    public static void updateRepair(String recordId){
        try {
@@ -65,6 +125,25 @@
        }
    }
    // 修改验收单
    @AuraEnabled
    public static String updateYanshoudan(String recordId){
        String res;
        try {
            Repair__c repair = new Repair__c();
            repair.Id = recordid;
            repair.Request_yanshoudan_PDF__c = true;
            repair.Facility_Return_Receipt_Collection_reque__c = Datetime.now().date();
            update repair;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
            res = e.getMessage();
        }
        return res;
    }
    // 查找PAE判定记录
    @AuraEnabled
    public static List<PAE_DecisionRecord__c> selectPAEDecisionRecord(String recordId,String recordTypeId){
        List<PAE_DecisionRecord__c> res = new List<PAE_DecisionRecord__c>();
@@ -76,7 +155,117 @@
        return res;
    }
    // 发送邮件
    @AuraEnabled
    public static String sendToETQ(String iflog_Id,BatchIF_Log__c rowDataSFDC, List<String> repairIds,String statu){
        List<QIS_Report__c> temp = [select id from QIS_Report__c where id in :repairIds ];
        if(temp != null && temp.size() > 0){
            try {
                Database.executeBatch(new QISToPDFBatch(iflog_Id, rowDataSFDC,repairIds,statu),50); //生成PDF
            }
            catch (Exception e) {
                return '更新QIS报错:'+ e.getMessage();
            }
        }else{
            BatchIF_Log__c iflog = new BatchIF_Log__c();
            iflog.Type__c = 'sendToETQ';
            iflog.ErrorLog__c = '';
            iflog.Log__c = 'NFM401WebService start--';
            Repair__c updateRe = new Repair__c();
            updateRe.Id = repairIds[0];
            updateRe.INTERFACE_RECORD_ID__c = null;
            updateRe.ETQ_UPLOAD_STATUS__c = null;
            updateRe.ETQ_UPLOAD_MESSAGE__c = null;
            updateRe.OSH_ConfirmationDate__c = Date.today();
            updateRe.OSH_Affirmant__c = UserInfo.getUserId();
            updateRe.AWS_Interface_Time__c = Datetime.now();
            updateRe.AsyncData__c = true;
            try{
                update updateRe;
                Database.executeBatch(new RepairToPDFBatch(iflog_Id, rowDataSFDC,repairIds,statu)); //生成PDF
                iflog.Log__c += '\n修理:'+updateRe+' 更新成功';
                iflog.Log__c = '\nNFM401WebService end--';
                insert iflog;
            }catch(Exception ex){
                iflog.ErrorLog__c += '修理:'+updateRe+' 更新失败,因为::'+ex.getMessage();
                iflog.Log__c = '\nNFM401WebService end--';
                insert iflog;
                return '更新修理报错:'+ ex.getMessage();
            }
        }
        return '发送成功!';
    }
    // 查找AssetID
    @AuraEnabled
    public static String selectAssetID(String recordId){
        List<Repair__c> res = new List<Repair__c>();
        try{
            res = [SELECT Delivered_Product__c from Repair__c WHERE Id =: recordId];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res[0].Delivered_Product__c;
    }
    // 查找删除ID
    @AuraEnabled
    public static List<Repair__c> selectCustomDeleteById(String recordId){
        List<Repair__c > res = new List<Repair__c >();
        try{
            res = [SELECT Id, Status__c,SAP_Transfer_time__c, Repair_Ordered_Date__c, CreatedById, Acc_OwnerId__c,FSE_ownerid__c FROM Repair__c WHERE Id =: recordId];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
     // 查找删除ID
     @AuraEnabled
     public static String deleteRepair(String rid) {
        try {
            Repair__c r = new Repair__c(Id = rid);
            delete r;
            return 'OK';
        } catch (Exception e) {
            return e.getMessage();
        }
    }
    public class InitData{
        @AuraEnabled
        public String Status1C;
        @AuraEnabled
        public String RepairSubOrderC;
        @AuraEnabled
        public String OnCallIDC;
        @AuraEnabled
        public String QISIDC;
        @AuraEnabled
        public String InsReportC;
        @AuraEnabled
        public Datetime MBCAwareDateC;
        @AuraEnabled
        public String CFDANoHandC;
        @AuraEnabled
        public String ProduceCompanyHandC;
        @AuraEnabled
        public Boolean OfferRentalNewC;
        @AuraEnabled
        public Boolean ifRentalApplyC;
        @AuraEnabled
        public Datetime LatestCollectDatePriorityC;
        @AuraEnabled
        public String RentalApplyEquipmentSetDetailIdC;
        @AuraEnabled
        public String RentalApplyEquipmentSetDetailC;
        @AuraEnabled
        public String ProblemOccurredSelectC;
         @AuraEnabled
        public String Delay15MinC;
         @AuraEnabled
        public String ProductFailureRelatedC;
        @AuraEnabled
        public String Id;
        @AuraEnabled
@@ -97,7 +286,6 @@
        public Datetime RepairInspectionDateC;
        @AuraEnabled
        public boolean ContainUseRSAC;
         @AuraEnabled
        public String InchargeStaffEmailC;
         @AuraEnabled
@@ -118,6 +306,87 @@
        public String RCInformationC;
        @AuraEnabled
        public String OCSMAdministrativeReportStatusC;
        @AuraEnabled
        public Datetime RepairShippedDateC;
        @AuraEnabled
        public Datetime partArrangementCompleteC;
        @AuraEnabled
        public String userID;
        @AuraEnabled
        public String profileId;
        @AuraEnabled
        public String userEmail;
        @AuraEnabled
        public String PaperRepairRequestNoC;
        @AuraEnabled
        public String HospitalC;
        @AuraEnabled
        public String AccountC;
        @AuraEnabled
        public String DepartmentClassC;
        @AuraEnabled
        public String RepairCostTypeC;
        @AuraEnabled
        public String DealerC;
        @AuraEnabled
        public String InchargeStaffC;
        @AuraEnabled
        public String InchargeStaffContactC;
        @AuraEnabled
        public String SalesOfficeCodeSelectionC;
        @AuraEnabled
        public String OnSiteRepairC;
        @AuraEnabled
        public String workLocationSelectC;
        @AuraEnabled
        public String ReturnsProductWayC;
        @AuraEnabled
        public String RepairDetailC;
        @AuraEnabled
        public String RepairApplicantC;
        @AuraEnabled
        public String RepairApplicantHospitalC;
        @AuraEnabled
        public String RepairApplicantDepartmentC;
        @AuraEnabled
        public String DeliveryLogisticsModeC;
        @AuraEnabled
        public Datetime engineerSendDateC;
        @AuraEnabled
        public String DeliveryLogisticsNoC;
        @AuraEnabled
        public String DeliveryLogisticsAnnotationC;
        @AuraEnabled
        public Datetime DateReceiptQuestionsC;
        @AuraEnabled
        public String BreakORFallOffC;
        @AuraEnabled
        public String DelayReportReasonC;
        @AuraEnabled
        public String UseFailProductFinishC;
        @AuraEnabled
        public String ifDeadHurtC;
        @AuraEnabled
        public String SupportingProductsC;
        @AuraEnabled
        public String ProblemOccurredC;
        @AuraEnabled
        public String AfterFailureInformationC;
        @AuraEnabled
        public String InformationFromC;
        @AuraEnabled
        public String ReportAdverseEventsC;
        @AuraEnabled
        public String FailureQInHospitalC;
        @AuraEnabled
        public String WhatProjectC;
        @AuraEnabled
        public String OperationOrExaminationNameC;
        @AuraEnabled
        public String MaintenanceContractTypeC;
        @AuraEnabled
        public Datetime FailureOccurrenceDateC;
        @AuraEnabled
        public String RepairSourceC;
     }
}
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
New file
@@ -0,0 +1,28 @@
public with sharing class otherButtonSpotInspectionReportCtl {
    public otherButtonSpotInspectionReportCtl() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Inspection_Report__c report =  [SELECT Id,RecordTypeId FROM Inspection_Report__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.RecordTypeId = report.RecordTypeId;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String RecordTypeId;
     }
}
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.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>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/lwc/lexASACEditor/lexASACEditor.css
New file
@@ -0,0 +1,10 @@
.inASACEditorHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexASACEditor/lexASACEditor.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="inASACEditorHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
New file
@@ -0,0 +1,73 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForASACEditorButton';
export default class LexASACEditor extends LightningElement {
    @api recordId;
    LastModifiedDate
    Id
    Name
    LastModifiedById
    DeveloperName
    IsLoading = true;
    url;
    @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);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != undefined) {
                console.log("if");
                this.LastModifiedById = result.LastModifiedById;
                this.LastModifiedDate = result.LastModifiedDate;
                this.Id = result.Id;
                this.Name = result.Name;
                this.DeveloperName = result.DeveloperName;
                console.log(this.Id);
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
            }else{
                console.log("else");
                this.IsLoading = false;
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
        //this.updateRecordView(this.recordId);
    }
    editor(){
        if (this.Id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            console.log(this.url);
            } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            console.log(this.url);
            }
        window.open(this.url,"_self");
    }
}
force-app/main/default/lwc/lexASACEditor/lexASACEditor.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>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/lexASRCEditor/lexASRCEditor.css
New file
@@ -0,0 +1,10 @@
.inASRCEditorHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="inASRCEditorHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
New file
@@ -0,0 +1,74 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForASRCEditorButton';
export default class LexASRCEditor extends LightningElement {
    @api recordId;
    LastModifiedDate
    Id
    Name
    LastModifiedById
    DeveloperName
    IsLoading = true;
    url;
    @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);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != undefined) {
                console.log("if");
                this.LastModifiedById = result.LastModifiedById;
                this.LastModifiedDate = result.LastModifiedDate;
                this.Id = result.Id;
                this.Name = result.Name;
                this.DeveloperName = result.DeveloperName;
                console.log(this.Id);
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
            }else{
                console.log("else");
                this.IsLoading = false;
                this.editor();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
        //this.updateRecordView(this.recordId);
    }
    editor(){
        if (this.Id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            console.log(this.url);
            } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            console.log(this.url);
            }
        window.open(this.url,"_self");
    }
}
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.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>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/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexASRCEditorRepair from 'c/lexASRCEditorRepair';
describe('c-lex-asrc-editor-repair', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-asrc-editor-repair', {
            is: LexASRCEditorRepair
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
New file
@@ -0,0 +1,75 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import selectPAEDecisionRecord from '@salesforce/apex/otherButtonRepairController.selectPAEDecisionRecord';
export default class LexASRCEditorRepair extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    RecordTypeId;
    @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 => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeId = result.RecordTypeId;
                this.ASRCEditor();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // Intake universal code编辑
    ASRCEditor() {
        var RecordTypeId = "ASRCDecision";
        var RepairId = this.Id;
        var url = '';
        selectPAEDecisionRecord({
            recordId: RepairId,
            recordTypeId: RecordTypeId
        }).then(result => {
            if (result != null) {
                if (result.length > 0) {
                    url = "/apex/PAEDecisionRecord?Id=" + result[0].Id + "&RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId;
                } else {
                    url = "/apex/PAEDecisionRecord?RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId;
                }
                window.open(url, '_self');
            }
        }).catch(error => {
            console.log(error);
        })
    }
}
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.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>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/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -1,13 +1,12 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
export default class Submit extends LightningElement {
import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
export default class lexApplicationCancelSubmit extends LightningElement {
    @api recordId;//OwnerId
    ownerId;
    monthlyReportId;
@@ -19,33 +18,25 @@
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str:"+str);
             this.recordId = str;
           }
         }
     }
    
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.OwnerId;
                this.monthlyReportId = result.Id;
                this.cancelSubmit();
        })
            }
        }).catch(error => {
            console.log("error"+error);
        }).finally(() => {
        });
    }
    //授权申请 取消提交
    cancelSubmit(){
        UserInfo_Owner({}).then(result=>{
            console.log(result,'获取当前登陆人id')
        //'获取当前登陆人id'
        userInfo_Owner({}).then(result=>{
            if(this.ownerId == result.id){
                submitCancel({
                    recordId: this.recordId
@@ -64,7 +55,6 @@
            }
        })
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
@@ -1,13 +1,12 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
import submit  from '@salesforce/apex/ApplicationButtonController.submit';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class Submit extends LightningElement {
export default class lexApplicationSubmitButton extends LightningElement {
    @api recordId;//OwnerId
    ownerId;//所有人id
    id;//返回值的id
@@ -16,41 +15,32 @@
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
        console.log(currentPageReference,'666666666666');
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str:"+str);
             this.recordId = str;
           }
         }
     }
    
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result,"请求成功了吗")
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.OwnerId;
                this.id = result.Id;
                this.Submit();
            }
        }).catch(error => {
            console.log("error"+error);
        }).finally(() => {
        });
        })
    }
    Submit(){
        this.arrMessage = [];
        //获取获取当前登陆人
        UserInfo_Owner({}).then(result=>{
            console.log(result,'获取当前登陆人id')
        userInfo_Owner({}).then(result=>{
            if(this.ownerId == result.id){
                submit({
                    recordId: this.recordId
@@ -66,11 +56,6 @@
                            }
                            messageage += this.arrMessage[i+1];
                        }
                        // if(requst.split(',')[1].slice(-1) == '式'){
                        //     messageage = requst.split(',')[1] + "," + requst.split(',')[2] + "," +  requst.split(',')[3] + "," +  requst.split(',')[4] + "," +  requst.split(',')[5] + "," + requst.split(',')[6];
                        // }else{
                        //     messageage = requst.split(',')[1];
                        // }
                        this.showToast(messageage,"error");
                    }
                })
@@ -80,19 +65,16 @@
        })
    }
    updateRecordView() {
        updateRecord({fields: { Id: this.recordId }});
    }
    showToast(msg,type) {
        console.log(msg,type);
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        console.log('走到这里了吗');
        if(type == 'success'){
            this.updateRecordView();
        }
force-app/main/default/lwc/lexCancel/lexCancel.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:00:54
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -9,6 +17,22 @@
    @api recordId;
    status;
    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(){
@@ -18,7 +42,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.status = result.status;
                console.log(this.status);
                this.cancel();
@@ -73,6 +96,7 @@
        }).then(result =>{
            this.showToast("取消成功!","success");
            this.updateRecordView(this.recordId);
            this.IsLoading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        });
    }
force-app/main/default/lwc/lexCancelSubmit/lexCancelSubmit.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:05:05
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,6 +20,24 @@
    ownerId;
    monthlyReportId;
    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);
        init({
@@ -19,15 +45,10 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.ownerId;
                this.monthlyReportId = result.Id;
                this.cancelSubmit();
                console.log("end");
                this.dispatchEvent(new CloseActionScreenEvent());
                this.showToast();
                this.updateRecordView(this.recordId);
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Monthly_Report__c/" + this.monthlyReportId + "/view");
            }
        }).catch(error => {
@@ -38,11 +59,11 @@
        });   
    }
    showToast() {
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: '取消提交成功!',
            variant: 'success'
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
@@ -54,10 +75,15 @@
        if(this.ownerId == UserInfo_Owner.Id) {
            cancel({
                recordId: this.recordId
            }).then(result=>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.dispatchEvent(new CloseActionScreenEvent());
            });
            console.log("321");
            } else {
            this.showToast("只有周报的所有人可以取消","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            }
    }
}
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.css
New file
@@ -0,0 +1,10 @@
.cancelSubmitReportHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="cancelSubmitReportHolder" 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/lexCancelSubmitReport/lexCancelSubmitReport.js
New file
@@ -0,0 +1,66 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:06:00
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import cancel  from '@salesforce/apex/ReportController.updateForCancelSubmitReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexCancelSubmitReport extends 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);
        this.cancelSubmit();
    }
    cancelSubmit(){
        cancel({
            recordId: this.recordId
        }).then(result =>{
            this.showToast("取消提交成功!","success");
            this.updateRecordView(this.recordId);
            this.IsLoading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error=>{
            this.showToast(error,"error");
        });
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexCancelSubmitReport/lexCancelSubmitReport.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>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/lexComplete/lexComplete.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:06:48
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,6 +20,22 @@
    status;
    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);
        init({
@@ -19,7 +43,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.status = result.status;
                this.profileId = result.profileId;
                this.complete();
@@ -63,6 +86,7 @@
        updateForCompleteButton({
            recordId: this.recordId
        }).then(result =>{
            this.IsLoading = false;
            this.updateRecordView(this.recordId);
            this.showToast("完毕成功!","success");
        });
force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexCopyPIInspectionReport from 'c/lexCopyPIInspectionReport';
describe('c-lex-copy-pi-inspection-report', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-copy-pi-inspection-report', {
            is: LexCopyPIInspectionReport
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexCopyPIInspectionReport/lexCopyPIInspectionReport.js
@@ -50,6 +50,7 @@
        });
    }
    // 复制
    CopyPI() {
        window.location.href = '/' + this.Id + '/e?newclone=1';
    }
force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-27 13:53:40
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-10 14:22:27
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -17,6 +25,22 @@
    drSumUrl;
    IsLoading = true;
    url;
    @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;
          }
        }
    }
@@ -69,6 +93,5 @@
        +"%0D%0A" + "连接:" 
        + this.drSumUrl
        +"%0D%0A").substring(0,320).split("<br>").join("%0D%0A");
    }
}
force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexCreateReportMaintenanceContract from 'c/lexCreateReportMaintenanceContract';
describe('c-lex-create-report-maintenance-contract', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-create-report-maintenance-contract', {
            is: LexCreateReportMaintenanceContract
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexCreateReportMaintenanceContract/lexCreateReportMaintenanceContract.js
@@ -52,6 +52,7 @@
        });
    }
    // 制作报告书
    CreateReport() {
        var MaintenanceContractId = this.Id;
        var RecordTypeName = this.RecordTypeDeveloperNameC;
force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexCustomNewCopy2 from 'c/lexCustomNewCopy2';
describe('c-lex-custom-new-copy2', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-custom-new-copy2', {
            is: LexCustomNewCopy2
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.html
New file
@@ -0,0 +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/lexCustomNewCopy2/lexCustomNewCopy2.js
New file
@@ -0,0 +1,77 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexCustomNewCopy2 extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    notRenewC;
    Name;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.notRenewC = result.notRenewC;
                this.Name = result.Name;
                this.CustomNewCopy2();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 继续新服务合同
    CustomNewCopy2() {
        if (this.notRenewC) {
            this.ShowToastEvent("请联系服务商品部!", "error");
            // alert("请联系服务商品部!");
        } else {
            window.open("/" + this.Id + "/e?clone=1&Name=&00N10000002Dx5D=&00N10000002Dx5S=%e5%bc%95%e5%90%88%e4%b8%ad&00NO00000010sDc=&CF00NO00000010hyI=&CF00NO00000010hyI_lkid=&CF00NO00000010hyX=&CF00NO00000010hyX_lkid=&CF00NO00000010hyN=&CF00NO00000010hyN_lkid=&RecordType=01210000000gTYq&00N10000002pmOp=&00N10000006gZDd=&00N10000006gZDe=&00NO00000010hy4=&00N10000002Dx4j=&00N10000002Dx4m=&00N10000002Dx4w=&00N10000002Dx4k=&00N10000002Dx5J=&00N10000002Dx5M=&00N10000002Dx4i=&00N10000002Dx4h=&00N10000002Dx5K=&00N10000003OXdT=&00N100000048zfn=&00N10000002FMsq=&00N10000003OlGF=&00N10000002Dx4r=&00N100000047AY1=&00N100000047AYB=&00N100000047AY6=&00N10000003PCeB=&00N10000005HBNe=&00N10000006plAl=&00N10000002Dx5C=&retURL=%2F" + this.Id + "&saveURL=%2Fapex/SaveMaintenanceByCopy?mid=" + this.Id + "&CF00N100000048Paw=" + this.Name + "&CF00N100000048Paw_lkid=" + this.Id, "_blank");
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.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>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/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:07:34
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -10,9 +18,24 @@
    
    @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);
        this.IsLoading = false;
        this.DispatchOCSMQARA();
    }
@@ -37,6 +60,7 @@
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
                });
    }
force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexInsPageBtn from 'c/lexInsPageBtn';
describe('c-lex-ins-page-btn', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-ins-page-btn', {
            is: LexInsPageBtn
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
@@ -49,6 +49,7 @@
        });
    }
    // 报告书明细编辑
    insPageBtn() {
        var url;
        if (this.RecordTypeId == '01210000000aLii') {
force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexMailMessege from 'c/lexMailMessege';
describe('c-lex-mail-messege', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-mail-messege', {
            is: LexMailMessege
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexMailMessege/lexMailMessege.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
New file
@@ -0,0 +1,89 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
export default class LexMailMessege extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;;
    InchargeStaffEmailC;
    Name;
    HPNameC;
    DeliveredProductC;
    RepairProductSerialNoC;
    ServiceRepairNoC;
    RepairFirstestimatedDateC;
    RepairEstimatedDateC;
    RCInformationC;
    userEmail;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.InchargeStaffEmailC = result.InchargeStaffEmailC;
                this.Name = result.Name;
                this.HPNameC = result.HPNameC;
                this.DeliveredProductC = result.DeliveredProductC;
                this.RepairProductSerialNoC = result.RepairProductSerialNoC;
                this.ServiceRepairNoC = result.ServiceRepairNoC;
                this.RepairFirstestimatedDateC = result.RepairFirstestimatedDateC;
                this.RepairEstimatedDateC = result.RepairEstimatedDateC;
                this.RCInformationC = result.RCInformationC;
                this.userEmail = result.userEmail;
                this.mailMessege();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 报价附件更新的邮件通知
    mailMessege() {
        var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
        console.log(Link);
        location.href = 'mailto:' + this.InchargeStaffEmailC +
            '?bcc=' + this.userEmail +
            '&subject=【报价附件更新通知:' + this.Name + '】' + this.HPNameC + this.DeliveredProductC + this.RepairProductSerialNoC + this.ServiceRepairNoC +
            '&body=先生/女士%0D%0A' +
            '%0D%0A' +
            '关于主题的修理,修理报价的附件更新好了%0D%0A' +
            '请确认并跟进一下%0D%0A' +
            '%0D%0A' +
            '初次报价日:' + this.RepairFirstestimatedDateC + '%0D%0A' +
            '此次报价日:' + this.RepairEstimatedDateC + '%0D%0A' +
            '%0D%0A' +
            'RC联络事项:' + this.RCInformationC + '%0D%0A' +
            '%0D%0A' + Link + '';
    }
}
force-app/main/default/lwc/lexMailMessege/lexMailMessege.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>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/lexOCMSubmit/lexOCMSubmit.js
@@ -16,6 +16,7 @@
    qisStatus;
    contractnumber;
    isaohuiproduct;
    err;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -38,12 +39,10 @@
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.QIStatus;
            this.QISInstallDate = result.QISInstallDate;
            this.qisStatus = result.qIStatus;
            this.QISInstallDate = result.qISInstallDate;
            this.contractnumber = result.contractnumber;
            this.isaohuiproduct = result.isaohuiproduct;
            console.log('this.qisStatus='+this.qisStatus);
            console.log('this.isaohuiproduct='+this.isaohuiproduct);
             if (this.qisStatus!='草案中' && this.qisStatus!='取消') {
                 const evt = new ShowToastEvent({
                        title : '已经提交',
@@ -116,9 +115,10 @@
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
                        this.err = result;
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: result,
                            message: this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-28 15:59:44
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:08:30
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,17 +20,37 @@
    OCSMAdministrativeReportDate;
    AwareDate;
    @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("123");
        init({
            recordId: this.recordId
        }).then(result=>{
            console.log(result);
            this.OCSMAdministrativeReportDate = result.OCSMAdministrativeReportDate;
            this.OCSMAdministrativeReportNumber = result.OCSMAdministrativeReportNumber;
            this.AwareDate = result.awareDate;
            this.noToReport();
        }).catch(error=>{
            console.log(error);
        });
    }
@@ -56,6 +84,7 @@
           }).then(result=>{
                this.showToast("OCSM不要报告成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
           });
        }else{
force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexOCSMNoToReportRepair from 'c/lexOCSMNoToReportRepair';
describe('c-lex-ocsm-no-to-report-repair', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-ocsm-no-to-report-repair', {
            is: LexOCSMNoToReportRepair
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
New file
@@ -0,0 +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/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
New file
@@ -0,0 +1,102 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import updateRepair from '@salesforce/apex/otherButtonRepairController.updateRepair';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexOCSMNoToReportRepair extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;;
    OCSMAdministrativeReportNumberC;
    OCSMAdministrativeReportDateC;
    AwareDateC;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.OCSMAdministrativeReportNumberC = result.OCSMAdministrativeReportNumberC;
                this.OCSMAdministrativeReportDateC = result.OCSMAdministrativeReportDateC;
                this.AwareDateC = result.AwareDateC;
                this.OCSMNoToReport();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // OCSM不要报告
    OCSMNoToReport() {
        if (!confirm("不要报告后无法撤回,是否继续?")) {
            return;
        }
        if (this.OCSMAdministrativeReportNumberC != undefined ||
            this.OCSMAdministrativeReportDateC != undefined) {
            this.ShowToastEvent("已经报告的QIS,不可以点击OCSM不要报告。", "error")
            // alert("已经报告的QIS,不可以点击OCSM不要报告。");
            return;
        }
        if (this.AwareDateC != undefined) {
            updateRepair({
                recordId: this.Id
            }).catch(error => {
                if (error.body.pageErrors.length > 0) {
                    var errmsg = error.body.pageErrors[0].message.toString();
                    this.ShowToastEvent(errmsg.join("\n"), "error")
                    // alert(errmsg.join("\n"));
                    return;
                }
            })
            window.location.reload();
        } else {
            this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error")
            // alert("没有AwareDate或已经OCSM行政报告,请确认。");
            return;
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.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>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/lexOCSMToReport/lexOCSMToReport.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:09:14
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,6 +20,21 @@
    awareDate;
    @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);
@@ -20,7 +43,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
                this.awareDate = result.awareDate;
                this.toReport();
@@ -61,6 +83,7 @@
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
                });
        }else{
force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexOCSMToReportRepair from 'c/lexOCSMToReportRepair';
describe('c-lex-ocsm-to-report-repair', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-ocsm-to-report-repair', {
            is: LexOCSMToReportRepair
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
New file
@@ -0,0 +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/lexOCSMToReportRepair/lexOCSMToReportRepair.js
New file
@@ -0,0 +1,92 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import updateRepair from '@salesforce/apex/otherButtonRepairController.updateRepair';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexOCSMToReportRepair extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    AwareDateC;
    OCSMAdministrativeReportStatusC;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.AwareDateC = result.AwareDateC;
                this.OCSMAdministrativeReportStatusC = result.OCSMAdministrativeReportStatusC;
                this.OCSMToReport();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // OCSM要报告
    OCSMToReport() {
        if (!confirm("报告后无法撤回,是否继续?")) {
            return;
        }
        if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) {
            updateRepair({
                recordId: this.Id
            }).catch(error => {
                if (error.body.pageErrors.length > 0) {
                    // alert(messages.join("\n"));
                    var errmsg = error.body.pageErrors[0].message.toString();
                    this.ShowToastEvent(errmsg.join("\n"), "error")
                    return;
                }
            })
            window.location.reload();
        } else {
            this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error")
            return;
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.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>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/lexOPDtoSIS/lexOPDtoSIS.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:10:06
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -14,7 +22,21 @@
    status;
    userId;
    @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(){
@@ -23,13 +45,12 @@
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            console.log("123");
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.ownerId;
                this.status = result.status;
                this.userId = result.userId;
                this.OPDtoSIS();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log("error");
@@ -60,11 +81,13 @@
            }).then(result =>{
                this.updateRecordView(this.recordId);
                this.showToast("成功!","success");
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
                });
            } else {
                this.showToast("只草案中状态及OPD/SIS报告书的所有人可以提交","error");
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        
    }
}
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
@@ -37,9 +37,9 @@
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.QIStatus;
            this.OSHstaff = result.OSHstaff;
            this.OSHstaffEmail = result.OSHstaffEmail;
            this.qisStatus = result.qIStatus;
            this.OSHstaff = result.oSHstaff;
            this.OSHstaffEmail = result.oSHstaffEmail;
            console.log('this.qisStatus='+this.qisStatus);
            console.log('this.OSHstaff='+this.OSHstaff);
            console.log('this.OSHstaffEmail='+this.OSHstaffEmail);
force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexPDFMaintenanceCommission from 'c/lexPDFMaintenanceCommission';
describe('c-lex-pdf-maintenance-commission', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-pdf-maintenance-commission', {
            is: LexPDFMaintenanceCommission
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js
New file
@@ -0,0 +1,54 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
export default class LexPDFMaintenanceCommission extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.PDFMaintenanceCommission();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 打印维修委托书
    PDFMaintenanceCommission() {
        window.open('/apex/MaintenanceCommissionPDF?id=' + this.Id, 'MaintenanceCommissionPDF');
    }
}
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.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>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/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexPreContractSubmit from 'c/lexPreContractSubmit';
describe('c-lex-pre-contract-submit', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-pre-contract-submit', {
            is: LexPreContractSubmit
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.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/lexPreContractSubmit/lexPreContractSubmit.js
@@ -11,6 +11,9 @@
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import processResults from '@salesforce/apex/otherButtonMaintenanceContractCtl.processResults';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexPreContractSubmit extends LightningElement {
    @api recordId;
@@ -59,31 +62,31 @@
        });
    }
    // 合同复核
    preContractSubmit() {
        //update wangweipeng 2022/01/04 start
        //判断是否需要先上传认款合同吗,如果需要那么判断他是否已经上传,如果上传,那么判断他是否完成认款,如果都满足,那么才能正常走接口上传SAP
        //判断是认款合同吗
        if (this.oldIsRecognitionModelC) {
            if (this.uploadToRMTimeC == null) { //判断是否已经上传认款合同
                alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。');
            if (this.uploadToRMTimeC == null) {
                this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。', "error")
                // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。');
                return;
            } else {
                //判断是否完成认款
                if (!this.IsRecognitionModelTrueC) {
                    alert('当前维修合同没有完成认款,不能进行复核。');
                    this.ShowToastEvent('当前维修合同没有完成认款,不能进行复核。', "error")
                    // alert('当前维修合同没有完成认款,不能进行复核。');
                    return;
                }
            }
        }
        //update wangweipeng 2022/01/04 end
        var status = this.MCApprovalStatusC;
        if (status != 'Draft' && status != 'Reject' && status != undefined) {
            alert('复核已经提交,请确认状态。');
            this.ShowToastEvent('复核已经提交,请确认状态。', "success")
            // alert('复核已经提交,请确认状态。');
            return;
        }
        var con_no = this.ContractprintCompletedC;
        if (con_no == '') {
            alert('合同盖章完毕为空,不能提交合同复核申请。');
            this.ShowToastEvent('合同盖章完毕为空,不能提交合同复核申请。', "error")
            // alert('合同盖章完毕为空,不能提交合同复核申请。');
            return;
        }
        if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
@@ -94,9 +97,20 @@
        }).catch(error => {
            if (error.body.pageErrors[0] != null) {
                var errmsg = error.body.pageErrors[0].message.toString();
                alert(errmsg + '_sys');
                // alert(errmsg + '_sys');
                this.ShowToastEvent(errmsg + '_sys', "error")
                return;
            }
        })
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexProductRepairQuoteRepair from 'c/lexProductRepairQuoteRepair';
describe('c-lex-product-repair-quote-repair', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-product-repair-quote-repair', {
            is: LexProductRepairQuoteRepair
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
New file
@@ -0,0 +1,67 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import selectAssetID from '@salesforce/apex/otherButtonRepairController.selectAssetID';
export default class LexProductRepairQuoteRepair extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    RecordTypeId;
    AssetOwnerC;
    DeliveredProductC;
    @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 => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeId = result.RecordTypeId;
                this.ProductRepairQuoteRepair();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 修理报价预估
    ProductRepairQuoteRepair() {
        selectAssetID({
            recordId: this.Id
        }).then(result => {
            this.DeliveredProductC = result;
            window.open('/apex/ProductRepairQuote?productid=' + this.DeliveredProductC + '&flag=asset', '', 'height=250, width=500, top=300, left=350,location=no')
        }).catch(error => {
            console.log(error);
        })
    }
}
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.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>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/lexQISAgree/lexQISAgree.css
New file
@@ -0,0 +1,22 @@
.outerBorderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    border-top : 3px solid #565959;
}
.borderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    margin-bottom : 7px;
    border-top : 3px solid #565959;
}
.headerDorderCss{
    border-top: 1px solid #565959;
    border-bottom: 1px solid #D4D4D4;
    padding:3px;
}
.centerCss{
    text-align: center;
}
.centerCss .left{
    margin-left: 100px;
}/* sample css file *//* sample css file */
force-app/main/default/lwc/lexQISAgree/lexQISAgree.html
New file
@@ -0,0 +1,5 @@
<template>
   <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
New file
@@ -0,0 +1,85 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForQisAgreeButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForQisAgree';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { updateRecord } from 'lightning/uiRecordApi';
export default class lexQISAgree extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    OwnerId;
    err;
    @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 () {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.OwnerId = result.ownerId;
            if (this.OwnerId != UserInfo_Owner.Id) {
                const evt = new ShowToastEvent({
                            title : '只有所有者可以按QIS结果跟进完毕的按钮',
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
            }else{
                this.updateQisSubmit();
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                this.updateRecordView(this.recordId);
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
}
force-app/main/default/lwc/lexQISAgree/lexQISAgree.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="lexQISAgree">
  <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/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.css
New file
@@ -0,0 +1,22 @@
.outerBorderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    border-top : 3px solid #565959;
}
.borderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    margin-bottom : 7px;
    border-top : 3px solid #565959;
}
.headerDorderCss{
    border-top: 1px solid #565959;
    border-bottom: 1px solid #D4D4D4;
    padding:3px;
}
.centerCss{
    text-align: center;
}
.centerCss .left{
    margin-left: 100px;
}
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.html
New file
@@ -0,0 +1,5 @@
<template>
   <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
New file
@@ -0,0 +1,64 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexQISIntakeuniversalcodeButton';
import sqlForPAE  from '@salesforce/apex/QISReportController.sqlForPAE1';
export default class lexQISIntakeuniversalcode extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    paeId;
    @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 () {
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.qisReportId = result.Id;
                var RecordTypeId = "ASRCDecision";
                sqlForPAE({
                    qisReportId: this.qisReportId
                    }).then(result => {
                    if (result!=null) {
                        this.paeId = result.PAEid;
                        console.log('result='+this.paeId);
                    }
                    var url = '';
                    if (result!=null&&result.length>0){
                        url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
                    } else {
                        url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
                    }
                    console.log('url='+url);
                    window.location.replace(url);
                });
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
}
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.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="lexQISIntakeuniversalcode">
    <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/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexQuarterlyReport from 'c/lexQuarterlyReport';
describe('c-lex-quarterly-report', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-quarterly-report', {
            is: LexQuarterlyReport
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
New file
@@ -0,0 +1,69 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
export default class LexQuarterlyReport extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    RecordTypeDeveloperNameC;
    EstimateTargetC;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                this.EstimateTargetC = result.EstimateTargetC;
                this.QuarterlyReport();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 制作季报
    QuarterlyReport() {
        var MaintenanceContractId = this.Id;
        var RecordTypeName = this.RecordTypeDeveloperNameC;
        var EstimateTarget = this.EstimateTargetC;
        var url = '';
        if (EstimateTarget == "经销商" && (RecordTypeName == "NewMaintenance_Contract" || RecordTypeName == "VM_Contract")) {
            url = "/apex/MoreMaintenanceContractPop?Id=" + MaintenanceContractId + "&RecordTypeName=" + RecordTypeName;
        } else {
            url = "http://powerbi.olympus.com.cn/Home/Login";
        }
        window.open(url, '_bank');
    }
}
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.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>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/lexRCCDScomplete/lexRCCDScomplete.css
New file
@@ -0,0 +1,22 @@
.outerBorderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    border-top : 3px solid #565959;
}
.borderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    margin-bottom : 7px;
    border-top : 3px solid #565959;
}
.headerDorderCss{
    border-top: 1px solid #565959;
    border-bottom: 1px solid #D4D4D4;
    padding:3px;
}
.centerCss{
    text-align: center;
}
.centerCss .left{
    margin-left: 100px;
}
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html
New file
@@ -0,0 +1,5 @@
<template>
   <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
New file
@@ -0,0 +1,98 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForRCCDScompleteButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCCDScomplete';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { updateRecord } from 'lightning/uiRecordApi';
export default class lexRCCDScomplete extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    cdsdate;
    QIStatus;
    err;
    @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 () {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.cdsdate = result.cdsdate;
            this.QIStatus = result.qIStatus;
            if (this.QIStatus == 'RC检测申请') {
                const evt = new ShowToastEvent({
                            title : '需要先点击[OCM服务本部收到实物]',
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
            }
            if (this.cdsdate != null) {
                const evt = new ShowToastEvent({
                            title : 'OCM服务本部CDS已经完毕',
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
            }
            this.updateQisSubmit();
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                this.updateRecordView(this.recordId);
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
}
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.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="lexRCCDScomplete">
    <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/lexRCSubmit/lexRCSubmit.js
@@ -44,14 +44,14 @@
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.QIStatus;
            this.OSHstaff = result.OSHstaff;
            this.OSHstaffEmail = result.OSHstaffEmail;
            this.CancelQISReason = result.CancelQISReason;
            this.Rcid = result.RCid;
            this.RCinspectionDate = result.RCinspectionDate;
            this.QISReplyDay = result.QISReplyDay;
            this.RCproblemnotfound = result.RCproblemnotfound;
            this.qisStatus = result.qIStatus;
            this.OSHstaff = result.oSHstaff;
            this.OSHstaffEmail = result.oSHstaffEmail;
            this.CancelQISReason = result.cancelQISReason;
            this.Rcid = result.rCid;
            this.RCinspectionDate = result.rCinspectionDate;
            this.QISReplyDay = result.qISReplyDay;
            this.RCproblemnotfound = result.rCproblemnotfound;
             if (this.qisStatus!='RC检测中') {
                const evt = new ShowToastEvent({
                        title : '已经提交审批',
force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:10:42
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,7 +20,22 @@
    ownerId;
    status;
    userId;
    errorMsg;
    @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);
@@ -21,7 +44,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.ownerId = result.ownerId;
                this.status = result.status;
                this.userId = result.userId;
@@ -31,10 +53,6 @@
            console.log("error");
            console.log(error);
        }).finally(() => {
            console.log(this.errorMsg);
            if(this.errorMsg){
                this.showToast(this.errorMsg,"error");
            }
        });
    }
@@ -58,11 +76,14 @@
            updateForSIStoOPDButton({
                recordId: this.recordId
            }).then(result=>{
                console.log(result);
                if(result){
                    this.showToast(result,"error");
                }else{
                    this.showToast("成功","success");
                    this.updateRecordView(this.recordId);
                } 
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
            });              
    }
force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexSendRepairsToEtQ from 'c/lexSendRepairsToEtQ';
describe('c-lex-send-repairs-to-et-q', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-send-repairs-to-et-q', {
            is: LexSendRepairsToEtQ
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
New file
@@ -0,0 +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/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
New file
@@ -0,0 +1,192 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import selectRecords from '@salesforce/apex/otherButtonRepairController.selectRecords';
import sendToETQ from '@salesforce/apex/otherButtonRepairController.sendToETQ';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexSendRepairsToEtQ extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;;
    PAEDetermineC;
    ETQUPLOADSTATUSC;
    AEDetermineResultC;
    PAEDetermineACC;
    RepairInspectionDateC;
    ContainUseRSAC;
    userID;
    profileId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.PAEDetermineC = result.PAEDetermineC;
                this.ETQUPLOADSTATUSC = result.ETQUPLOADSTATUSC;
                this.AEDetermineResultC = result.AEDetermineResultC;
                this.PAEDetermineACC = result.PAEDetermineACC;
                this.RepairInspectionDateC = result.RepairInspectionDateC;
                this.ContainUseRSAC = result.ContainUseRSAC;
                this.userID = result.userID;
                this.profileId = result.profileId;
                this.myDate();
                this.myReload();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 根据日期构建MessageGroupNumber
    myDate() {
        let messageNumber = '';
        let today = new Date();
        messageNumber = today.getFullYear() + '' + (today.getMonth() + 1) + '' + today.getDate() + '' + today.getHours() + '' +
            today.getMinutes() + '' + today.getSeconds();
        return messageNumber;
    }
    // 按钮点击后触发,判断是否发送过ETQ,如果发送过给出提示并灰掉按钮
    // 如果没有发送过调用发送方法
    myReload() {
        selectRecords({
            recordId: this.Id
        }).then(result => {
            console.log(result);
            if (result.AsyncData__c == 'true' && result.ETQ_UPLOAD_STATUS__c != '3' || result.Complaint_Number__c != null) {
                var btns = document.getElementsByName("sendrepairstoetq");
                for (var i = 0; i < btns.length; i++) {
                    btns[i].disabled = true;
                    btns[i].className = 'btnDisabled';
                }
                this.ShowToastEvent('该修理之前已经发送过了', "error");
                // alert('该修理之前已经发送过了')
            } else {
                this.SendRepairsToEtQ();
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 发送ETQ
    SendRepairsToEtQ() {
        console.log(this.userID);
        console.log(this.profileId);
        var uid = this.userID;
        if (this.profileId != "00e10000000xnoO" && this.profileId != "00e10000000hl7w" && this.profileId != '00e10000000Y3o5') {
            this.ShowToastEvent("您没有发送修理到EtQ的权限。", "error");
            // alert("您没有发送修理到EtQ的权限。");
            return;
        }
        var statu = '';
        if (this.PAEDetermineC == undefined) {
            this.ShowToastEvent("OCSM QARA的PAE判定是空的时候,不可以发送到EtQ。", "error");
            // alert("OCSM QARA的PAE判定是空的时候,不可以发送到EtQ。");
            return;
        }
        if (this.ETQUPLOADSTATUSC == "3") {
            if (!confirm("是否清空EtQ同步状态,重新同步数据?")) {
                return;
            }
        }
        if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && uid != "005100000068zJ6") {
            this.ShowToastEvent("Close Complait的时候,不可以发送到EtQ", "error");
            // alert("Close Complait的时候,不可以发送到EtQ");
            return;
        }
        if (this.PAEDetermineC != undefined && this.AEDetermineResultC != undefined && this.PAEDetermineACC == undefined) {
            statu = "R1";
        } else if ((this.AEDetermineResultC != undefined && this.PAEDetermineC != undefined && this.PAEDetermineACC != undefined) &&
            !(this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE")) {
            statu = "R2";
            if (this.RepairInspectionDateC == "") {
                this.ShowToastEvent("5.修理检测日是空的时候,不可以发送到EtQ。", "error");
                // alert("5.修理检测日是空的时候,不可以发送到EtQ。");
                return;
            }
            if (this.ContainUseRSAC == 1) {
                this.ShowToastEvent("Final universal code为空,或者包含UseRSA,请确认。", "error");
                // alert("Final universal code为空,或者包含UseRSA,请确认。");
                return;
            }
        }
        var result;
        try {
            var repairids = new Array()
            repairids[0] = this.Id;
            var statuArr = new Array();
            statuArr.push(statu);
            sendToETQ({
                iflog_Id: "",
                rowDataSFDC: "",
                repairIds: repairids,
                statu: statuArr[0]
            }).then(result => {
                this.ShowToastEvent(result, "error");
                // alert(result);
            }).catch(error => {
                console.log(error);
            })
            var btns = document.getElementsByName("sendrepairstoetq");
            for (var i = 0; i < btns.length; i++) {
                btns[i].disabled = true;
                btns[i].className = 'btnDisabled';
            }
            location.reload();
        } catch (error) {
            this.ShowToastEvent("发送修理到EtQ失败" + error.faultstring + ' code:' + error.faultcode, "error");
            // alert("发送修理到EtQ失败" + error.faultstring + ' code:' + error.faultcode);
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.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>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/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-04-07 09:02:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-11 09:11:11
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -10,6 +18,22 @@
    @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;
          }
        }
    }
    updateRecordView(recordId) {
      updateRecord({fields: { Id: recordId }});
  }
@@ -19,7 +43,6 @@
            recordId: this.recordId
          }).then(result=>{
            this.submit();
            this.IsLoading = false;
          });
          
    }
@@ -40,6 +63,7 @@
    }).then(result=>{
      this.showToast("提交对手竞争报告成功","success")
      this.updateRecordView(this.recordId);
      this.IsLoading = false;
      this.dispatchEvent(new CloseActionScreenEvent());
    });
    }
force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexSubmitForApproval from 'c/lexSubmitForApproval';
describe('c-lex-submit-for-approval', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-submit-for-approval', {
            is: LexSubmitForApproval
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
@@ -49,6 +49,7 @@
        });
    }
    // 关闭询价/关闭续签
    SubmitForApproval() {
        var url = '';
        selectRecords({
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="AntiLogicButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
New file
@@ -0,0 +1,52 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import  ContraryLogicalDel  from '@salesforce/apex/TenderWebService.ContraryLogicalDel';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexTenderingAntiLogicButton extends 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;
                this.id = result.Id;
                this.AntiLogicButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    //招标项目反逻辑删除
    AntiLogicButton(){
        ContraryLogicalDel({DTenId : this.id}).then(result =>{
            if(result == 'OK'){
                this.showToast("反逻辑删除成功","success");
            }
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.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/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="AttachmentButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
New file
@@ -0,0 +1,45 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingAttachmentButton extends 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;
            this.id = result.Id;
            this.AttachmentButton();
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    //招标项目查看附件
    AttachmentButton(){
        window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.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/lexTenderingHospitalButton/lexTenderingHospitalButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="HospitalButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
New file
@@ -0,0 +1,48 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
export default class lexTenderingHospitalButton extends LightningElement {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    name;//招标项目名
    Environment_Url;//新建医院地址
    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.id = result.Id;
                this.name = result.name;
                this.Environment_Url = result.Environment_Url;
                this.HospitalButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(() => {
        }).finally(() => {
        });
    }
    //招标项目新建医院
    HospitalButton(){
        var url = this.Environment_Url+'001/e?CF00N10000009I0o7='+encodeURIComponent(this.name)
        +'&CF00N10000009I0o7_lkid='+encodeURIComponent(this.id)
        +'&00N10000009HFQT='+encodeURIComponent('招标项目')
        +'&RecordType=01210000000QemG'
        +'&retURL='+ encodeURIComponent(this.id);
        window.location.href = url;
    }
}
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.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/lexTenderingLogicButton/lexTenderingLogicButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="LogicButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
New file
@@ -0,0 +1,39 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
export default class lexTenderingLogicButton extends 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 => {
            if (result != null) {
                this.IsLoading = false;
                this.id = result.Id;
                this.LogicButton();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        })
    }
    //招标项目逻辑删除
    LogicButton(){
        window.open (`/apex/TenderDeletePagelwc?id=${this.id}`, '', 'height=350, width=600, top=200, left=350');
    }
}
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.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/lexTenderingLostButton/lexTenderingLostButton.html
New file
@@ -0,0 +1,5 @@
<template>
    <div class="LostButton" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
New file
@@ -0,0 +1,71 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import  init  from '@salesforce/apex/TenderingButtonController.initTenderingController';
import  sqlResult  from '@salesforce/apex/TenderingButtonController.sqlResult';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingLostButton extends LightningElement {
    @api recordId;//当前这条数据的id
    id;//返回值的id  Tender_information__c招标项目的id
    status;//状态
    profileId;//profileId 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;
                this.id = result.Id;
                this.status = result.status;
                this.profileId = result.profileId.slice(0,15);
                this.LoseButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    //招标项目失单
    LoseButton(){
        sqlResult({id: this.id}).then(result=>{
            //简档权限 2S1_销售医院担当 2S4_销售管理者 系统管理员
            if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
                this.showToast("您没有权限,无法创建询价提交失单。","error");
                return;
            }
            // 判断内部确认状态
            if(this.status == '01.待确认'|| this.status == '02.不相关'){
                this.showToast("状态为待确认或不相关,不可以做失单。","error");
                return;
            }
            // 判断是否需要新建询价
            if(this.status == '05.询价中'|| this.status == '06.成交' || this.status == '07.部分成交' || this.status == '08.失单' || result.length > 0){
                if(confirm('此项目已关联询价,请确实是否新建询价提交失单。')) {
                }else{
                    return;
                }
            }
            window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.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/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexUploadToRecognitionModel from 'c/lexUploadToRecognitionModel';
describe('c-lex-upload-to-recognition-model', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-upload-to-recognition-model', {
            is: LexUploadToRecognitionModel
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
New file
@@ -0,0 +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/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
New file
@@ -0,0 +1,133 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
import updateColunm from '@salesforce/apex/MaintenanceContractSetColunmWebService.updateColunm';
import up2sap from '@salesforce/apex/MaintenanceContractWebService.up2sap';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexUploadToRecognitionModel extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    ContractQuotationOrNotC;
    oldIsRecognitionModelC;
    MaintenanceContractNoC;
    uploadToRMTimeC;
    uploadToSapTimeC;
    PaymentPlanSumFirstC;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.ContractQuotationOrNotC = result.ContractQuotationOrNotC;
                this.oldIsRecognitionModelC = result.oldIsRecognitionModelC;
                this.MaintenanceContractNoC = result.MaintenanceContractNoC;
                this.uploadToSapTimeC = result.uploadToSapTimeC;
                this.uploadToRMTimeC = result.uploadToRMTimeC;
                this.PaymentPlanSumFirstC = result.PaymentPlanSumFirstC;
                this.uploadToRecognitionModel();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 上传认款合同
    uploadToRecognitionModel() {
        if (this.ContractQuotationOrNotC == '还没做报价') {
            this.ShowToastEvent("您还没有做合同报价,不能上传认款合同。", "error")
            // alert("您还没有做合同报价,不能上传认款合同。");
        } else if (this.MaintenanceContractNoC == undefined) {
            this.ShowToastEvent('合同号码为空,不能上传认款合同。', "error")
            // alert('合同号码为空,不能上传认款合同。');
        } else if (this.uploadToSapTimeC != undefined) {
            this.ShowToastEvent('已经上传SAP,不能再次上传认款合同。', "error")
            // alert('已经上传SAP,不能再次上传认款合同。');
        } else if (this.uploadToRMTimeC != undefined) {
            this.ShowToastEvent('已经上传认款合同,不能再次上传认款合同。', "error")
            // alert('已经上传认款合同,不能再次上传认款合同。');
        } else {
            if (!this.oldIsRecognitionModelC) {
                this.ShowToastEvent('经销商为空或经销商不是先款对象,不需要上传认款合同。', "error")
                // alert('经销商为空或经销商不是先款对象,不需要上传认款合同。');
            } else if (this.PaymentPlanSumFirstC == undefined) {
                this.ShowToastEvent('第一次计划付款金额不能为空。', "error")
                // alert('第一次计划付款金额不能为空。');
            } else {
                if (!confirm('请确认是否要上传认款合同。')) {
                    return;
                }
                updateColunm({
                    mcid: this.Id
                }).then(result => {
                    console.log(result);
                    if (result != '1') {
                        this.ShowToastEvent('上传认款合同失败,因为 来年合同相关信息修改失败', "error")
                        // alert('上传认款合同失败,因为 来年合同相关信息修改失败');
                        location.href = "/" + this.Id;
                    }
                }).catch(error => {
                    console.log(error);
                })
                up2sap({
                    mcid: this.Id
                }).then(rtn => {
                    console.log(rtn);
                    if (rtn == '1') {
                        this.ShowToastEvent("上传认款合同成功", "success")
                        // alert("上传认款合同成功");
                        location.href = "/" + this.Id;
                    } else {
                        this.ShowToastEvent(rtn, "error")
                        // alert(rtn);
                    }
                }).catch(error => {
                    console.log(error);
                })
            }
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.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>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/lexUploadToSap/__tests__/lexUploadToSap.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexUploadToSap from 'c/lexUploadToSap';
describe('c-lex-upload-to-sap', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-upload-to-sap', {
            is: LexUploadToSap
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.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/lexUploadToSap/lexUploadToSap.js
@@ -14,6 +14,10 @@
import updateFirstContract from '@salesforce/apex/updateFirstServiceContractWebService.updateFirstContract';
import Check_plan from '@salesforce/apex/MaintenanceContractWebService.Check_plan';
import up2sap from '@salesforce/apex/MaintenanceContractWebService.up2sap';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexUploadToSap extends LightningElement {
    @api recordId;
    str;
@@ -67,101 +71,85 @@
        });
    }
    // 上传SAP
    uploadToSap() {
        if (this.MCApprovalStatusC != 'Pass') {
            alert("合同复核批准后才可以上传SAP。");
            this.ShowToastEvent("合同复核批准后才可以上传SAP。", "error")
            // alert("合同复核批准后才可以上传SAP。");
        } else if (this.MaintenanceContractNoC == undefined) {
            alert('维修合同管理编码为空,不能上传SAP。');
            this.ShowToastEvent('维修合同管理编码为空,不能上传SAP。', "error")
            // alert('维修合同管理编码为空,不能上传SAP。');
        } else if (this.uploadToSapTimeC != undefined) {
            alert('已经上传SAP,不能重复上传。');
            this.ShowToastEvent('已经上传SAP,不能重复上传。', "error")
            // alert('已经上传SAP,不能重复上传。');
        } else {
            //update wangweipeng 2021/11/20 start
            //判断是否需要先上传认款合同吗,如果需要那么判断他是否已经上传,如果上传,那么判断他是否完成认款,如果都满足,那么才能正常走接口上传SAP
            //判断是认款合同吗
            if (this.oldIsRecognitionModelC) {
                //判断是否已经上传认款合同
                if (this.uploadToRMTimeC == undefined) {
                    console.log("a");
                    alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。');
                    this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。', "error")
                    // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。');
                    return;
                } else {
                    //判断是否完成认款
                    if (!this.IsRecognitionModelTrueC) {
                        console.log("b");
                        alert('当前维修合同没有完成认款,不能上传SAP。');
                        this.ShowToastEvent('当前维修合同没有完成认款,不能上传SAP。', "error")
                        // alert('当前维修合同没有完成认款,不能上传SAP。');
                        return;
                    }
                }
            }
            //update wangweipeng 2021/11/20 end
            // sforce.connection.sessionId = this.api.sessionId;
            // var mcid = this.Id;
            // var result = sforce.apex.execute("MaintenanceContractSetColunmWebService", "updateColunm", {
            //     mcid: mcid
            // });
            updateColunm({
                mcid: this.Id
            }).then(result=>{
                console.log("updateColunm" + result);
                if (result != '1') {
                    console.log("c");
                    alert('上传SAP失败,因为 来年合同相关信息修改失败');
                    //location.href = "/" + this.Id;
                    this.ShowToastEvent('上传SAP失败,因为 来年合同相关信息修改失败', "error")
                    // alert('上传SAP失败,因为 来年合同相关信息修改失败');
                }
            });
            //首次服务合同赋值
            // var updateResult = sforce.apex.execute("updateFirstServiceContractWebService", "updateFirstContract", {
            //     mcid: mcid
            // });
            updateFirstContract({
                mcid: this.Id
            }).then(result=>{
                console.log("updateFirstContract:" + result);
                if (result != '1') {
                    alert(result);
                    this.ShowToastEvent(result, "error")
                    // alert(result);
                }
            });
            //URF限次合同2期 LY 20220811 start
            this.urfFlag = this.URFContractFC;
            this.rtn1 = '1';
            this.rtn = '1';
            if (this.urfFlag == 'false') {
                // rtn1 = sforce.apex.execute("MaintenanceContractWebService", "Check_plan", {
                //     mcidList: mcid
                // });
                Check_plan({
                    mcidList: this.Id
                }).then(result=>{
                    console.log("Check_plan:" + result);
                    this.rtn1 = result;
                });
            }
            console.log("rtn1" + this.rtn1);
            //URF限次合同2期 LY 20220811 end
            if (this.rtn1 == '1') {
                // var rtn = sforce.apex.execute("MaintenanceContractWebService", "up2sap", {
                //     mcid: mcid
                // });
                up2sap({
                    mcid: this.Id
                }).then(result=>{
                    console.log("up2sap:" + result);
                    this.rtn = result;
                });
                console.log("rtn" + this.rtn);
                if (this.rtn == '1') {
                    alert("上传SAP成功");
                    this.ShowToastEvent("上传SAP成功", "success")
                    // alert("上传SAP成功");
                    window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Maintenance_Contract__c/" + this.recordId + "/view");
                    //window.location.href = "/" + this.Id;
                } else {
                    alert(this.rtn);
                    this.ShowToastEvent(this.rtn, "error")
                    // alert(this.rtn);
                }
            } else {
                alert(this.rtn1);
                this.ShowToastEvent(this.rtn1, "error")
                // alert(this.rtn1);
            }
        }
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-27 14:05:59
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-10 17:56:04
 */
import { LightningElement, wire, track, api } from "lwc";
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from "lightning/actions";
@@ -11,6 +19,22 @@
  status;
  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);
    init({
@@ -19,7 +43,6 @@
      .then((result) => {
        console.log(result);
        if (result != null) {
          this.Isloading = false;
          this.status = result.status;
          this.update();
        }
@@ -60,6 +83,7 @@
        this.showToast(result,"error");
      }
      this.updateRecordView(this.recordId);
      this.Isloading = false;
      this.dispatchEvent(new CloseActionScreenEvent());
    }).catch(error=>{
      console.log(error);
force-app/main/default/lwc/lexVOCCheck/lexVOCCheck.js
@@ -16,6 +16,22 @@
    profileId;
    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);
@@ -24,7 +40,7 @@
        }).then(result => {
            console.log(result);
            if (result != null) {  
                this.Isloading = false;
                this.status = result.status;
                this.isVOC = result.isVOC;
                this.personId = result.personId;
@@ -85,6 +101,7 @@
                }else {
                    this.showToast(result,"error");
                }
                this.Isloading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
            });
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.css
New file
@@ -0,0 +1,10 @@
.confirmHolder{
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    text-align: center;
}
.container .uiContainerManager{
    display: none !important;
}
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.html
New file
@@ -0,0 +1,6 @@
<template>
    <div class="confirmHolder" 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/lexVOCConfirm/lexVOCConfirm.js
New file
@@ -0,0 +1,104 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-27 14:08:56
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-10 17:49:00
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import init  from '@salesforce/apex/ReportController.initForVOCConfirmButton';
import  updateForVOCConfirmButton from '@salesforce/apex/ReportController.updateForVOCConfirmButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexVOCConfirm extends LightningElement {
    @api recordId;
    status;
    VOCSatisfy;
    VOCSatisfy1;
    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);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.status = result.status;
                this.VOCSatisfy = result.Satisfy;
                this.VOCSatisfy1 = result.Satisfy1;
                console.log(this.VOCSatisfy);
                console.log(this.VOCSatisfy1);
                console.log(this.status);
                this.update();
            }
        }).catch(error => {
            console.log("error");
            console.log(error);
        }).finally(() => {
        });
        //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
        this.updateRecordView(this.recordId);
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
    update(){
        if (this.status != "已回答") {
            this.showToast("不是已回答不能点击","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
            if (this.VOCSatisfy == undefined) {
            this.showToast("请选择是否满意","error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
        updateForVOCConfirmButton({
            recordId: this.recordId,
            Satisfy: this.VOCSatisfy,
            Satisfy1: this.VOCSatisfy1
        }).then(result=>{
            this.updateRecordView(this.recordId);
            this.showToast("成功","success");
            this.Isloading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        });
    }
}
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.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>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/lexVOCFinish/lexVOCFinish.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-27 14:11:17
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-10 17:52:00
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,6 +20,22 @@
    IsLoading = true;
    profileId;
    @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);
        init({
@@ -19,7 +43,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.status = result.status;
                this.profileId = result.profileId;
                this.VOCFinish();
@@ -64,6 +87,7 @@
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
            });
    }
force-app/main/default/lwc/lexVOCSubmit/lexVOCSubmit.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-03-27 13:39:23
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-10 17:57:16
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -12,6 +20,22 @@
    status;
    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);
        init({
@@ -22,7 +46,6 @@
                this.status = result.status;
                this.createdById = result.createdById;
                this.Submit();
                this.IsLoading = false;
                //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
            }
        }).catch(error => {
@@ -59,6 +82,7 @@
            }).then(result =>{
                this.showToast("成功","success");
                this.updateRecordView(this.recordId);
                this.IsLoading = false;
                this.dispatchEvent(new CloseActionScreenEvent());
            });
    }
force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexYanshoudanRequest from 'c/lexYanshoudanRequest';
describe('c-lex-yanshoudan-request', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-yanshoudan-request', {
            is: LexYanshoudanRequest
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.html
New file
@@ -0,0 +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/lexYanshoudanRequest/lexYanshoudanRequest.js
New file
@@ -0,0 +1,79 @@
import {
    LightningElement,
    wire,
    api
} from 'lwc';
import {
    CurrentPageReference
} from "lightning/navigation";
import {
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/otherButtonRepairController.init';
import updateYanshoudan from '@salesforce/apex/otherButtonRepairController.updateYanshoudan';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexYanshoudanRequest extends LightningElement {
    @api recordId;
    str;
    IsLoading = true;
    Id;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }
    }
    connectedCallback() {
        console.log(this.recordId);
        init({
            recordId: this.recordId
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.YanshoudanRequest();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
        }).finally(() => {
        });
    }
    // 验收单回收申请
    YanshoudanRequest() {
        updateYanshoudan({
            recordId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                var indexs = result.indexOf(": ")
                var resolves = result.substring(indexs + 1, result.length);
                alert(resolves);
            }
            location.reload();
        })
    }
    // 弹窗
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    }
}
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.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>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/oshRecieved/oshRecieved.js
@@ -33,7 +33,7 @@
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.qisStatus = result.QIStatus;
            this.qisStatus = result.qIStatus;
            console.log('this.qisStatus='+this.qisStatus);
             if (this.qisStatus!='OSH检测申请' && this.qisStatus!='完毕') {
                const evt = new ShowToastEvent({